/** * @license * lodash * Copyright jQuery Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /******************************************************************************* * @license * Copyright (c) 2013 VMware, Inc. All Rights Reserved. * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * You can obtain a current copy of the Eclipse Public License from * http://www.opensource.org/licenses/eclipse-1.0.php * * Contributors: * Andrew Eisenberg * Brian Cavalier ******************************************************************************/ /* Original copyright is below. This is version git tag: 310927be9f. Further modifications: Author: Andy Clement (VMware) - recovery support Original copyright: Copyright (C) 2012 Ariya Hidayat Copyright (C) 2012 Mathias Bynens Copyright (C) 2012 Joost-Wim Boekesteijn Copyright (C) 2012 Kris Kowal Copyright (C) 2012 Yusuke Suzuki Copyright (C) 2012 Arpad Borsos Copyright (C) 2011 Ariya Hidayat Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /******************************************************************************* * @license * Copyright (c) 2012 VMware, Inc. All Rights Reserved. * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * You can obtain a current copy of the Eclipse Public License from * http://www.opensource.org/licenses/eclipse-1.0.php * * Contributors: * Andrew Eisenberg (VMware) - initial API and implementation ******************************************************************************/ /** JSZip - A Javascript class for generating and reading zip files (c) 2009-2012 Stuart Knightley Dual licenced under the MIT license or GPLv3. See LICENSE.markdown. Usage: zip = new JSZip(); zip.file("hello.txt", "Hello, World!").file("tempfile", "nothing"); zip.folder("images").file("smile.gif", base64Data, {base64: true}); zip.file("Xmas.txt", "Ho ho ho !", {date : new Date("December 25, 2007 00:00:01")}); zip.remove("tempfile"); base64zip = zip.generate(); **/ /** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ /** JSZip - A Javascript class for generating and reading zip files (c) 2011 David Duponchel Dual licenced under the MIT license or GPLv3. See LICENSE.markdown. **/ /* The MIT License (MIT) Copyright (c) 2007-2013 Einar Lielmanis and contributors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CSS Beautifier --------------- Written by Harutyun Amirjanyan, (amirjanyan@gmail.com) Based on code initially developed by: Einar Lielmanis, http://jsbeautifier.org/ Usage: css_beautify(source_text); css_beautify(source_text, options); The options are (default in brackets): indent_size (4) — indentation size, indent_char (space) — character to indent with, selector_separator_newline (true) - separate selectors with newline or not (e.g. "a,\nbr" or "a, br") end_with_newline (false) - end with a newline newline_between_rules (true) - add a new line after every css rule e.g css_beautify(css_source_text, { 'indent_size': 1, 'indent_char': '\t', 'selector_separator': ' ', 'end_with_newline': false, 'newline_between_rules': true }); */ /******************************************************************************* * @license * Copyright (c) 2010, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials are made * available under the terms of the Eclipse Public License v1.0 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). * * Contributors: IBM Corporation - initial API and implementation ******************************************************************************/ /******************************************************************************* * @license * Copyright (c) 2011, 2012 IBM Corporation and others. * Copyright (c) 2012 VMware, Inc. * All rights reserved. This program and the accompanying materials are made * available under the terms of the Eclipse Public License v1.0 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). * * Contributors: * IBM Corporation - initial API and implementation * Andrew Eisenberg - rename to jsTemplateContentAssist.js *******************************************************************************/ // copyright notices can be found at "https://github.com/ajaxorg/ace" /* Execute in a NodeJS app: npm install prettydiff (local install) var prettydiff = require("prettydiff"), args = { source: "asdf", diff : "asdd", lang : "text" }, output = prettydiff.api(args); Execute on command line with NodeJS: npm install prettydiff -g (global install) prettydiff source:"c:\mydirectory\myfile.js" readmethod:"file" diff:"c:\myotherfile.js" Execute with WSH: cscript prettydiff.wsf /source:"myFile.xml" /mode:"beautify" Execute from JavaScript: var args = { source: "asdf", diff : "asdd", lang : "text" }, output = prettydiff(args); ******* license start ******* @source: http://prettydiff.com/prettydiff.js @documentation - English: http://prettydiff.com/documentation.php @licstart The following is the entire license notice for Pretty Diff. This code may not be used or redistributed unless the following conditions are met: * Prettydiff created by Austin Cheney originally on 3 Mar 2009. http://prettydiff.com/ * The use of diffview.js and prettydiff.js must contain the following copyright: Copyright (c) 2007, Snowtide Informatics Systems, Inc. All rights reserved. - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Snowtide Informatics Systems nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - used as diffview function http://prettydiff.com/lib/diffview.js * The code mentioned above has significantly expanded documentation in each of the respective function's external JS file as linked from the documentation page: http://prettydiff.com/documentation.php * In addition to the previously stated requirements any use of any component, aside from directly using the full files in their entirety, must restate the license mentioned at the top of each concerned file. If each and all these conditions are met use, extension, alteration, and redistribution of Pretty Diff and its required assets is unlimited and free without author permission. @licend The above is the entire license notice for Pretty Diff. ******* license end ******* Join the Pretty Diff mailing list at: https://groups.google.com/d/forum/pretty-diff Special thanks to: * Harry Whitfield for the numerous test cases provided against JSPretty. http://g6auc.me.uk/ * Andreas Greuel for contributing samples to test diffview.js https://plus.google.com/105958105635636993368/posts */ /******************************************************************************* * @license * Copyright (c) 2012 VMware, Inc. All Rights Reserved. * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * You can obtain a current copy of the Eclipse Public License from * http://www.opensource.org/licenses/eclipse-1.0.php * * Contributors: * Andy Clement (VMware) - initial API and implementation * Andrew Eisenberg (VMware) - implemented visitor pattern ******************************************************************************/ /* Copyright (C) 2012-2013 Yusuke Suzuki Copyright (C) 2013 Andrew Eisenberg Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /******************************************************************************* * @license * Copyright (c) 2012 VMware, Inc. All Rights Reserved. * Copyright (c) 2013 IBM Corporation. * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * You can obtain a current copy of the Eclipse Public License from * http://www.opensource.org/licenses/eclipse-1.0.php * * Contributors: * Andrew Eisenberg (VMware) - initial API and implementation * Manu Sridharan (IBM) - Various improvements ******************************************************************************/ /******************************************************************************* * @license * Copyright (c) 2013 IBM Corporation. * All rights reserved. This program and the accompanying materials are made * available under the terms of the Eclipse Public License v1.0 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). * * Contributors: * Manu Sridharan (IBM) - Initial API and implementation ******************************************************************************/ /******************************************************************************* * @license * Copyright (c) 2013 IBM Corporation. * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * You can obtain a current copy of the Eclipse Public License from * http://www.opensource.org/licenses/eclipse-1.0.php * * Contributors: * Manu Sridharan (IBM) - Initial API and implementation ******************************************************************************/ /******************************************************************************* * @license * Copyright (c) 2012 VMware, Inc. All Rights Reserved. * Copyright (c) 2013 IBM Corporation. * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * You can obtain a current copy of the Eclipse Public License from * http://www.opensource.org/licenses/eclipse-1.0.php * * Contributors: * Andy Clement (VMware) - initial API and implementation * Andrew Eisenberg (VMware) - implemented visitor pattern * Manu Sridharan (IBM) - Various improvements ******************************************************************************/ /******************************************************************************* * @license * Copyright (c) 2011, 2012 IBM Corporation and others. * Copyright (c) 2012 VMware, Inc. * All rights reserved. This program and the accompanying materials are made * available under the terms of the Eclipse Public License v1.0 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). * * Contributors: * IBM Corporation - initial API and implementation * Andrew Eisenberg - rename to jsTemplateContentAssist.js *******************************************************************************/ /*!The MIT License (MIT) * * Copyright (c) 2014 Petka Antonov * * With parts by 2009-2014 Kris Kowal under the terms of the MIT * license found at http://github.com/kriskowal/q/raw/master/LICENSE * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:

* * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /*! * SAP XHR Library v1.2.0 * (c) Copyright 2013-2016 SAP SE or an SAP affiliate company. */ //Copyright JS Foundation and other contributors, https://js.foundation // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. /** * Copyright (c) 2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * https://raw.github.com/facebook/regenerator/master/LICENSE file. An * additional grant of patent rights can be found in the PATENTS file in * the same directory. */ // Acorn is a tiny, fast JavaScript parser written in JavaScript. // // Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and // various contributors and released under an MIT license. // // Git repositories for Acorn are available at // // http://marijnhaverbeke.nl/git/acorn // https://github.com/ternjs/acorn.git // // Please use the [github bug tracker][ghbt] to report issues. // // [ghbt]: https://github.com/ternjs/acorn/issues // // This file defines the main parser interface. The library also comes // with a [error-tolerant parser][dammit] and an // [abstract syntax tree walker][walk], defined in other files. // // [dammit]: acorn_loose.js // [walk]: util/walk.js /** * @fileoverview The visitor keys for the node types Espree supports * @author Nicholas C. Zakas * * This file contains code from estraverse-fb. * * The MIT license. Copyright (c) 2014 Ingvar Stepanyan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /** * @fileoverview Main Espree file that converts Acorn into Esprima output. * * This file contains code from the following MIT-licensed projects: * 1. Acorn * 2. Babylon * 3. Babel-ESLint * * This file also contains code from Esprima, which is BSD licensed. * * Acorn is Copyright 2012-2015 Acorn Contributors (https://github.com/marijnh/acorn/blob/master/AUTHORS) * Babylon is Copyright 2014-2015 various contributors (https://github.com/babel/babel/blob/master/packages/babylon/AUTHORS) * Babel-ESLint is Copyright 2014-2015 Sebastian McKenzie * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Esprima is Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ // http://wiki.commonjs.org/wiki/Unit_Testing/1.0 // // THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! // // Originally from narwhal.js (http://narwhaljs.org) // Copyright (c) 2009 Thomas Robinson <280north.com> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the 'Software'), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or // sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* Copyright (C) 2015 Yusuke Suzuki Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Copyright (C) 2012-2014 Yusuke Suzuki Copyright (C) 2013 Alex Seville Copyright (C) 2014 Thiago de Arruda Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Copyright (C) 2014 Yusuke Suzuki Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Copyright (C) 2012-2013 Yusuke Suzuki Copyright (C) 2012 Ariya Hidayat Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Copyright (C) 2013 Yusuke Suzuki Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Copyright (C) 2013-2014 Yusuke Suzuki Copyright (C) 2014 Ivan Nikulin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Copyright (C) 2013 Yusuke Suzuki Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. /** * @license * Lodash * Copyright JS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /* * @version 1.4.0 * @date 2015-10-26 * @stability 3 - Stable * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite) * @license MIT License */ /* object-assign (c) Sindre Sorhus @license MIT */ /* The MIT License (MIT) Copyright (c) 2012 Nicholas Fisher Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /** * @fileoverview Pattern for detecting any letter (even letters outside of ASCII). * NOTE: This file was generated using this script in JSCS based on the Unicode 7.0.0 standard: https://github.com/jscs-dev/node-jscs/blob/f5ed14427deb7e7aac84f3056a5aab2d9f3e563e/publish/helpers/generate-patterns.js * Do not edit this file by hand-- please use https://github.com/mathiasbynens/regenerate to regenerate the regular expression exported from this file. * @author Kevin Partington * @license MIT License (from JSCS). See below. */ /* * The MIT License (MIT) * * Copyright 2013-2016 Dulin Marat and other contributors * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The MIT License (MIT) Copyright (c) 2007-2013 Einar Lielmanis and contributors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. JS Beautifier --------------- Written by Einar Lielmanis, http://jsbeautifier.org/ Originally converted to javascript by Vital, "End braces on own line" added by Chris J. Shull, Parsing improvements for brace-less statements by Liam Newman Usage: js_beautify(js_source_text); js_beautify(js_source_text, options); The options are: indent_size (default 4) - indentation size, indent_char (default space) - character to indent with, preserve_newlines (default true) - whether existing line breaks should be preserved, max_preserve_newlines (default unlimited) - maximum number of line breaks to be preserved in one chunk, jslint_happy (default false) - if true, then jslint-stricter mode is enforced. jslint_happy !jslint_happy --------------------------------- function () function() switch () { switch() { case 1: case 1: break; break; } } space_after_anon_function (default false) - should the space before an anonymous function's parens be added, "function()" vs "function ()", NOTE: This option is overriden by jslint_happy (i.e. if jslint_happy is true, space_after_anon_function is true by design) brace_style (default "collapse") - "collapse-preserve-inline" | "collapse" | "expand" | "end-expand" | "none" put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line, or attempt to keep them where they are. space_before_conditional (default true) - should the space before conditional statement be added, "if(true)" vs "if (true)", unescape_strings (default false) - should printable characters in strings encoded in \xNN notation be unescaped, "example" vs "\x65\x78\x61\x6d\x70\x6c\x65" wrap_line_length (default unlimited) - lines should wrap at next opportunity after this number of characters. NOTE: This is not a hard limit. Lines will continue until a point where a newline would be preserved if it were present. end_with_newline (default false) - end output with a newline e.g js_beautify(js_source_text, { 'indent_size': 1, 'indent_char': '\t' }); */ // license. The Unicode regexps (for identifiers and whitespace) were // if (a) if (b) if(c) d(); else e(); else f(); /* ***** BEGIN LICENSE BLOCK ***** * Distributed under the BSD license: * * Copyright (c) 2010, Ajax.org B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Ajax.org B.V. nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * ***** END LICENSE BLOCK ***** */ /* * jQuery XPath plugin v0.2.5 * https://github.com/ilinsky/jquery-xpath * Copyright 2013, Sergey Ilinsky * Dual licensed under the MIT and GPL licenses. * * Includes xpath.js - XPath 2.0 implementation in JavaScript * https://github.com/ilinsky/xpath.js * Copyright 2013, Sergey Ilinsky * Dual licensed under the MIT and GPL licenses. * */ /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */ /** * @fileoverview A factory for creating AST nodes * @author Fred K. Schott * @copyright 2014 Fred K. Schott. All rights reserved. * @copyright 2011-2013 Ariya Hidayat * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * @fileoverview The AST node types produced by the parser. * @author Nicholas C. Zakas * @copyright 2014 Nicholas C. Zakas. All rights reserved. * @copyright 2011-2013 Ariya Hidayat * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * @fileoverview Attaches comments to the AST. * @author Nicholas C. Zakas * @copyright 2015 Nicholas C. Zakas. All rights reserved. * @copyright 2011-2013 Ariya Hidayat * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * @fileoverview The list of feature flags supported by the parser and their default * settings. * @author Nicholas C. Zakas * @copyright 2015 Fred K. Schott. All rights reserved. * @copyright 2014 Nicholas C. Zakas. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * @fileoverview Error messages returned by the parser. * @author Nicholas C. Zakas * @copyright 2014 Nicholas C. Zakas. All rights reserved. * @copyright 2011-2013 Ariya Hidayat * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * @fileoverview A simple map that helps avoid collisions on the Object prototype. * @author Jamund Ferguson * @copyright 2015 Jamund Ferguson. All rights reserved. * @copyright 2011-2013 Ariya Hidayat * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * @fileoverview Various syntax/pattern checks for parsing. * @author Nicholas C. Zakas * @copyright 2014 Nicholas C. Zakas. All rights reserved. * @copyright 2011-2013 Ariya Hidayat * @copyright 2012-2013 Mathias Bynens * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * @fileoverview Contains token information. * @author Nicholas C. Zakas * @copyright 2014 Nicholas C. Zakas. All rights reserved. * @copyright 2013 Thaddee Tyl * @copyright 2011-2013 Ariya Hidayat * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * @fileoverview The list of XHTML entities that are valid in JSX. * @author Nicholas C. Zakas * @copyright 2014 Nicholas C. Zakas. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Copyright (C) 2015 Fred K. Schott Copyright (C) 2013 Ariya Hidayat Copyright (C) 2013 Thaddee Tyl Copyright (C) 2013 Mathias Bynens Copyright (C) 2012 Ariya Hidayat Copyright (C) 2012 Mathias Bynens Copyright (C) 2012 Joost-Wim Boekesteijn Copyright (C) 2012 Kris Kowal Copyright (C) 2012 Yusuke Suzuki Copyright (C) 2012 Arpad Borsos Copyright (C) 2011 Ariya Hidayat Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * @fileoverview Defines environment settings and globals. * @author Elan Shanker * @copyright 2014 Elan Shanker. All rights reserved. */ /* Copyright (C) 2012-2014 Yusuke Suzuki Copyright (C) 2014 Dan Tao Copyright (C) 2013 Andrew Eisenberg Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * @fileoverview Validates configs. * @author Brandon Mills * @copyright 2015 Brandon Mills */ /** * @fileoverview Rule to flag wrapping non-iife in parens * @author Gyandeep Singh * @copyright 2015 Gyandeep Singh. All rights reserved. */ /** * @fileoverview Disallows or enforces spaces inside of array brackets. * @author Jamund Ferguson * @copyright 2015 Jamund Ferguson. All rights reserved. * @copyright 2014 Brandyn Bennett. All rights reserved. * @copyright 2014 Michael Ficarra. No rights reserved. * @copyright 2014 Vignesh Anand. All rights reserved. */ /** * @fileoverview Rule to flag non-camelcased identifiers * @author Nicholas C. Zakas * @copyright 2015 Dieter Oberkofler. All rights reserved. */ /** * @fileoverview Rule to forbid or enforce dangling commas. * @author Ian Christian Myers * @copyright 2015 Mathias Schreck * @copyright 2013 Ian Christian Myers */ /** * @fileoverview Comma spacing - validates spacing before and after comma * @author Vignesh Anand aka vegetableman. * @copyright 2014 Vignesh Anand. All rights reserved. */ /** * @fileoverview Comma style - enforces comma styles of two types: last and first * @author Vignesh Anand aka vegetableman * @copyright 2014 Vignesh Anand. All rights reserved. * @copyright 2015 Evan Simmons. All rights reserved. */ /** * @fileoverview Disallows or enforces spaces inside computed properties. * @author Jamund Ferguson * @copyright 2015 Jamund Ferguson. All rights reserved. */ /** * @fileoverview Rule to enforce consistent naming of "this" context variables * @author Raphael Pigulla * @copyright 2015 Timothy Jones. All rights reserved. * @copyright 2015 David Aurelio. All rights reserved. */ /** * @fileoverview Validates newlines before and after dots * @author Greg Cochard * @copyright 2015 Greg Cochard */ /** * @fileoverview Rule to warn when a function expression does not have a name. * @author Kyle T. Nunery * @copyright 2015 Brandon Mills. All rights reserved. * @copyright 2014 Kyle T. Nunery. All rights reserved. */ /** * @fileoverview Rule to enforce a particular function style * @author Nicholas C. Zakas * @copyright 2013 Nicholas C. Zakas. All rights reserved. */ /** * @fileoverview Rule to check the spacing around the * in generator functions. * @author Jamund Ferguson * @copyright 2015 Brandon Mills. All rights reserved. * @copyright 2014 Jamund Ferguson. All rights reserved. */ /** * @fileoverview Rule to check for the position of the * in your generator functions * @author Jamund Ferguson * @copyright 2014 Jamund Ferguson. All rights reserved. */ /** * @fileoverview Ensure handling of errors when we know they exist. * @author Jamund Ferguson * @copyright 2014 Jamund Ferguson. All rights reserved. */ /** * @fileoverview This option sets a specific tab width for your code * This rule has been ported and modified from JSCS. * @author Dmitriy Shekhovtsov * @copyright 2015 Dmitriy Shekhovtsov. All rights reserved. * @copyright 2013 Dulin Marat and other contributors. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /** * @fileoverview Rule to specify spacing of object literal keys and values * @author Brandon Mills * @copyright 2014 Brandon Mills. All rights reserved. */ /** * @fileoverview Rule to forbid mixing LF and LFCR line breaks. * @author Erik Mueller * @copyright 2015 Varun Verma. All rights reserverd. * @copyright 2015 James Whitney. All rights reserved. * @copyright 2015 Erik Mueller. All rights reserved. */ /** * @fileoverview Enforces empty lines around comments. * @author Jamund Ferguson * @copyright 2015 Jamund Ferguson. All rights reserved. */ /** * @fileoverview A rule to set the maximum depth block can be nested in a function. * @author Ian Christian Myers * @copyright 2013 Ian Christian Myers. All rights reserved. */ /** * @fileoverview Rule to check for max length on a line. * @author Matt DuVall * @copyright 2013 Matt DuVall. All rights reserved. */ /** * @fileoverview Rule to enforce a maximum number of nested callbacks. * @author Ian Christian Myers * @copyright 2013 Ian Christian Myers. All rights reserved. */ /** * @fileoverview Rule to flag when a function has too many parameters * @author Ilya Volodin * @copyright 2014 Nicholas C. Zakas. All rights reserved. * @copyright 2013 Ilya Volodin. All rights reserved. */ /** * @fileoverview A rule to set the maximum number of statements in a function. * @author Ian Christian Myers * @copyright 2013 Ian Christian Myers. All rights reserved. */ /** * @fileoverview Rule to flag use of constructors without capital letters * @author Nicholas C. Zakas * @copyright 2014 Jordan Harband. All rights reserved. * @copyright 2013-2014 Nicholas C. Zakas. All rights reserved. */ /** * @fileoverview Rule to check empty newline after "var" statement * @author Gopal Venkatesan * @copyright 2015 Gopal Venkatesan. All rights reserved. * @copyright 2015 Casey Visco. All rights reserved. */ /** * @fileoverview Rule to flag use of alert, confirm, prompt * @author Nicholas C. Zakas * @copyright 2015 Mathias Schreck * @copyright 2013 Nicholas C. Zakas */ /** * @fileoverview Rule to flag use constant conditions * @author Christian Schulz * @copyright 2014 Christian Schulz. All rights reserved. */ /** * @fileoverview Rule to flag use of continue statement * @author Borislav Zhivkov * @copyright 2015 Borislav Zhivkov. All rights reserved. */ /** * @fileoverview Rule to flag duplicate arguments * @author Jamund Ferguson * @copyright 2015 Jamund Ferguson. All rights reserved. */ /** * @fileoverview Rule to flag use of duplicate keys in an object. * @author Ian Christian Myers * @copyright 2013 Ian Christian Myers. All rights reserved. * @copyright 2013 Nicholas C. Zakas. All rights reserved. */ /** * @fileoverview Rule to disallow a duplicate case label. * @author Dieter Oberkofler * @copyright 2015 Dieter Oberkofler. All rights reserved. */ /** * @fileoverview Rule to flag use of an empty block statement * @author Nicholas C. Zakas * @copyright Nicholas C. Zakas. All rights reserved. * @copyright 2015 Dieter Oberkofler. All rights reserved. */ /** * @fileoverview Rule to flag use of eval() statement * @author Nicholas C. Zakas * @copyright 2015 Mathias Schreck. All rights reserved. * @copyright 2013 Nicholas C. Zakas. All rights reserved. */ /** * @fileoverview Rule to flag unnecessary bind calls * @author Bence Dányi * @copyright 2014 Bence Dányi. All rights reserved. */ /** * @fileoverview Disallow parenthesising higher precedence subexpressions. * @author Michael Ficarra * @copyright 2014 Michael Ficarra. All rights reserved. */ /** * @fileoverview Rule to flag unnecessary strict directives. * @author Ian Christian Myers * @copyright 2014 Ian Christian Myers. All rights reserved. */ /** * @fileoverview Rule to flag use of function declaration identifiers as variables. * @author Ian Christian Myers * @copyright 2013 Ian Christian Myers. All rights reserved. */ /** * @fileoverview Rule to flag use of implied eval via setTimeout and setInterval * @author James Allardice * @copyright 2015 Mathias Schreck. All rights reserved. * @copyright 2013 James Allardice. All rights reserved. */ /** * @fileoverview Enforces or disallows inline comments. * @author Greg Cochard * @copyright 2014 Greg Cochard. All rights reserved. */ /** * @fileoverview Rule to enforce declarations in program or function body root. * @author Brandon Mills * @copyright 2014 Brandon Mills. All rights reserved. */ /** * @fileoverview Validate strings passed to the RegExp constructor * @author Michael Ficarra * @copyright 2014 Michael Ficarra. All rights reserved. */ /** * @fileoverview Rule to disalow whitespace that is not a tab or space, whitespace inside strings and comments are allowed * @author Jonathan Kingston * @copyright 2014 Jonathan Kingston. All rights reserved. */ /** * @fileoverview Rule to flag blocks with no reason to exist * @author Brandon Mills * @copyright 2015 Roberto Vidal. All rights reserved. * @copyright 2014 Brandon Mills. All rights reserved. */ /** * @fileoverview Rule to flag creation of function inside a loop * @author Ilya Volodin * @copyright 2013 Ilya Volodin. All rights reserved. */ /** * @fileoverview Disallow mixed spaces and tabs for indentation * @author Jary Niebur * @copyright 2014 Nicholas C. Zakas. All rights reserved. * @copyright 2014 Jary Niebur. All rights reserved. */ /** * @fileoverview Disallow use of multiple spaces. * @author Nicholas C. Zakas * @copyright 2015 Brandon Mills. All rights reserved. * @copyright 2015 Nicholas C. Zakas. All rights reserved. */ /** * @fileoverview Rule to flag when using multiline strings * @author Ilya Volodin * @copyright 2014 Nicholas C. Zakas. All rights reserved. * @copyright 2013 Ilya Volodin. All rights reserved. */ /** * @fileoverview Disallows multiple blank lines. * implementation adapted from the no-trailing-spaces rule. * @author Greg Cochard * @copyright 2014 Greg Cochard. All rights reserved. */ /** * @fileoverview Disallow reassignment of function parameters. * @author Nat Burns * @copyright 2014 Nat Burns. All rights reserved. */ /** * @fileoverview Disallow the use of process.env() * @author Vignesh Anand * @copyright 2014 Vignesh Anand. All rights reserved. */ /** * @fileoverview Rule to disallow reserved words being used as keys * @author Emil Bay * @copyright 2014 Emil Bay. All rights reserved. */ /** * @fileoverview Disallow shadowing of NaN, undefined, and Infinity (ES5 section 15.1.1) * @author Michael Ficarra * @copyright 2013 Michael Ficarra. All rights reserved. */ /** * @fileoverview Rule to flag on declaring variables already declared in the outer scope * @author Ilya Volodin * @copyright 2013 Ilya Volodin. All rights reserved. */ /** * @fileoverview Rule to disallow whitespace before the semicolon * @author Jonathan Kingston * @copyright 2015 Mathias Schreck * @copyright 2014 Jonathan Kingston */ /** * @fileoverview Rule to restrict what can be thrown as an exception. * @author Dieter Oberkofler * @copyright 2015 Dieter Oberkofler. All rights reserved. */ /** * @fileoverview Disallow trailing spaces at the end of lines. * @author Nodeca Team * @copyright 2015 Greg Cochard */ /** * @fileoverview Rule to flag references to undeclared variables. * @author Mark Macdonald * @copyright 2015 Nicholas C. Zakas. All rights reserved. * @copyright 2013 Mark Macdonald. All rights reserved. */ /** * @fileoverview Rule to flag no-unneeded-ternary * @author Gyandeep Singh * @copyright 2015 Gyandeep Singh. All rights reserved. * @copyright 2015 Michael Ficarra. All rights reserved. */ /** * @fileoverview Flag expressions in statement position that do not side effect * @author Michael Ficarra * @copyright 2013 Michael Ficarra. All rights reserved. */ /** * @fileoverview Rule to flag use of variables before they are defined * @author Ilya Volodin * @copyright 2013 Ilya Volodin. All rights reserved. */ /** * @fileoverview Rule to check for the usage of var. * @author Jamund Ferguson * @copyright 2014 Jamund Ferguson. All rights reserved. */ /** * @fileoverview Rule to disallow use of void operator. * @author Mike Sidorov * @copyright 2014 Mike Sidorov. All rights reserved. */ /** * @fileoverview Rule to flag wrapping non-iife in parens * @author Ilya Volodin * @copyright 2013 Ilya Volodin. All rights reserved. */ /** * @fileoverview Disallows or enforces spaces inside of object literals. * @author Jamund Ferguson * @copyright 2014 Brandyn Bennett. All rights reserved. * @copyright 2014 Michael Ficarra. No rights reserved. * @copyright 2014 Vignesh Anand. All rights reserved. * @copyright 2015 Jamund Ferguson. All rights reserved. */ /** * @fileoverview Rule to enforce concise object methods and properties. * @author Jamund Ferguson * @copyright 2015 Jamund Ferguson. All rights reserved. */ /** * @fileoverview A rule to control the use of single variable declarations. * @author Ian Christian Myers * @copyright 2015 Ian VanSchooten. All rights reserved. * @copyright 2015 Joey Baker. All rights reserved. * @copyright 2015 Danny Fritz. All rights reserved. * @copyright 2013 Ian Christian Myers. All rights reserved. */ /** * @fileoverview Rule to replace assignment expressions with operator assignment * @author Brandon Mills * @copyright 2014 Brandon Mills. All rights reserved. */ /** * @fileoverview Operator linebreak - enforces operator linebreak style of two types: after and before * @author Benoît Zugmeyer * @copyright 2015 Benoît Zugmeyer. All rights reserved. */ /** * @fileoverview A rule to ensure blank lines within blocks. * @author Mathias Schreck * @copyright 2014 Mathias Schreck. All rights reserved. */ /** * @fileoverview A rule to suggest using of const declaration for variables that are never modified after declared. * @author Toru Nagashima * @copyright 2015 Toru Nagashima. All rights reserved. */ /** * @fileoverview Rule to flag non-quoted property names in object literals. * @author Mathias Bynens * @copyright 2014 Brandon Mills. All rights reserved. */ /** * @fileoverview Validates spacing before and after semicolon * @author Mathias Schreck * @copyright 2015 Mathias Schreck */ /** * @fileoverview Rule to enforce consistent spacing after function names * @author Roberto Vidal * @copyright 2014 Roberto Vidal. All rights reserved. */ /** * @fileoverview Rule to enforce the number of spaces after certain keywords * @author Nick Fisher * @copyright 2014 Nick Fisher. All rights reserved. */ /** * @fileoverview A rule to ensure whitespace before blocks. * @author Mathias Schreck * @copyright 2014 Mathias Schreck. All rights reserved. */ /** * @fileoverview Rule to validate spacing before function paren. * @author Mathias Schreck * @copyright 2015 Mathias Schreck */ /** * @fileoverview Rule to validate spacing before function parentheses. * @author Mathias Schreck * @copyright 2015 Mathias Schreck */ /** * @fileoverview Disallows or enforces spaces inside of brackets. * @author Ian Christian Myers * @copyright 2014 Brandyn Bennett. All rights reserved. * @copyright 2014 Michael Ficarra. No rights reserved. * @copyright 2014 Vignesh Anand. All rights reserved. */ /** * @fileoverview Disallows or enforces spaces inside of parentheses. * @author Jonathan Rajavuori * @copyright 2014 David Clark. All rights reserved. * @copyright 2014 Jonathan Rajavuori. All rights reserved. */ /** * @fileoverview This rule shoud require or disallow spaces before or after unary operations. * @author Marcin Kumorek * @copyright 2014 Marcin Kumorek. All rights reserved. */ /** * @fileoverview Source code for spaced-comments rule * @author Gyandeep Singh * @copyright 2015 Gyandeep Singh. All rights reserved. * @copyright 2014 Greg Cochard. All rights reserved. */ /** * @fileoverview Enforces or disallows a space beginning a single-line comment. * @author Greg Cochard * @copyright 2014 Greg Cochard. All rights reserved. */ /** * @fileoverview Rule to control usage of strict mode directives. * @author Brandon Mills * @copyright 2015 Brandon Mills. All rights reserved. * @copyright 2013-2014 Nicholas C. Zakas. All rights reserved. * @copyright 2013 Ian Christian Myers. All rights reserved. */ /** * @fileoverview Rule to flag comparisons to the value NaN * @author James Allardice * @copyright 2014 Jordan Harband. All rights reserved. * @copyright 2013 James Allardice. All rights reserved. */ /** * @fileoverview Validates JSDoc comments are syntactically correct * @author Nicholas C. Zakas * @copyright 2014 Nicholas C. Zakas. All rights reserved. */ /** * @fileoverview Rule to enforce var declarations are only at the top of a function. * @author Danny Fritz * @author Gyandeep Singh * @copyright 2014 Danny Fritz. All rights reserved. * @copyright 2014 Gyandeep Singh. All rights reserved. */ /** * @fileoverview Rule to flag when IIFE is not wrapped in parens * @author Ilya Volodin * @copyright 2013 Ilya Volodin. All rights reserved. */ /** * @fileoverview Rule to require or disallow yoda comparisons * @author Nicholas C. Zakas * @copyright 2014 Nicholas C. Zakas. All rights reserved. * @copyright 2014 Brandon Mills. All rights reserved. */ /** * @fileoverview Tracks performance of individual rules. * @author Brandon Mills * @copyright 2014 Brandon Mills. All rights reserved. */ /** * @fileoverview Object to handle access and retrieval of tokens. * @author Brandon Mills * @copyright 2014 Nicholas C. Zakas. All rights reserved. * @copyright 2014 Brandon Mills. All rights reserved. */ /*! * SAP UI development toolkit for HTML5 (SAPUI5) * * (c) Copyright 2009-2013 SAP SE. All rights reserved */ //--------------------------------------------------------------------- // QRCode for JavaScript // // Copyright (c) 2009 Kazuhiko Arase // // URL: http://www.d-project.com/ // // Licensed under the MIT license: // http://www.opensource.org/licenses/mit-license.php // // The word "QR Code" is registered trademark of // DENSO WAVE INCORPORATED // http://www.denso-wave.com/qrcode/faqpatent-e.html // //--------------------------------------------------------------------- /** * * Base64 encode / decode * http://www.webtoolkit.info/ * This Base64 function is licensed under CC BY 2.0 UK * http://creativecommons.org/licenses/by/2.0/uk/legalcode * **/ /** * Copyright 2015 Craig Campbell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Mousetrap is a simple keyboard shortcut library for Javascript with * no external dependencies * * @version 1.5.3 * @url craig.is/killing/mice */ function QR8bitByte(e){this.mode=QRMode.MODE_8BIT_BYTE,this.data=e}function QRCode(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function QRPolynomial(e,t){if(void 0==e.length)throw new Error(e.length+"/"+t);for(var n=0;n.

',o+=t.getText("i18n","privacy_form_statement_details1"),o+="

",o+=t.getText("i18n","privacy_form_statement_details2"),o+="

";var a=new sap.ui.commons.FormattedTextView({});a.setHtmlText(o),a.addControl(i),a.addStyleClass("privacyFormattedTextView"),this._oAllowTrackingoCheckBox=new sap.ui.commons.CheckBox({text:t.getText("i18n","allow_tracking")}),this._oDialog=new sap.ui.commons.Dialog("PrivacyDialog",{title:t.getText("i18n","privacy_form_title"),content:[a,this._oAllowTrackingoCheckBox],buttons:[n,r],resizable:!1,keepInWindow:!0,modal:!0,width:"30%"})},_savePrivacy:function(){this._oDialog.close();var e=this;return this.context.service.usagemonitoring.report("Privacy","uncheck_usage_tracking",this._oAllowTrackingoCheckBox.getChecked()).then(function(){return e.context.service.preferences.set({allowTracking:e._oAllowTrackingoCheckBox.getChecked()},"UsageAnalytics")})},_closeDialog:function(){this._oDialog.close()},execute:function(e,t){var n=this;return this.context.service.usagemonitoring.report("IDE","Commands",this.context.self._sName).done(),this.context.service.preferences.get("UsageAnalytics").then(function(e){n._oAllowTrackingoCheckBox.setChecked(!0),e&&e.allowTracking===!1&&n._oAllowTrackingoCheckBox.setChecked(!1),n._oDialog.open()})}}}),define("sap.watt.uitools.ide/command/Feedback",[],function(){"use strict";return{execute:function(e,t){var n=t?t:window.open("","Feedback");sap.watt.getEnv("internal")?n.location.href="https://jam4.sapjam.com/groups/about_page/7MFgdXHJVVv2BWC8g0Ubep":n.location.href="http://scn.sap.com/community/developer-center/front-end/content",this.context.service.usagemonitoring.report("IDE","Commands",this.context.self._sName).done()}}}),define("sap.watt.uitools.ide/command/Cloud",[],function(){"use strict";return{execute:function(e,t){var n=t?t:window.open("","Cloud");n.location.href="https://www.sapstore.com/solutions/60009/SAP-Web-IDE",this.context.service.usagemonitoring.report("IDE","Commands",this.context.self._sName).done()}}}),define("sap.watt.uitools.ide/command/SDK",[],function(){"use strict";return{execute:function(e,t){var n=t?t:window.open("","SDK"),r=sap.watt.getEnv("internal")?"int.sap.hana":"hana";n.location.href="https://sdk-sapwebide.dispatcher."+r+".ondemand.com/",this.context.service.usagemonitoring.report("IDE","Commands",this.context.self._sName).done()}}}),define("sap.watt.common.perspective/command/PerspectiveSwitcher",[],function(){"use strict";var e=function(){};return e.prototype=jQuery.extend(e.prototype,{_sPerspective:void 0,_sID:void 0,execute:function(){return this.context.service.perspective.renderPerspective(this._sPerspective)},isAvailable:function(){return!0},isEnabled:function(){var e=this;return this.context.service.perspective.getCurrentPerspective().then(function(t){return t!=e._sPerspective})},isActive:function(){var e=this;return this.context.service.perspective.getCurrentPerspective().then(function(t){return t==e._sPerspective})},configure:function(e){this._sPerspective=e.perspective,this._sID=e.id}}),e}),define("sap/watt/platform/plugin/platform/service/ui/AbstractPart",[],function(){"use strict";var e=sap.ui.base.Object.extend("sap.watt.common.plugin.platform.service.ui.AbstractPart",{_bVisible:null,_aStyles:null});return e.prototype.configure=function(e){return this._aStyles=e.styles,Q()},e.prototype.getTitle=function(){return this.getMetadata().getName()},e.prototype.getTooltip=function(){return this.getMetadata().getName()},e.prototype.getFocusElement=function(){return this.getContent()},e.prototype.focus=function(){return this.context.service.focus.setFocus(this.context.self)},e.prototype.getContent=function(){return this._aStyles?this.context.service.resource.includeStyles(this._aStyles).thenResolve(null):Q()},e.prototype.setVisible=function(e){var t=this;return this._bVisible!==e?(t._bVisible=e,this.context.event.fireVisibilityChanged({visible:e}).fail(function(e){console.error("AbstractUIPart: Error on firing visibilityChanged event ",e)})):Q()},e.prototype.isVisible=function(){return!!this._bVisible},e}),define("sap/watt/platform/plugin/platform/service/ui/AbstractEditor",["sap/watt/platform/plugin/platform/service/ui/AbstractPart"],function(e){"use strict";var t=e.extend("sap.watt.common.plugin.platform.service.ui.AbstractEditor",{constructor:function(){this._oDocument=null},getSelection:function(){return{document:this._oDocument}},getState:function(){return null},open:function(e){this._oDocument=e},isRestorable:function(){return!0},isAvailable:function(){return!0},close:function(){return this.context.event.fireClosed({document:this._oDocument})},getTitleForDocument:function(e){return e.getEntity().getName()},getTooltipForDocument:function(e){return e.getEntity().getFullPath()}});return t}),function(){function e(e,t){return e.set(t[0],t[1]),e}function t(e,t){return e.add(t),e}function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function r(e,t,n,r){for(var i=-1,o=e?e.length:0;++i-1}function c(e,t,n){for(var r=-1,i=e?e.length:0;++r-1;);return n}function N(e,t){for(var n=e.length;n--&&x(t,e[n],0)>-1;);return n}function j(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}function R(e){return"\\"+Un[e]}function L(e,t){return null==e?Z:e[t]}function M(e){return In.test(e)}function B(e){return Fn.test(e)}function U(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function V(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function G(e,t){return function(n){return e(t(n))}}function W(e,t){for(var n=-1,r=e.length,i=0,o=[];++n>>1,Oe=[["ary",he],["bind",se],["bindKey",ue],["curry",le],["curryRight",pe],["flip",ge],["partial",fe],["partialRight",de],["rearg",me]],Ne="[object Arguments]",je="[object Array]",Re="[object Boolean]",Le="[object Date]",Me="[object Error]",Be="[object Function]",Ue="[object GeneratorFunction]",Ve="[object Map]",Ge="[object Number]",We="[object Object]",Qe="[object Promise]",He="[object Proxy]",ze="[object RegExp]",qe="[object Set]",$e="[object String]",Xe="[object Symbol]",Ke="[object WeakMap]",Je="[object WeakSet]",Ye="[object ArrayBuffer]",Ze="[object DataView]",et="[object Float32Array]",tt="[object Float64Array]",nt="[object Int8Array]",rt="[object Int16Array]",it="[object Int32Array]",ot="[object Uint8Array]",at="[object Uint8ClampedArray]",st="[object Uint16Array]",ut="[object Uint32Array]",ct=/\b__p \+= '';/g,lt=/\b(__p \+=) '' \+/g,pt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ft=/&(?:amp|lt|gt|quot|#39);/g,dt=/[&<>"']/g,ht=RegExp(ft.source),mt=RegExp(dt.source),gt=/<%-([\s\S]+?)%>/g,vt=/<%([\s\S]+?)%>/g,yt=/<%=([\s\S]+?)%>/g,xt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bt=/^\w*$/,_t=/^\./,wt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Et=/[\\^$.*+?()[\]{}|]/g,St=RegExp(Et.source),Ct=/^\s+|\s+$/g,Tt=/^\s+/,Dt=/\s+$/,At=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Pt=/\{\n\/\* \[wrapped with (.+)\] \*/,kt=/,? & /,It=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ft=/\\(\\)?/g,Ot=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nt=/\w*$/,jt=/^[-+]0x[0-9a-f]+$/i,Rt=/^0b[01]+$/i,Lt=/^\[object .+?Constructor\]$/,Mt=/^0o[0-7]+$/i,Bt=/^(?:0|[1-9]\d*)$/,Ut=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Vt=/($^)/,Gt=/['\n\r\u2028\u2029\\]/g,Wt="\\ud800-\\udfff",Qt="\\u0300-\\u036f\\ufe20-\\ufe23",Ht="\\u20d0-\\u20f0",zt="\\u2700-\\u27bf",qt="a-z\\xdf-\\xf6\\xf8-\\xff",$t="\\xac\\xb1\\xd7\\xf7",Xt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Kt="\\u2000-\\u206f",Jt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Yt="A-Z\\xc0-\\xd6\\xd8-\\xde",Zt="\\ufe0e\\ufe0f",en=$t+Xt+Kt+Jt,tn="['’]",nn="["+Wt+"]",rn="["+en+"]",on="["+Qt+Ht+"]",an="\\d+",sn="["+zt+"]",un="["+qt+"]",cn="[^"+Wt+en+an+zt+qt+Yt+"]",ln="\\ud83c[\\udffb-\\udfff]",pn="(?:"+on+"|"+ln+")",fn="[^"+Wt+"]",dn="(?:\\ud83c[\\udde6-\\uddff]){2}",hn="[\\ud800-\\udbff][\\udc00-\\udfff]",mn="["+Yt+"]",gn="\\u200d",vn="(?:"+un+"|"+cn+")",yn="(?:"+mn+"|"+cn+")",xn="(?:"+tn+"(?:d|ll|m|re|s|t|ve))?",bn="(?:"+tn+"(?:D|LL|M|RE|S|T|VE))?",_n=pn+"?",wn="["+Zt+"]?",En="(?:"+gn+"(?:"+[fn,dn,hn].join("|")+")"+wn+_n+")*",Sn=wn+_n+En,Cn="(?:"+[sn,dn,hn].join("|")+")"+Sn,Tn="(?:"+[fn+on+"?",on,dn,hn,nn].join("|")+")",Dn=RegExp(tn,"g"),An=RegExp(on,"g"),Pn=RegExp(ln+"(?="+ln+")|"+Tn+Sn,"g"),kn=RegExp([mn+"?"+un+"+"+xn+"(?="+[rn,mn,"$"].join("|")+")",yn+"+"+bn+"(?="+[rn,mn+vn,"$"].join("|")+")",mn+"?"+vn+"+"+xn,mn+"+"+bn,an,Cn].join("|"),"g"),In=RegExp("["+gn+Wt+Qt+Ht+Zt+"]"),Fn=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,On=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nn=-1,jn={};jn[et]=jn[tt]=jn[nt]=jn[rt]=jn[it]=jn[ot]=jn[at]=jn[st]=jn[ut]=!0,jn[Ne]=jn[je]=jn[Ye]=jn[Re]=jn[Ze]=jn[Le]=jn[Me]=jn[Be]=jn[Ve]=jn[Ge]=jn[We]=jn[ze]=jn[qe]=jn[$e]=jn[Ke]=!1;var Rn={};Rn[Ne]=Rn[je]=Rn[Ye]=Rn[Ze]=Rn[Re]=Rn[Le]=Rn[et]=Rn[tt]=Rn[nt]=Rn[rt]=Rn[it]=Rn[Ve]=Rn[Ge]=Rn[We]=Rn[ze]=Rn[qe]=Rn[$e]=Rn[Xe]=Rn[ot]=Rn[at]=Rn[st]=Rn[ut]=!0,Rn[Me]=Rn[Be]=Rn[Ke]=!1;var Ln={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Mn={"&":"&","<":"<",">":">",'"':""","'":"'"},Bn={"&":"&","<":"<",">":">",""":'"',"'":"'"},Un={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vn=parseFloat,Gn=parseInt,Wn="object"==typeof global&&global&&global.Object===Object&&global,Qn="object"==typeof self&&self&&self.Object===Object&&self,Hn=Wn||Qn||Function("return this")(),zn="object"==typeof exports&&exports&&!exports.nodeType&&exports,qn=zn&&"object"==typeof module&&module&&!module.nodeType&&module,$n=qn&&qn.exports===zn,Xn=$n&&Wn.process,Kn=function(){try{return Xn&&Xn.binding("util")}catch(e){}}(),Jn=Kn&&Kn.isArrayBuffer,Yn=Kn&&Kn.isDate,Zn=Kn&&Kn.isMap,er=Kn&&Kn.isRegExp,tr=Kn&&Kn.isSet,nr=Kn&&Kn.isTypedArray,rr=E("length"),ir=S(Ln),or=S(Mn),ar=S(Bn),sr=function m(S){function z(e){if(Js(e)&&!uf(e)&&!(e instanceof It)){if(e instanceof J)return e;if(cl.call(e,"__wrapped__"))return $o(e)}return new J(e)}function K(){}function J(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=Z}function It(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ke,this.__views__=[]}function Wt(){var e=new It(this.__wrapped__);return e.__actions__=Oi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Oi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Oi(this.__views__),e}function Qt(){if(this.__filtered__){var e=new It(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Ht(){var e=this.__wrapped__.value(),t=this.__dir__,n=uf(e),r=t<0,i=n?e.length:0,o=yo(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,p=l.length,f=0,d=Ll(u,this.__takeCount__);if(!n||i-1}function rn(e,t){var n=this.__data__,r=Pn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function on(e){var t=-1,n=e?e.length:0;for(this.clear();++t=t?e:t)),e}function Bn(e,t,n,r,o,a,s){var u;if(r&&(u=a?r(e,o,a,s):r(e)),u!==Z)return u;if(!Ks(e))return e;var c=uf(e);if(c){if(u=_o(e),!t)return Oi(e,u)}else{var l=vp(e),p=l==Be||l==Ue;if(lf(e))return _i(e,t);if(l==We||l==Ne||p&&!a){if(u=wo(p?{}:e),!t)return ji(e,In(u,e))}else{if(!Rn[l])return a?e:{};u=Eo(e,l,Bn,t)}}s||(s=new hn);var f=s.get(e);if(f)return f;s.set(e,u);var d=c?Z:(n?co:Fu)(e);return i(d||e,function(i,o){d&&(o=i,i=e[o]),Tn(u,o,Bn(i,t,n,r,o,e,s))}),u}function Un(e){var t=Fu(e);return function(n){return Wn(n,e,t)}}function Wn(e,t,n){var r=n.length;if(null==e)return!r;for(e=Zc(e);r--;){var i=n[r],o=t[i],a=e[i];if(a===Z&&!(i in e)||!o(a))return!1}return!0}function Qn(e,t,n){if("function"!=typeof e)throw new nl(re);return bp(function(){e.apply(Z,n)},t)}function zn(e,t,n,r){var i=-1,o=u,a=!0,s=e.length,p=[],f=t.length;if(!s)return p;n&&(t=l(t,k(n))),r?(o=c,a=!1):t.length>=te&&(o=F,a=!1,t=new pn(t));e:for(;++ii?0:i+n),r=r===Z||r>i?i:hu(r),r<0&&(r+=i),r=n>r?0:mu(r);n0&&n(s)?t>1?sr(s,t-1,n,r,i):p(i,s):r||(i[i.length]=s)}return i}function cr(e,t){return e&&sp(e,t,Fu)}function lr(e,t){return e&&up(e,t,Fu)}function pr(e,t){return s(t,function(t){return qs(e[t])})}function fr(e,t){t=Ao(t,e)?[t]:xi(t);for(var n=0,r=t.length;null!=e&&nt}function gr(e,t){return null!=e&&cl.call(e,t)}function vr(e,t){return null!=e&&t in Zc(e)}function yr(e,t,n){return e>=Ll(t,n)&&e=120&&d.length>=120)?new pn(a&&d):Z}d=e[0];var h=-1,m=s[0];e:for(;++h-1;)s!==e&&El.call(s,u,1),El.call(e,u,1);return e}function $r(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;if(To(i))El.call(e,i,1);else if(Ao(i,e))delete e[Ho(i)];else{var a=xi(i),s=Uo(e,a);null!=s&&delete s[Ho(da(a))]}}}return e}function Xr(e,t){return e+kl(Ul()*(t-e+1))}function Kr(e,t,n,r){for(var i=-1,o=Rl(Pl((t-e)/(n||1)),0),a=$c(o);o--;)a[r?o:++i]=e,e+=n;return a}function Jr(e,t){var n="";if(!e||t<1||t>De)return n;do t%2&&(n+=e),t=kl(t/2),t&&(e+=e);while(t);return n}function Yr(e,t){return _p(Bo(e,t,wc),e+"")}function Zr(e){return _n(Hu(e))}function ei(e,t){var n=Hu(e);return Qo(n,Mn(t,0,n.length))}function ti(e,t,n,r){if(!Ks(e))return e;t=Ao(t,e)?[t]:xi(t);for(var i=-1,o=t.length,a=o-1,s=e;null!=s&&++ii?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=$c(i);++r>>1,a=e[o];null!==a&&!uu(a)&&(n?a<=t:a=te){var p=t?null:dp(e);if(p)return Q(p);a=!1,i=F,l=new pn}else l=t?[]:s;e:for(;++r=r?e:ri(e,t,n)}function _i(e,t){if(t)return e.slice();var n=e.length,r=yl?yl(n):new e.constructor(n);return e.copy(r),r}function wi(e){var t=new e.constructor(e.byteLength);return new vl(t).set(new vl(e)),t}function Ei(e,t){var n=t?wi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Si(t,n,r){var i=n?r(V(t),!0):V(t);return f(i,e,new t.constructor)}function Ci(e){var t=new e.constructor(e.source,Nt.exec(e));return t.lastIndex=e.lastIndex,t}function Ti(e,n,r){var i=n?r(Q(e),!0):Q(e);return f(i,t,new e.constructor)}function Di(e){return np?Zc(np.call(e)):{}}function Ai(e,t){var n=t?wi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Pi(e,t){if(e!==t){var n=e!==Z,r=null===e,i=e===e,o=uu(e),a=t!==Z,s=null===t,u=t===t,c=uu(t);if(!s&&!c&&!o&&e>t||o&&a&&u&&!s&&!c||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!c&&e=s)return u;var c=n[r];return u*("desc"==c?-1:1)}}return e.index-t.index}function Ii(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,u=t.length,c=Rl(o-a,0),l=$c(u+c),p=!r;++s1?n[i-1]:Z,a=i>2?n[2]:Z;for(o=e.length>3&&"function"==typeof o?(i--,o):Z,a&&Do(n[0],n[1],a)&&(o=i<3?Z:o,i=1),t=Zc(t);++r-1?i[o?t[a]:a]:Z}}function zi(e){return uo(function(t){var n=t.length,r=n,i=J.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new nl(re);if(i&&!a&&"wrapper"==po(o))var a=new J([],!0)}for(r=a?r:n;++r=te)return a.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i1&&y.reverse(),p&&us))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var l=-1,p=!0,f=i&ve?new pn:Z;for(o.set(e,t),o.set(t,e);++l1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(At,"{\n/* [wrapped with "+t+"] */\n")}function Co(e){return uf(e)||sf(e)||!!(Sl&&e&&e[Sl])}function To(e,t){return t=null==t?De:t,!!t&&("number"==typeof e||Bt.test(e))&&e>-1&&e%1==0&&e0){if(++t>=_e)return arguments[0]}else t=0;return e.apply(Z,arguments)}}function Qo(e,t){var n=-1,r=e.length,i=r-1;for(t=t===Z?r:t;++n=this.__values__.length,t=e?Z:this.__values__[this.__index__++];return{done:e,value:t}}function $a(){return this}function Xa(e){for(var t,n=this;n instanceof K;){var r=$o(n);r.__index__=0,r.__values__=Z,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t}function Ka(){var e=this.__wrapped__;if(e instanceof It){var t=e;return this.__actions__.length&&(t=new It(this)),t=t.reverse(),t.__actions__.push({func:Qa,args:[ba],thisArg:Z}),new J(t,this.__chain__)}return this.thru(ba)}function Ja(){return hi(this.__wrapped__,this.__actions__)}function Ya(e,t,n){var r=uf(e)?a:qn;return n&&Do(e,t,n)&&(t=Z),r(e,ho(t,3))}function Za(e,t){var n=uf(e)?s:rr;return n(e,ho(t,3))}function es(e,t){return sr(as(e,t),1)}function ts(e,t){return sr(as(e,t),Te)}function ns(e,t,n){return n=n===Z?1:hu(n),sr(as(e,t),n)}function rs(e,t){var n=uf(e)?i:op;return n(e,ho(t,3))}function is(e,t){var n=uf(e)?o:ap;return n(e,ho(t,3))}function os(e,t,n,r){e=Ms(e)?e:Hu(e),n=n&&!r?hu(n):0;var i=e.length;return n<0&&(n=Rl(i+n,0)),su(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&x(e,t,n)>-1}function as(e,t){var n=uf(e)?l:Lr;return n(e,ho(t,3))}function ss(e,t,n,r){return null==e?[]:(uf(t)||(t=null==t?[]:[t]),n=r?Z:n,uf(n)||(n=null==n?[]:[n]),Wr(e,t,n))}function us(e,t,n){var r=uf(e)?f:C,i=arguments.length<3;return r(e,ho(t,4),n,i,op)}function cs(e,t,n){var r=uf(e)?d:C,i=arguments.length<3;return r(e,ho(t,4),n,i,ap)}function ls(e,t){var n=uf(e)?s:rr;return n(e,Ss(ho(t,3)))}function ps(e){var t=uf(e)?_n:Zr;return t(e)}function fs(e,t,n){t=(n?Do(e,t,n):t===Z)?1:hu(t);var r=uf(e)?wn:ei;return r(e,t)}function ds(e){var t=uf(e)?En:ni;return t(e)}function hs(e){if(null==e)return 0;if(Ms(e))return su(e)?$(e):e.length;var t=vp(e);return t==Ve||t==qe?e.size:Nr(e).length}function ms(e,t,n){var r=uf(e)?h:ii;return n&&Do(e,t,n)&&(t=Z),r(e,ho(t,3))}function gs(e,t){if("function"!=typeof t)throw new nl(re);return e=hu(e),function(){if(--e<1)return t.apply(this,arguments)}}function vs(e,t,n){return t=n?Z:t,t=e&&null==t?e.length:t,io(e,he,Z,Z,Z,Z,t)}function ys(e,t){var n;if("function"!=typeof t)throw new nl(re);return e=hu(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=Z),n}}function xs(e,t,n){t=n?Z:t;var r=io(e,le,Z,Z,Z,Z,Z,t);return r.placeholder=xs.placeholder,r}function bs(e,t,n){t=n?Z:t;var r=io(e,pe,Z,Z,Z,Z,Z,t);return r.placeholder=bs.placeholder,r}function _s(e,t,n){function r(t){var n=f,r=d;return f=d=Z,y=t,m=e.apply(r,n)}function i(e){return y=e,g=bp(s,t),x?r(e):m}function o(e){var n=e-v,r=e-y,i=t-n;return b?Ll(i,h-r):i}function a(e){var n=e-v,r=e-y;return v===Z||n>=t||n<0||b&&r>=h}function s(){var e=Xp();return a(e)?u(e):void(g=bp(s,o(e)))}function u(e){return g=Z,_&&f?r(e):(f=d=Z,m)}function c(){g!==Z&&fp(g),y=0,f=v=d=g=Z}function l(){return g===Z?m:u(Xp())}function p(){var e=Xp(),n=a(e);if(f=arguments,d=this,v=e,n){if(g===Z)return i(v);if(b)return g=bp(s,t),r(v)}return g===Z&&(g=bp(s,t)),m}var f,d,h,m,g,v,y=0,x=!1,b=!1,_=!0;if("function"!=typeof e)throw new nl(re);return t=gu(t)||0,Ks(n)&&(x=!!n.leading,b="maxWait"in n,h=b?Rl(gu(n.maxWait)||0,t):h,_="trailing"in n?!!n.trailing:_),p.cancel=c,p.flush=l,p}function ws(e){return io(e,ge)}function Es(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new nl(re);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Es.Cache||on),n}function Ss(e){if("function"!=typeof e)throw new nl(re);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Cs(e){return ys(2,e)}function Ts(e,t){if("function"!=typeof e)throw new nl(re);return t=t===Z?t:hu(t),Yr(e,t)}function Ds(e,t){if("function"!=typeof e)throw new nl(re);return t=t===Z?0:Rl(hu(t),0),Yr(function(r){var i=r[t],o=bi(r,0,t);return i&&p(o,i),n(e,this,o)})}function As(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new nl(re);return Ks(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),_s(e,t,{leading:r,maxWait:t,trailing:i})}function Ps(e){return vs(e,1)}function ks(e,t){return t=null==t?wc:t,tf(t,e)}function Is(){if(!arguments.length)return[];var e=arguments[0];return uf(e)?e:[e]}function Fs(e){return Bn(e,!1,!0)}function Os(e,t){return Bn(e,!1,!0,t)}function Ns(e){return Bn(e,!0,!0)}function js(e,t){return Bn(e,!0,!0,t)}function Rs(e,t){return null==t||Wn(e,t,Fu(t))}function Ls(e,t){return e===t||e!==e&&t!==t}function Ms(e){return null!=e&&Xs(e.length)&&!qs(e)}function Bs(e){return Js(e)&&Ms(e)}function Us(e){return e===!0||e===!1||Js(e)&&fl.call(e)==Re}function Vs(e){return null!=e&&1===e.nodeType&&Js(e)&&!ou(e)}function Gs(e){if(Ms(e)&&(uf(e)||"string"==typeof e||"function"==typeof e.splice||lf(e)||mf(e)||sf(e)))return!e.length;var t=vp(e);if(t==Ve||t==qe)return!e.size;if(Fo(e))return!Nr(e).length;for(var n in e)if(cl.call(e,n))return!1;return!0}function Ws(e,t){return Cr(e,t)}function Qs(e,t,n){n="function"==typeof n?n:Z;var r=n?n(e,t):Z;return r===Z?Cr(e,t,n):!!r}function Hs(e){return!!Js(e)&&(fl.call(e)==Me||"string"==typeof e.message&&"string"==typeof e.name)}function zs(e){return"number"==typeof e&&Ol(e)}function qs(e){var t=Ks(e)?fl.call(e):"";return t==Be||t==Ue||t==He}function $s(e){return"number"==typeof e&&e==hu(e)}function Xs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=De}function Ks(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Js(e){return null!=e&&"object"==typeof e}function Ys(e,t){return e===t||Ar(e,t,go(t))}function Zs(e,t,n){return n="function"==typeof n?n:Z,Ar(e,t,go(t),n)}function eu(e){return iu(e)&&e!=+e}function tu(e){if(yp(e))throw new Kc(ne);return Pr(e)}function nu(e){return null===e}function ru(e){return null==e}function iu(e){return"number"==typeof e||Js(e)&&fl.call(e)==Ge}function ou(e){if(!Js(e)||fl.call(e)!=We)return!1;var t=xl(e);if(null===t)return!0;var n=cl.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ul.call(n)==pl}function au(e){return $s(e)&&e>=-De&&e<=De}function su(e){return"string"==typeof e||!uf(e)&&Js(e)&&fl.call(e)==$e}function uu(e){return"symbol"==typeof e||Js(e)&&fl.call(e)==Xe}function cu(e){return e===Z}function lu(e){return Js(e)&&vp(e)==Ke}function pu(e){return Js(e)&&fl.call(e)==Je}function fu(e){if(!e)return[];if(Ms(e))return su(e)?X(e):Oi(e);if(bl&&e[bl])return U(e[bl]());var t=vp(e),n=t==Ve?V:t==qe?Q:Hu;return n(e)}function du(e){if(!e)return 0===e?e:0;if(e=gu(e),e===Te||e===-Te){var t=e<0?-1:1;return t*Ae}return e===e?e:0}function hu(e){var t=du(e),n=t%1;return t===t?n?t-n:t:0}function mu(e){return e?Mn(hu(e),0,ke):0}function gu(e){if("number"==typeof e)return e;if(uu(e))return Pe;if(Ks(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ks(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Ct,"");var n=Rt.test(e);return n||Mt.test(e)?Gn(e.slice(2),n?2:8):jt.test(e)?Pe:+e}function vu(e){return Ni(e,Ou(e))}function yu(e){return Mn(hu(e),-De,De)}function xu(e){return null==e?"":ci(e)}function bu(e,t){var n=ip(e);return t?In(n,t):n}function _u(e,t){return v(e,ho(t,3),cr)}function wu(e,t){return v(e,ho(t,3),lr)}function Eu(e,t){return null==e?e:sp(e,ho(t,3),Ou)}function Su(e,t){return null==e?e:up(e,ho(t,3),Ou)}function Cu(e,t){return e&&cr(e,ho(t,3))}function Tu(e,t){return e&&lr(e,ho(t,3))}function Du(e){return null==e?[]:pr(e,Fu(e))}function Au(e){return null==e?[]:pr(e,Ou(e))}function Pu(e,t,n){var r=null==e?Z:fr(e,t);return r===Z?n:r}function ku(e,t){return null!=e&&bo(e,t,gr)}function Iu(e,t){return null!=e&&bo(e,t,vr)}function Fu(e){return Ms(e)?bn(e):Nr(e)}function Ou(e){return Ms(e)?bn(e,!0):jr(e)}function Nu(e,t){var n={};return t=ho(t,3),cr(e,function(e,r,i){Fn(n,t(e,r,i),e)}),n}function ju(e,t){var n={};return t=ho(t,3),cr(e,function(e,r,i){Fn(n,r,t(e,r,i))}),n}function Ru(e,t){return Lu(e,Ss(ho(t)))}function Lu(e,t){return null==e?{}:Hr(e,lo(e),ho(t))}function Mu(e,t,n){t=Ao(t,e)?[t]:xi(t);var r=-1,i=t.length;for(i||(e=Z,i=1);++rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Ul();return Ll(e+i*(t-e+Vn("1e-"+((i+"").length-1))),t)}return Xr(e,t)}function Ku(e){return Vf(xu(e).toLowerCase())}function Ju(e){return e=xu(e),e&&e.replace(Ut,ir).replace(An,"")}function Yu(e,t,n){e=xu(e),t=ci(t);var r=e.length;n=n===Z?r:Mn(hu(n),0,r);var i=n;return n-=t.length,n>=0&&e.slice(n,i)==t}function Zu(e){return e=xu(e),e&&mt.test(e)?e.replace(dt,or):e}function ec(e){return e=xu(e),e&&St.test(e)?e.replace(Et,"\\$&"):e}function tc(e,t,n){e=xu(e),t=hu(t);var r=t?$(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ji(kl(i),n)+e+Ji(Pl(i),n)}function nc(e,t,n){e=xu(e),t=hu(t);var r=t?$(e):0;return t&&r>>0)?(e=xu(e),e&&("string"==typeof t||null!=t&&!df(t))&&(t=ci(t),!t&&M(e))?bi(X(e),0,n):e.split(t,n)):[]}function uc(e,t,n){return e=xu(e),n=Mn(hu(n),0,e.length),t=ci(t),e.slice(n,n+t.length)==t}function cc(e,t,n){var r=z.templateSettings;n&&Do(e,t,n)&&(t=Z),e=xu(e),t=bf({},t,r,Sn);var i,o,a=bf({},t.imports,r.imports,Sn),s=Fu(a),u=I(a,s),c=0,l=t.interpolate||Vt,p="__p += '",f=el((t.escape||Vt).source+"|"+l.source+"|"+(l===yt?Ot:Vt).source+"|"+(t.evaluate||Vt).source+"|$","g"),d="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++Nn+"]")+"\n";e.replace(f,function(t,n,r,a,s,u){return r||(r=a),p+=e.slice(c,u).replace(Gt,R),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),s&&(o=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t}),p+="';\n";var h=t.variable;h||(p="with (obj) {\n"+p+"\n}\n"),p=(o?p.replace(ct,""):p).replace(lt,"$1").replace(pt,"$1;"),p="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var m=Gf(function(){return Jc(s,d+"return "+p).apply(Z,u)});if(m.source=p,Hs(m))throw m;return m}function lc(e){return xu(e).toLowerCase()}function pc(e){return xu(e).toUpperCase()}function fc(e,t,n){if(e=xu(e),e&&(n||t===Z))return e.replace(Ct,"");if(!e||!(t=ci(t)))return e;var r=X(e),i=X(t),o=O(r,i),a=N(r,i)+1;return bi(r,o,a).join("")}function dc(e,t,n){if(e=xu(e),e&&(n||t===Z))return e.replace(Dt,"");if(!e||!(t=ci(t)))return e;var r=X(e),i=N(r,X(t))+1;return bi(r,0,i).join("")}function hc(e,t,n){if(e=xu(e),e&&(n||t===Z))return e.replace(Tt,"");if(!e||!(t=ci(t)))return e;var r=X(e),i=O(r,X(t));return bi(r,i).join("")}function mc(e,t){var n=xe,r=be;if(Ks(t)){var i="separator"in t?t.separator:i;n="length"in t?hu(t.length):n,r="omission"in t?ci(t.omission):r}e=xu(e);var o=e.length;if(M(e)){var a=X(e);o=a.length}if(n>=o)return e;var s=n-$(r);if(s<1)return r;var u=a?bi(a,0,s).join(""):e.slice(0,s);if(i===Z)return u+r;if(a&&(s+=u.length-s),df(i)){if(e.slice(s).search(i)){var c,l=u;for(i.global||(i=el(i.source,xu(Nt.exec(i))+"g")),i.lastIndex=0;c=i.exec(l);)var p=c.index;u=u.slice(0,p===Z?s:p)}}else if(e.indexOf(ci(i),s)!=s){var f=u.lastIndexOf(i);f>-1&&(u=u.slice(0,f))}return u+r}function gc(e){return e=xu(e),e&&ht.test(e)?e.replace(ft,ar):e}function vc(e,t,n){return e=xu(e),t=n?Z:t,t===Z?B(e)?Y(e):g(e):e.match(t)||[]}function yc(e){var t=e?e.length:0,r=ho();return e=t?l(e,function(e){if("function"!=typeof e[1])throw new nl(re);return[r(e[0]),e[1]]}):[],Yr(function(r){for(var i=-1;++iDe)return[];var n=ke,r=Ll(e,ke);t=ho(t),e-=ke;for(var i=A(r,t);++n1?e[t-1]:Z;return n="function"==typeof n?(e.pop(),n):Z,Ba(e,n)}),Up=uo(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Ln(t,e)};return!(t>1||this.__actions__.length)&&r instanceof It&&To(n)?(r=r.slice(n,+n+(t?1:0)),r.__actions__.push({func:Qa,args:[i],thisArg:Z}),new J(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(Z),e})):this.thru(i)}),Vp=Ri(function(e,t,n){cl.call(e,n)?++e[n]:Fn(e,n,1)}),Gp=Hi(ra),Wp=Hi(ia),Qp=Ri(function(e,t,n){cl.call(e,n)?e[n].push(t):Fn(e,n,[t])}),Hp=Yr(function(e,t,r){var i=-1,o="function"==typeof t,a=Ao(t),s=Ms(e)?$c(e.length):[];return op(e,function(e){var u=o?t:a&&null!=e?e[t]:Z;s[++i]=u?n(u,e,r):_r(e,t,r)}),s}),zp=Ri(function(e,t,n){Fn(e,n,t)}),qp=Ri(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),$p=Yr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Do(e,t[0],t[1])?t=[]:n>2&&Do(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,sr(t,1),[])}),Xp=Dl||function(){return Hn.Date.now()},Kp=Yr(function(e,t,n){var r=se;if(n.length){var i=W(n,fo(Kp));r|=fe}return io(e,r,t,n,i)}),Jp=Yr(function(e,t,n){var r=se|ue;if(n.length){var i=W(n,fo(Jp));r|=fe}return io(t,r,e,n,i)}),Yp=Yr(function(e,t){return Qn(e,1,t)}),Zp=Yr(function(e,t,n){return Qn(e,gu(t)||0,n)});Es.Cache=on;var ef=pp(function(e,t){t=1==t.length&&uf(t[0])?l(t[0],k(ho())):l(sr(t,1),k(ho()));var r=t.length;return Yr(function(i){for(var o=-1,a=Ll(i.length,r);++o=t}),sf=wr(function(){return arguments}())?wr:function(e){return Js(e)&&cl.call(e,"callee")&&!wl.call(e,"callee")},uf=$c.isArray,cf=Jn?k(Jn):Er,lf=Fl||Oc,pf=Yn?k(Yn):Sr,ff=Zn?k(Zn):Dr,df=er?k(er):kr,hf=tr?k(tr):Ir,mf=nr?k(nr):Fr,gf=eo(Rr),vf=eo(function(e,t){return e<=t}),yf=Li(function(e,t){if(Fo(t)||Ms(t))return void Ni(t,Fu(t),e);for(var n in t)cl.call(t,n)&&Tn(e,n,t[n])}),xf=Li(function(e,t){Ni(t,Ou(t),e)}),bf=Li(function(e,t,n,r){Ni(t,Ou(t),e,r)}),_f=Li(function(e,t,n,r){Ni(t,Fu(t),e,r)}),wf=uo(Ln),Ef=Yr(function(e){return e.push(Z,Sn),n(bf,Z,e)}),Sf=Yr(function(e){return e.push(Z,Lo),n(Pf,Z,e)}),Cf=$i(function(e,t,n){e[t]=n},bc(wc)),Tf=$i(function(e,t,n){cl.call(e,t)?e[t].push(n):e[t]=[n]},ho),Df=Yr(_r),Af=Li(function(e,t,n){Ur(e,t,n)}),Pf=Li(function(e,t,n,r){Ur(e,t,n,r)}),kf=uo(function(e,t){return null==e?{}:(t=l(t,Ho),Qr(e,zn(lo(e),t)))}),If=uo(function(e,t){return null==e?{}:Qr(e,l(t,Ho))}),Ff=ro(Fu),Of=ro(Ou),Nf=Gi(function(e,t,n){return t=t.toLowerCase(),e+(n?Ku(t):t)}),jf=Gi(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Rf=Gi(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Lf=Vi("toLowerCase"),Mf=Gi(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Bf=Gi(function(e,t,n){return e+(n?" ":"")+Vf(t)}),Uf=Gi(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Vf=Vi("toUpperCase"),Gf=Yr(function(e,t){try{return n(e,Z,t)}catch(e){return Hs(e)?e:new Kc(e)}}),Wf=uo(function(e,t){return i(t,function(t){t=Ho(t),Fn(e,t,Kp(e[t],e))}),e}),Qf=zi(),Hf=zi(!0),zf=Yr(function(e,t){return function(n){return _r(n,e,t)}}),qf=Yr(function(e,t){return function(n){return _r(e,n,t)}}),$f=Ki(l),Xf=Ki(a),Kf=Ki(h),Jf=Zi(),Yf=Zi(!0),Zf=Xi(function(e,t){return e+t},0),ed=no("ceil"),td=Xi(function(e,t){return e/t},1),nd=no("floor"),rd=Xi(function(e,t){return e*t},1),id=no("round"),od=Xi(function(e,t){return e-t},0);return z.after=gs,z.ary=vs,z.assign=yf,z.assignIn=xf,z.assignInWith=bf,z.assignWith=_f,z.at=wf,z.before=ys,z.bind=Kp,z.bindAll=Wf,z.bindKey=Jp,z.castArray=Is,z.chain=Ga,z.chunk=Xo,z.compact=Ko,z.concat=Jo,z.cond=yc,z.conforms=xc,z.constant=bc,z.countBy=Vp,z.create=bu,z.curry=xs,z.curryRight=bs,z.debounce=_s,z.defaults=Ef,z.defaultsDeep=Sf,z.defer=Yp,z.delay=Zp,z.difference=Ep,z.differenceBy=Sp,z.differenceWith=Cp,z.drop=Yo,z.dropRight=Zo,z.dropRightWhile=ea,z.dropWhile=ta,z.fill=na,z.filter=Za,z.flatMap=es,z.flatMapDeep=ts,z.flatMapDepth=ns,z.flatten=oa,z.flattenDeep=aa,z.flattenDepth=sa,z.flip=ws,z.flow=Qf,z.flowRight=Hf,z.fromPairs=ua,z.functions=Du,z.functionsIn=Au,z.groupBy=Qp,z.initial=pa,z.intersection=Tp,z.intersectionBy=Dp,z.intersectionWith=Ap,z.invert=Cf,z.invertBy=Tf,z.invokeMap=Hp,z.iteratee=Ec,z.keyBy=zp,z.keys=Fu,z.keysIn=Ou,z.map=as,z.mapKeys=Nu,z.mapValues=ju,z.matches=Sc,z.matchesProperty=Cc,z.memoize=Es,z.merge=Af,z.mergeWith=Pf,z.method=zf,z.methodOf=qf,z.mixin=Tc,z.negate=Ss,z.nthArg=Pc,z.omit=kf,z.omitBy=Ru,z.once=Cs,z.orderBy=ss,z.over=$f,z.overArgs=ef,z.overEvery=Xf,z.overSome=Kf,z.partial=tf,z.partialRight=nf,z.partition=qp,z.pick=If,z.pickBy=Lu,z.property=kc,z.propertyOf=Ic,z.pull=Pp,z.pullAll=ga,z.pullAllBy=va,z.pullAllWith=ya,z.pullAt=kp,z.range=Jf,z.rangeRight=Yf,z.rearg=rf,z.reject=ls,z.remove=xa,z.rest=Ts,z.reverse=ba,z.sampleSize=fs,z.set=Bu,z.setWith=Uu,z.shuffle=ds,z.slice=_a,z.sortBy=$p,z.sortedUniq=Aa,z.sortedUniqBy=Pa,z.split=sc,z.spread=Ds,z.tail=ka,z.take=Ia,z.takeRight=Fa,z.takeRightWhile=Oa,z.takeWhile=Na,z.tap=Wa,z.throttle=As,z.thru=Qa,z.toArray=fu,z.toPairs=Ff,z.toPairsIn=Of,z.toPath=Mc,z.toPlainObject=vu,z.transform=Vu,z.unary=Ps,z.union=Ip,z.unionBy=Fp,z.unionWith=Op,z.uniq=ja,z.uniqBy=Ra,z.uniqWith=La,z.unset=Gu,z.unzip=Ma,z.unzipWith=Ba,z.update=Wu,z.updateWith=Qu,z.values=Hu,z.valuesIn=zu,z.without=Np,z.words=vc,z.wrap=ks,z.xor=jp,z.xorBy=Rp,z.xorWith=Lp,z.zip=Mp,z.zipObject=Ua,z.zipObjectDeep=Va,z.zipWith=Bp,z.entries=Ff,z.entriesIn=Of,z.extend=xf,z.extendWith=bf,Tc(z,z),z.add=Zf,z.attempt=Gf,z.camelCase=Nf,z.capitalize=Ku,z.ceil=ed,z.clamp=qu,z.clone=Fs,z.cloneDeep=Ns,z.cloneDeepWith=js,z.cloneWith=Os,z.conformsTo=Rs,z.deburr=Ju,z.defaultTo=_c,z.divide=td,z.endsWith=Yu,z.eq=Ls,z.escape=Zu,z.escapeRegExp=ec,z.every=Ya,z.find=Gp,z.findIndex=ra,z.findKey=_u,z.findLast=Wp,z.findLastIndex=ia,z.findLastKey=wu,z.floor=nd,z.forEach=rs,z.forEachRight=is,z.forIn=Eu,z.forInRight=Su,z.forOwn=Cu,z.forOwnRight=Tu,z.get=Pu,z.gt=of,z.gte=af,z.has=ku,z.hasIn=Iu,z.head=ca,z.identity=wc,z.includes=os,z.indexOf=la,z.inRange=$u,z.invoke=Df,z.isArguments=sf,z.isArray=uf,z.isArrayBuffer=cf,z.isArrayLike=Ms,z.isArrayLikeObject=Bs,z.isBoolean=Us,z.isBuffer=lf,z.isDate=pf,z.isElement=Vs,z.isEmpty=Gs,z.isEqual=Ws,z.isEqualWith=Qs,z.isError=Hs,z.isFinite=zs,z.isFunction=qs,z.isInteger=$s,z.isLength=Xs,z.isMap=ff,z.isMatch=Ys,z.isMatchWith=Zs,z.isNaN=eu,z.isNative=tu,z.isNil=ru,z.isNull=nu,z.isNumber=iu,z.isObject=Ks,z.isObjectLike=Js,z.isPlainObject=ou,z.isRegExp=df,z.isSafeInteger=au,z.isSet=hf,z.isString=su,z.isSymbol=uu,z.isTypedArray=mf,z.isUndefined=cu,z.isWeakMap=lu,z.isWeakSet=pu,z.join=fa,z.kebabCase=jf,z.last=da,z.lastIndexOf=ha,z.lowerCase=Rf,z.lowerFirst=Lf,z.lt=gf,z.lte=vf,z.max=Uc,z.maxBy=Vc,z.mean=Gc,z.meanBy=Wc,z.min=Qc,z.minBy=Hc,z.stubArray=Fc,z.stubFalse=Oc,z.stubObject=Nc,z.stubString=jc,z.stubTrue=Rc,z.multiply=rd,z.nth=ma,z.noConflict=Dc,z.noop=Ac,z.now=Xp,z.pad=tc,z.padEnd=nc,z.padStart=rc,z.parseInt=ic,z.random=Xu,z.reduce=us,z.reduceRight=cs,z.repeat=oc,z.replace=ac,z.result=Mu,z.round=id,z.runInContext=m,z.sample=ps,z.size=hs,z.snakeCase=Mf,z.some=ms,z.sortedIndex=wa,z.sortedIndexBy=Ea,z.sortedIndexOf=Sa,z.sortedLastIndex=Ca,z.sortedLastIndexBy=Ta,z.sortedLastIndexOf=Da,z.startCase=Bf,z.startsWith=uc,z.subtract=od,z.sum=zc,z.sumBy=qc,z.template=cc,z.times=Lc,z.toFinite=du,z.toInteger=hu,z.toLength=mu,z.toLower=lc,z.toNumber=gu,z.toSafeInteger=yu,z.toString=xu,z.toUpper=pc,z.trim=fc,z.trimEnd=dc,z.trimStart=hc,z.truncate=mc,z.unescape=gc,z.uniqueId=Bc,z.upperCase=Uf,z.upperFirst=Vf,z.each=rs,z.eachRight=is,z.first=ca,Tc(z,function(){var e={};return cr(z,function(t,n){cl.call(z.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),z.VERSION=ee,i(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){z[e].placeholder=z}),i(["drop","take"],function(e,t){It.prototype[e]=function(n){var r=this.__filtered__;if(r&&!t)return new It(this);n=n===Z?1:Rl(hu(n),0);var i=this.clone();return r?i.__takeCount__=Ll(n,i.__takeCount__):i.__views__.push({size:Ll(n,ke),type:e+(i.__dir__<0?"Right":"")}),i},It.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),i(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==Ee||n==Ce;It.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ho(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),i(["head","last"],function(e,t){var n="take"+(t?"Right":"");It.prototype[e]=function(){return this[n](1).value()[0]}}),i(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");It.prototype[e]=function(){return this.__filtered__?new It(this):this[n](1)}}),It.prototype.compact=function(){return this.filter(wc)},It.prototype.find=function(e){return this.filter(e).head()},It.prototype.findLast=function(e){return this.reverse().find(e)},It.prototype.invokeMap=Yr(function(e,t){return"function"==typeof e?new It(this):this.map(function(n){return _r(n,e,t)})}),It.prototype.reject=function(e){return this.filter(Ss(ho(e)))},It.prototype.slice=function(e,t){e=hu(e);var n=this;return n.__filtered__&&(e>0||t<0)?new It(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==Z&&(t=hu(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},It.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},It.prototype.toArray=function(){return this.take(ke)},cr(It.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=z[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(z.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof It,u=a[0],c=s||uf(t),l=function(e){var t=i.apply(z,p([e],a));return r&&f?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(s=c=!1);var f=this.__chain__,d=!!this.__actions__.length,h=o&&!f,m=s&&!d;if(!o&&c){t=m?t:new It(this);var g=e.apply(t,a);return g.__actions__.push({func:Qa,args:[l],thisArg:Z}),new J(g,f)}return h&&m?e.apply(this,a):(g=this.thru(l),h?r?g.value()[0]:g.value():g)})}),i(["pop","push","shift","sort","splice","unshift"],function(e){var t=rl[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);z.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(uf(i)?i:[],e)}return this[n](function(n){return t.apply(uf(n)?n:[],e)})}}),cr(It.prototype,function(e,t){var n=z[t];if(n){var r=n.name+"",i=Xl[r]||(Xl[r]=[]);i.push({name:t,func:n})}}),Xl[qi(Z,ue).name]=[{name:"wrapper",func:Z}],It.prototype.clone=Wt,It.prototype.reverse=Qt,It.prototype.value=Ht,z.prototype.at=Up,z.prototype.chain=Ha,z.prototype.commit=za,z.prototype.next=qa,z.prototype.plant=Xa,z.prototype.reverse=Ka,z.prototype.toJSON=z.prototype.valueOf=z.prototype.value=Ja,z.prototype.first=z.prototype.head,bl&&(z.prototype[bl]=$a),z},ur=sr();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Hn._=ur,define("sap/watt/lib/lodash/lodash",[],function(){return ur})):qn?((qn.exports=ur)._=ur,zn._=ur):Hn._=ur}.call(this),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("sap/watt/toolsets/lib/yamlParser/js-yaml",[],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.jsyaml=e()}}(function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a0&&(C=t.charCodeAt(w-1),C===N&&(l=!1,s=!1)),s&&(T=w-v,v=w,T>y&&(y=T))),_!==R&&(f=!1),m.takeUpTo(w),m.escapeChar())}if(r&&u(e,t)&&(r=!1),D="",(s||l)&&(A=0,t.charCodeAt(t.length-1)===F&&(A+=1,t.charCodeAt(t.length-2)===F&&(A+=1)),0===A?D="-":2===A&&(D="+")),l&&y"+D+"\n"+a(P,x);else if(l)D||(t=t.replace(/\n$/,"")),e.dump="|"+D+"\n"+a(t,x);else{if(!m)throw new Error("Failed to dump scalar value");m.finish(),e.dump='"'+m.result+'"'}}function p(e,t){var n,r="",i=0,o=e.length,a=/\n+$/.exec(e);for(a&&(o=a.index+1);io||n===-1?(r&&(r+="\n\n"),r+=f(e.slice(i,o),t),i=o):(r&&(r+="\n\n"),r+=f(e.slice(i,n),t),i=n+1);return a&&"\n"!==a[0]&&(r+=a[0]),r}function f(e,t){if(""===e)return e;for(var n,r,i,o=/[^\s] [^\s]/g,a="",s=0,u=0,c=o.exec(e);c;)n=c.index,n-u>t&&(r=s!==u?s:n,a&&(a+="\n"),i=e.slice(u,r),a+=i,u=r+1),s=n+1,c=o.exec(e);return a&&(a+="\n"),a+=u!==s&&e.length-u>t?e.slice(u,s)+"\n"+e.slice(s+1):e.slice(u)}function d(e){return I!==e&&F!==e&&O!==e&&G!==e&&$!==e&&X!==e&&J!==e&&Z!==e&&L!==e&&B!==e&&V!==e&&j!==e&&Y!==e&&H!==e&&U!==e&&R!==e&&M!==e&&Q!==e&&!ee[e]&&!h(e)}function h(e){return!(32<=e&&e<=126||133===e||160<=e&&e<=55295||57344<=e&&e<=65533||65536<=e&&e<=1114111)}function m(e,t,n){var r,i,o="",a=e.tag;for(r=0,i=n.length;r1024&&(s+="? "),s+=e.dump+": ",b(e,t,a,!1,!1)&&(s+=e.dump,u+=s));e.tag=c,e.dump="{"+u+"}"}function y(e,t,n,r){var i,o,a,u,c,l,p="",f=e.tag,d=Object.keys(n);for(i=0,o=d.length;i1024,c&&(l+=e.dump&&F===e.dump.charCodeAt(0)?"?":"? "),l+=e.dump,c&&(l+=s(e,t)),b(e,t+1,u,!0,c)&&(l+=e.dump&&F===e.dump.charCodeAt(0)?":":": ",l+=e.dump,p+=l));e.tag=f,e.dump=p||"{}"}function x(e,t,n){var r,i,o,a,s,u;for(i=n?e.explicitTypes:e.implicitTypes,o=0,a=i.length;o tag resolver accepts not "'+u+'" style');r=s.represent[u](t,u)}e.dump=r}return!0}return!1}function b(e,t,n,r,i){e.tag=null,e.dump=n,x(e,n,!1)||x(e,n,!0);var o=P.call(e.dump);r&&(r=0>e.flowLevel||e.flowLevel>t),(null!==e.tag&&"?"!==e.tag||2!==e.indent&&t>0)&&(i=!1);var a,s,u="[object Object]"===o||"[object Array]"===o;if(u&&(a=e.duplicates.indexOf(n),s=a!==-1),s&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(u&&s&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),"[object Object]"===o)r&&0!==Object.keys(e.dump).length?(y(e,t,e.dump,i),s&&(e.dump="&ref_"+a+(0===t?"\n":"")+e.dump)):(v(e,t,e.dump),s&&(e.dump="&ref_"+a+" "+e.dump));else if("[object Array]"===o)r&&0!==e.dump.length?(g(e,t,e.dump,i),s&&(e.dump="&ref_"+a+(0===t?"\n":"")+e.dump)):(m(e,t,e.dump),s&&(e.dump="&ref_"+a+" "+e.dump));else{if("[object String]"!==o){if(e.skipInvalid)return!1;throw new T("unacceptable kind of an object to dump "+o)}"?"!==e.tag&&l(e,e.dump,t)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function _(e,t){var n,r,i=[],o=[];for(w(e,i,o),n=0,r=o.length;n checkpoint"),t.position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this},c.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=ee[e]||i(e),this.result+=t,this.checkpoint+=1,this},c.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},t.exports.dump=E,t.exports.safeDump=S},{"./common":3,"./exception":5,"./schema/default_full":10,"./schema/default_safe":11}],5:[function(e,t,n){"use strict";function r(e,t){this.name="YAMLException",this.reason=e,this.mark=t,this.message=this.toString(!1)}r.prototype.toString=function(e){var t;return t="JS-YAML: "+(this.reason||"(unknown reason)"),!e&&this.mark&&(t+=" "+this.mark.toString()),t},t.exports=r},{}],6:[function(e,t,n){"use strict";function r(e){return 10===e||13===e}function i(e){return 9===e||32===e}function o(e){return 9===e||32===e||10===e||13===e}function a(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return 48<=e&&e<=57?e-48:(t=32|e,97<=t&&t<=102?t-97+10:-1)}function u(e){return 120===e?2:117===e?4:85===e?8:0}function c(e){return 48<=e&&e<=57?e-48:-1}function l(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function p(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function f(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Q,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function d(e,t){return new V(t,new G(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function h(e,t){throw d(e,t)}function m(e,t){var n=d(e,t);if(!e.onWarning)throw n;e.onWarning.call(null,n)}function g(e,t,n,r){var i,o,a,s;if(t1&&(e.result+=U.repeat("\n",t-1))}function E(e,t,n){var s,u,c,l,p,f,d,h,m,v=e.kind,y=e.result;if(m=e.input.charCodeAt(e.position),o(m)||a(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(u=e.input.charCodeAt(e.position+1),o(u)||n&&a(u)))return!1;for(e.kind="scalar",e.result="",c=l=e.position,p=!1;0!==m;){if(58===m){if(u=e.input.charCodeAt(e.position+1),o(u)||n&&a(u))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),o(s))break}else{if(e.position===e.lineStart&&_(e)||n&&a(m))break;if(r(m)){if(f=e.line,d=e.lineStart,h=e.lineIndent,b(e,!1,-1),e.lineIndent>=t){p=!0,m=e.input.charCodeAt(e.position);continue}e.position=l,e.line=f,e.lineStart=d,e.lineIndent=h;break}}p&&(g(e,c,l,!1),w(e,e.line-f),c=l=e.position,p=!1),i(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return g(e,c,l,!1),!!e.result||(e.kind=v,e.result=y,!1)}function S(e,t){var n,i,o;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(g(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;i=o=e.position,e.position++}else r(n)?(g(e,i,o,!0),w(e,b(e,!1,t)),i=o=e.position):e.position===e.lineStart&&_(e)?h(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);h(e,"unexpected end of the stream within a single quoted scalar")}function C(e,t){var n,i,o,a,c,l;if(l=e.input.charCodeAt(e.position),34!==l)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return g(e,n,e.position,!0),e.position++,!0;if(92===l){if(g(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),r(l))b(e,!1,t);else if(l<256&&ie[l])e.result+=oe[l],e.position++;else if((c=u(l))>0){for(o=c,a=0;o>0;o--)l=e.input.charCodeAt(++e.position),(c=s(l))>=0?a=(a<<4)+c:h(e,"expected hexadecimal character");e.result+=p(a),e.position++}else h(e,"unknown escape sequence");n=i=e.position}else r(l)?(g(e,n,i,!0),w(e,b(e,!1,t)),n=i=e.position):e.position===e.lineStart&&_(e)?h(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}h(e,"unexpected end of the stream within a double quoted scalar")}function T(e,t){var n,r,i,a,s,u,c,l,p,f,d,m=!0,g=e.tag,v=e.anchor;if(d=e.input.charCodeAt(e.position),91===d)a=93,c=!1,r=[];else{if(123!==d)return!1;a=125,c=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),d=e.input.charCodeAt(++e.position);0!==d;){if(b(e,!0,t),d=e.input.charCodeAt(e.position),d===a)return e.position++,e.tag=g,e.anchor=v,e.kind=c?"mapping":"sequence",e.result=r,!0;m||h(e,"missed comma between flow collection entries"),p=l=f=null,s=u=!1,63===d&&(i=e.input.charCodeAt(e.position+1),o(i)&&(s=u=!0,e.position++,b(e,!0,t))),n=e.line,O(e,t,z,!1,!0),p=e.tag,l=e.result,b(e,!0,t),d=e.input.charCodeAt(e.position),!u&&e.line!==n||58!==d||(s=!0,d=e.input.charCodeAt(++e.position),b(e,!0,t),O(e,t,z,!1,!0),f=e.result),c?y(e,r,p,l,f):s?r.push(y(e,null,p,l,f)):r.push(l),b(e,!0,t),d=e.input.charCodeAt(e.position),44===d?(m=!0,d=e.input.charCodeAt(++e.position)):m=!1}h(e,"unexpected end of the stream within a flow collection")}function D(e,t){var n,o,a,s,u=K,l=!1,p=t,f=0,d=!1;if(s=e.input.charCodeAt(e.position),124===s)o=!1;else{if(62!==s)return!1;o=!0}for(e.kind="scalar",e.result="";0!==s;)if(s=e.input.charCodeAt(++e.position),43===s||45===s)K===u?u=43===s?Y:J:h(e,"repeat of a chomping mode identifier");else{if(!((a=c(s))>=0))break;0===a?h(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?h(e,"repeat of an indentation width identifier"):(p=t+a-1,l=!0)}if(i(s)){do s=e.input.charCodeAt(++e.position);while(i(s)); if(35===s)do s=e.input.charCodeAt(++e.position);while(!r(s)&&0!==s)}for(;0!==s;){for(x(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!l||e.lineIndentp&&(p=e.lineIndent),r(s))f++;else{if(e.lineIndentt)&&0!==i)h(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(O(e,t,X,!0,a)&&(g?d=e.result:m=e.result),g||(y(e,p,f,d,m),f=d=m=null),b(e,!0,-1),u=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==u)h(e,"bad indentation of a mapping entry");else if(e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndent tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):h(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):m(e,"unknown tag !<"+e.tag+">");return null!==e.tag||null!==e.anchor||v}function N(e){var t,n,a,s,u=e.position,c=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(b(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(c=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),a=[],n.length<1&&h(e,"directive name must not be less than one character in length");0!==s;){for(;i(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!r(s));break}if(r(s))break;for(t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);a.push(e.input.slice(t,e.position))}0!==s&&x(e),H.call(se,n)?se[n](e,n,a):m(e,'unknown document directive "'+n+'"')}return b(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,b(e,!0,-1)):c&&h(e,"directives end mark is expected"),O(e,e.lineIndent-1,X,!1,!0),b(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(u,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&_(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,b(e,!0,-1))):void(e.position0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(r-1));)if(r-=1,this.position-r>t/2-1){n=" ... ",r+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(r,a),i.repeat(" ",e)+n+s+o+"\n"+i.repeat(" ",e+this.position-r+n.length)+"^"},r.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},t.exports=r},{"./common":3}],8:[function(e,t,n){"use strict";function r(e,t,n){var i=[];return e.include.forEach(function(e){n=r(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&i.push(n)}),n.push(e)}),n.filter(function(e,t){return-1===i.indexOf(t)})}function i(){function e(e){r[e.tag]=e}var t,n,r={};for(t=0,n=arguments.length;t64)){if(t<0)return!1;r+=6}return r%8===0}function i(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=c,a=0,u=[];for(t=0;t>16&255),u.push(a>>8&255),u.push(255&a)),a=a<<6|o.indexOf(r.charAt(t));return n=i%4*6,0===n?(u.push(a>>16&255),u.push(a>>8&255),u.push(255&a)):18===n?(u.push(a>>10&255),u.push(a>>2&255)):12===n&&u.push(a>>4&255),s?new s(u):u}function o(e){var t,n,r="",i=0,o=e.length,a=c;for(t=0;t>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]),i=(i<<8)+e[t];return n=o%3,0===n?(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]):2===n?(r+=a[i>>10&63],r+=a[i>>4&63],r+=a[i<<2&63],r+=a[64]):1===n&&(r+=a[i>>2&63],r+=a[i<<4&63],r+=a[64],r+=a[64]),r}function a(e){return s&&s.isBuffer(e)}var s=e("buffer").Buffer,u=e("../type"),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o})},{"../type":14,buffer:1}],16:[function(e,t,n){"use strict";function r(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)}function i(e){return"true"===e||"True"===e||"TRUE"===e}function o(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var a=e("../type");t.exports=new a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":14}],17:[function(e,t,n){"use strict";function r(e){if(null===e)return!1;return!!c.test(e)}function i(e){var t,n,r,i;return t=e.replace(/_/g,"").toLowerCase(),n="-"===t[0]?-1:1,i=[],0<="+-".indexOf(t[0])&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:0<=t.indexOf(":")?(t.split(":").forEach(function(e){i.unshift(parseFloat(e,10))}),t=0,r=1,i.forEach(function(e){t+=e*r,r*=60}),n*t):n*parseFloat(t,10)}function o(e,t){if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(e))return"-0.0";return e.toString(10)}function a(e){return"[object Number]"===Object.prototype.toString.call(e)&&(0!==e%1||s.isNegativeZero(e))}var s=e("../common"),u=e("../type"),c=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");t.exports=new u("tag:yaml.org,2002:float",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o,defaultStyle:"lowercase"})},{"../common":3,"../type":14}],18:[function(e,t,n){"use strict";function r(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function i(e){return 48<=e&&e<=55}function o(e){return 48<=e&&e<=57}function a(e){if(null===e)return!1;var t,n=e.length,a=0,s=!1;if(!n)return!1;if(t=e[a],"-"!==t&&"+"!==t||(t=e[++a]),"0"===t){if(a+1===n)return!0;if(t=e[++a],"b"===t){for(a++;a3)return!1;if("/"!==t[t.length-r.length-1])return!1;t=t.slice(1,t.length-r.length-1)}try{new RegExp(t,r);return!0}catch(e){return!1}}function i(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function o(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function a(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o})},{"../../type":14}],21:[function(e,t,n){"use strict";function r(){return!0}function i(){}function o(){return""}function a(e){return"undefined"==typeof e}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o})},{"../../type":14}],22:[function(e,t,n){"use strict";var r=e("../type");t.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":14}],23:[function(e,t,n){"use strict";function r(e){return"<<"===e||null===e}var i=e("../type");t.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r})},{"../type":14}],24:[function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function i(){return null}function o(e){return null===e}var a=e("../type");t.exports=new a("tag:yaml.org,2002:null",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":14}],25:[function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n,r,i,o,u=[],c=e;for(t=0,n=c.length;to){a=!0;break}if(i!==o&&i=0}function i(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function o(e){return"01234567".indexOf(e)>=0}function a(e){return" "===e||"\t"===e||"\v"===e||"\f"===e||" "===e||e.charCodeAt(0)>=5760&&" ᠎              \ufeff".indexOf(e)>=0}function s(e){return"\n"===e||"\r"===e||"\u2028"===e||"\u2029"===e}function u(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&e<="z"||e>="A"&&e<="Z"||e.charCodeAt(0)>=128&&ft.NonAsciiIdentifierStart.test(e)}function c(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e.charCodeAt(0)>=128&&ft.NonAsciiIdentifierPart.test(e)}function l(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0}return!1}function p(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0}return!1}function f(e){return"eval"===e||"arguments"===e}function d(e){var t=!1;switch(e.length){case 2:t="if"===e||"in"===e||"do"===e;break;case 3:t="var"===e||"for"===e||"new"===e||"try"===e;break;case 4:t="this"===e||"else"===e||"case"===e||"void"===e||"with"===e;break;case 5:t="while"===e||"break"===e||"catch"===e||"throw"===e;break;case 6:t="return"===e||"typeof"===e||"delete"===e||"switch"===e;break;case 7:t="default"===e||"finally"===e;break;case 8:t="function"===e||"continue"===e||"debugger"===e;break;case 10:t="instanceof"===e}if(t)return!0;switch(e){case"const":return!0;case"yield":case"let":return!0}return!(!ht||!p(e))||l(e)}function h(){return dt[mt++]}function m(e){return";"===e||"\n"===e}function g(){for(var e=mt;e>0&&!m(dt[e]);)e--;if(!(e<=_t.statementStart)){var t=!1;if("undefined"==typeof _t.lastRewindLocation)t=!0;else{var n=_t.lastRewindLocation||0;n!==e&&(t=!0)}t&&(mt=e,xt=null,_t.lastRewindLocation=mt)}}function v(){var e,t,n;for(t=!1,n=!1;mt=yt&&P({},pt.UnexpectedToken,"ILLEGAL")):(e=h(),mt>=yt&&P({},pt.UnexpectedToken,"ILLEGAL"),"*"===e&&(e=dt[mt],"/"===e&&(++mt,t=!1)));else if("/"===e)if(e=dt[mt+1],"/"===e)mt+=2,n=!0;else{if("*"!==e)break;mt+=2,t=!0,mt>=yt&&P({},pt.UnexpectedToken,"ILLEGAL")}else if(a(e))++mt;else{if(!s(e))break;++mt,"\r"===e&&"\n"===dt[mt]&&++mt,++gt,vt=mt}}function y(e){var t,n,r,o=0;for(n="u"===e?4:2,t=0;t"===o&&">"===e&&">"===t&&"="===n?(mt+=4,{type:st.Punctuator,value:">>>=",lineNumber:gt,lineStart:vt,range:[i,mt]}):"="===o&&"="===e&&"="===t?(mt+=3,{type:st.Punctuator,value:"===",lineNumber:gt,lineStart:vt,range:[i,mt]}):"!"===o&&"="===e&&"="===t?(mt+=3,{type:st.Punctuator,value:"!==",lineNumber:gt,lineStart:vt,range:[i,mt]}):">"===o&&">"===e&&">"===t?(mt+=3,{type:st.Punctuator,value:">>>",lineNumber:gt,lineStart:vt,range:[i,mt]}):"<"===o&&"<"===e&&"="===t?(mt+=3,{type:st.Punctuator,value:"<<=",lineNumber:gt,lineStart:vt,range:[i,mt]}):">"===o&&">"===e&&"="===t?(mt+=3,{type:st.Punctuator,value:">>=",lineNumber:gt,lineStart:vt,range:[i,mt]}):"="===e&&"<>=!+-*%&|^/".indexOf(o)>=0?(mt+=2,{type:st.Punctuator,value:o+e,lineNumber:gt,lineStart:vt,range:[i,mt]}):o===e&&"+-<>&|".indexOf(o)>=0&&"+-<>&|".indexOf(e)>=0?(mt+=2,{type:st.Punctuator,value:o+e,lineNumber:gt,lineStart:vt,range:[i,mt]}):"[]<>+-*%&|^!~?:=/".indexOf(o)>=0?{type:st.Punctuator,value:h(),lineNumber:gt,lineStart:vt,range:[i,mt]}:void 0):{type:st.Punctuator,value:h(),lineNumber:gt,lineStart:vt,range:[i,mt]})}function _(){var e,n,a;if(a=dt[mt],t(r(a)||"."===a,"Numeric literal must start with a decimal digit or a decimal point"),n=mt,e="","."!==a){if(e=h(),a=dt[mt],"0"===e){if("x"===a||"X"===a){for(e+=h();mt=yt&&(a=""),P({},pt.UnexpectedToken,"ILLEGAL");return mt=0&&mt=yt?{type:st.EOF,lineNumber:gt,lineStart:vt,range:[mt,mt]}:(t=b(),"undefined"!=typeof t?t:(e=dt[mt],"'"===e||'"'===e?w():"."===e||r(e)?_():(t=x(),"undefined"!=typeof t?t:void P({},pt.UnexpectedToken,"ILLEGAL"))))}function T(){var e;return xt?(mt=xt.range[1],gt=xt.lineNumber,vt=xt.lineStart,e=xt,xt=null,e):(xt=null,C())}function D(){var e,t,n;return null!==xt?xt:(e=mt,t=gt,n=vt,xt=C(),mt=e,gt=t,vt=n,xt)}function A(){var e,t,n,r;return e=mt,t=gt,n=vt,v(),r=gt!==t,mt=e,gt=t,vt=n,r}function P(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,function(e,t){return r[t]||""});throw"number"==typeof e.lineNumber?(n=new Error("Line "+e.lineNumber+": "+i),n.index=e.range[0],n.lineNumber=e.lineNumber,n.column=e.range[0]-vt+1):(n=new Error("Line "+gt+": "+i),n.index=mt,n.lineNumber=gt,n.column=mt-vt+1),n}function k(){try{P.apply(null,arguments)}catch(e){if(!_t.errors)throw e;_t.errors.push(e)}}function I(e){e.type===st.EOF&&P(e,pt.UnexpectedEOS),e.type===st.NumericLiteral&&P(e,pt.UnexpectedNumber),e.type===st.StringLiteral&&P(e,pt.UnexpectedString),e.type===st.Identifier&&P(e,pt.UnexpectedIdentifier),e.type===st.Keyword&&(l(e.value)?P(e,pt.UnexpectedReserved):ht&&p(e.value)&&P(e,pt.StrictReservedWord),P(e,pt.UnexpectedToken,e.value)),P(e,pt.UnexpectedToken,e.value)}function F(e){var t=T();t.type===st.Punctuator&&t.value===e||I(t)}function O(e){var t=T();t.type===st.Keyword&&t.value===e||I(t)}function N(e){var t=D();return t.type===st.Punctuator&&t.value===e}function j(e){var t=D();return t.type===st.Keyword&&t.value===e}function R(){var e=D(),t=e.value;return e.type===st.Punctuator&&("="===t||"*="===t||"/="===t||"%="===t||"+="===t||"-="===t||"<<="===t||">>="===t||">>>="===t||"&="===t||"^="===t||"|="===t)}function L(){var e,t;if(";"===dt[mt])return void T();if(t=gt,v(),gt===t){if(N(";"))return void T();e=D(),e.type===st.EOF||N("}")||(_t.errors&&g(),I(e))}}function M(e){switch(e.type){case"AssignmentExpression":case"BinaryExpression":case"ConditionalExpression":case"LogicalExpression":case"SequenceExpression":case"UnaryExpression":case"UpdateExpression":return!1}return!0}function B(){var e,t=[];for(F("[");!N("]");)N(",")?(T(),t.push(e)):(t.push(me()),N("]")||F(","));return F("]"),{type:ct.ArrayExpression,elements:t}}function U(e,t){var n,r;return n=ht,r=Qe(),t&&ht&&f(e[0].name)&&P(t,pt.StrictParamName),ht=n,{type:ct.FunctionExpression,id:null,params:e,body:r}}function V(){var e=T();return e.type===st.StringLiteral||e.type===st.NumericLiteral?(ht&&e.octal&&P(e,pt.StrictOctalLiteral),et(e)):{type:ct.Identifier,name:e.value}}function G(){var e,t,n,r;return e=D(),e.type===st.Identifier?(n=V(),"get"!==e.value||N(":")?"set"!==e.value||N(":")?(F(":"),{type:ct.Property,key:n,value:me(),kind:"init"}):(t=V(),F("("),e=D(),e.type!==st.Identifier&&I(T()),r=[xe()],F(")"),{type:ct.Property,key:t,value:U(r,e),kind:"set"}):(t=V(),F("("),F(")"),{type:ct.Property,key:t,value:U([]),kind:"get"})):e.type!==st.EOF&&e.type!==st.Punctuator?(t=V(),F(":"),{type:ct.Property,key:t,value:me(),kind:"init"}):void I(e)}function W(){var e,t,n,r=[],i={},o=String;for(F("{");!N("}");)e=G(),t=e.key.type===ct.Identifier?e.key.name:o(e.key.value),n="init"===e.kind?lt.Data:"get"===e.kind?lt.Get:lt.Set,Object.prototype.hasOwnProperty.call(i,t)?(i[t]===lt.Data?ht&&n===lt.Data?k({},pt.StrictDuplicateProperty):n!==lt.Data&&P({},pt.AccessorDataProperty):n===lt.Data?P({},pt.AccessorDataProperty):i[t]&n&&P({},pt.AccessorGetSet),i[t]|=n):i[t]=n,r.push(e),N("}")||F(",");return F("}"),{type:ct.ObjectExpression,properties:r}}function Q(){var e,t=D(),n=t.type;if(n===st.Identifier)return{type:ct.Identifier,name:T().value};if(n===st.StringLiteral||n===st.NumericLiteral)return ht&&t.octal&&k(t,pt.StrictOctalLiteral),et(T());if(n===st.Keyword){if(j("this"))return T(),{type:ct.ThisExpression};if(j("function"))return ze()}return n===st.BooleanLiteral?(T(),t.value="true"===t.value,et(t)):n===st.NullLiteral?(T(),t.value=null,et(t)):N("[")?B():N("{")?W():N("(")?(T(),bt.lastParenthesized=e=ge(),F(")"),e):N("/")||N("/=")?et(E()):I(T())}function H(e){for(var t=_t.errors.length,n=0;n2&&"*"===dt[e-1]){e-=2;for(var i=!1;!i;)t=dt[e],"*"===t?e>0&&"/"===dt[e-1]&&(i=!0):"\n"===t&&(r=!0),0===e&&(i=!0),e--}else n=!0;else"\n"===t?r=!0:a(t)||(n=!0);n||e--}return{index:e,lineChange:r}}function $(e){if(e.value&&e.type===st.Punctuator){var t=q(mt-e.value.length-1),n=t.index,r=dt[n];"."===r&&t.lineChange&&"("===e.value||"."===r&&(mt=n+1,xt=null)}}function X(){var e=T();return S(e)||(_t.errors&&$(e),I(e)),{type:ct.Identifier,name:e.value}}function K(e){return{type:ct.MemberExpression,computed:!1,object:e,property:X()}}function J(e){var t,n;return F("["),t=ge(),n={type:ct.MemberExpression,computed:!0,object:e,property:t},F("]"),n}function Y(e){return{type:ct.CallExpression,callee:e,arguments:z()}}function Z(){var e;return O("new"),e={type:ct.NewExpression,callee:te(),arguments:[]},N("(")&&(e.arguments=z()),e}function ee(){var e,t;for(e=j("new"),t=e?Z():Q();mt>")||N(">>>");)e={type:ct.BinaryExpression,operator:T().value,left:e,right:oe()};return e}function se(){var e,t;return t=bt.allowIn,bt.allowIn=!0,e=ae(),bt.allowIn=t,N("<")||N(">")||N("<=")||N(">=")?e={type:ct.BinaryExpression,operator:T().value,left:e,right:se()}:bt.allowIn&&j("in")?(T(),e={type:ct.BinaryExpression,operator:"in",left:e,right:se()}):j("instanceof")&&(T(),e={type:ct.BinaryExpression,operator:"instanceof",left:e,right:se()}),e}function ue(){for(var e=se();N("==")||N("!=")||N("===")||N("!==");)e={type:ct.BinaryExpression,operator:T().value,left:e,right:se()};return e}function ce(){for(var e=ue();N("&");)T(),e={type:ct.BinaryExpression,operator:"&",left:e,right:ue()};return e}function le(){for(var e=ce();N("|");)T(),e={type:ct.BinaryExpression,operator:"|",left:e,right:ce()};return e}function pe(){for(var e=le();N("^");)T(),e={type:ct.BinaryExpression,operator:"^",left:e,right:le()};return e}function fe(){for(var e=pe();N("&&");)T(),e={type:ct.LogicalExpression,operator:"&&",left:e,right:pe()};return e}function de(){for(var e=fe();N("||");)T(),e={type:ct.LogicalExpression,operator:"||",left:e,right:fe()};return e}function he(){var e,t,n;return e=de(),N("?")&&(T(),t=bt.allowIn,bt.allowIn=!0,n=me(),bt.allowIn=t,F(":"),e={type:ct.ConditionalExpression,test:e,consequent:n,alternate:me()}),e}function me(){var e;return e=he(),R()&&(bt.lastParenthesized===e||M(e)||P({},pt.InvalidLHSInAssignment),ht&&e.type===ct.Identifier&&f(e.name)&&P({},pt.StrictLHSAssignment),e={type:ct.AssignmentExpression,operator:T().value,left:e,right:me()}),e}function ge(){var e=me();if(N(","))for(e={type:ct.SequenceExpression,expressions:[e]};mt0&&_t.comments[_t.comments.length-1].range[1]>e||_t.comments.push({range:[e,n],type:r,value:i})}function Je(){var e,t,n,r,i;for(e="",r=!1,i=!1;mt=yt?(i=!1,e+=t,Ke(n,mt,"Line",e)):s(t)?(i=!1,Ke(n,mt,"Line",e),"\r"===t&&"\n"===dt[mt]&&++mt,++gt,vt=mt,e=""):e+=t;else if(r)s(t)?("\r"===t&&"\n"===dt[mt+1]?(++mt,e+="\r\n"):e+=t,++gt,++mt,vt=mt,mt>=yt&&P({},pt.UnexpectedToken,"ILLEGAL")):(t=h(),mt>=yt&&P({},pt.UnexpectedToken,"ILLEGAL"),e+=t,"*"===t&&(t=dt[mt],"/"===t&&(e=e.substr(0,e.length-1),r=!1,++mt,Ke(n,mt,"Block",e),e="")));else if("/"===t)if(t=dt[mt+1],"/"===t)n=mt,mt+=2,i=!0;else{if("*"!==t)break;n=mt,mt+=2,r=!0,mt>=yt&&P({},pt.UnexpectedToken,"ILLEGAL")}else if(a(t))++mt;else{if(!s(t))break;++mt,"\r"===t&&"\n"===dt[mt]&&++mt,++gt,vt=mt}}function Ye(){var e,t,r=_t.advance();return r.type!==st.EOF&&(e=[r.range[0],r.range[1]],t=n(r.range[0],r.range[1]),_t.tokens.push({type:ut[r.type],value:t,range:e})),r}function Ze(){var e,t,n;return v(),e=mt,t=_t.scanRegExp(),_t.tokens.length>0&&(n=_t.tokens[_t.tokens.length-1],n.range[0]===e&&"Punctuator"===n.type&&("/"!==n.value&&"/="!==n.value||_t.tokens.pop())),_t.tokens.push({type:"RegularExpression",value:t.literal,range:[e,mt]}),t}function et(e){return{type:ct.Literal,value:e.value}}function tt(e){return{type:ct.Literal,value:e.value,raw:n(e.range[0],e.range[1])}}function nt(e,t){return function(n){function r(e){return e.type===ct.LogicalExpression||e.type===ct.BinaryExpression}function i(n){r(n.left)&&i(n.left),r(n.right)&&i(n.right),e&&"undefined"==typeof n.range&&(n.range=[n.left.range[0],n.right.range[1]]),t&&"undefined"==typeof n.loc&&(n.loc={start:n.left.loc.start,end:n.right.loc.end})}return function(){var o,a,s;if(v(),a=[mt,0],s={start:{line:gt,column:mt-vt}},o=n.apply(null,arguments),"undefined"!=typeof o)return e&&(a[1]=mt,o.range=a),t&&(s.end={line:gt,column:mt-vt},o.loc=s),r(o)&&i(o),o.type===ct.MemberExpression&&("undefined"!=typeof o.object.range&&(o.range[0]=o.object.range[0]),"undefined"!=typeof o.object.loc&&(o.loc.start=o.object.loc.start)),o}}}function rt(){function e(e){return function(){try{return e.apply(null,arguments)}catch(e){return H(e),null}}}function t(e){return function(){_t.statementStart=mt;try{return e.apply(null,arguments)}catch(e){H(e)}}}var n;_t.comments&&(_t.skipComment=v,v=Je),_t.raw&&(_t.createLiteral=et,et=tt),(_t.range||_t.loc||_t.errors)&&(n=nt(_t.range,_t.loc),_t.parseAdditiveExpression=oe,_t.parseAssignmentExpression=me,_t.parseBitwiseANDExpression=ce,_t.parseBitwiseORExpression=le,_t.parseBitwiseXORExpression=pe,_t.parseBlock=ye,_t.parseFunctionSourceElements=Qe,_t.parseCallMember=Y,_t.parseCatchClause=Be,_t.parseComputedMember=J,_t.parseConditionalExpression=he,_t.parseConstLetDeclaration=Ee,_t.parseEqualityExpression=ue,_t.parseExpression=ge,_t.parseForVariableDeclaration=ke,_t.parseFunctionDeclaration=He,_t.parseFunctionExpression=ze,_t.parseLogicalANDExpression=fe,_t.parseLogicalORExpression=de,_t.parseMultiplicativeExpression=ie,_t.parseNewExpression=Z,_t.parseNonComputedMember=K,_t.parseNonComputedProperty=X,_t.parseObjectProperty=G,_t.parseObjectPropertyKey=V,_t.parsePostfixExpression=ne,_t.parsePrimaryExpression=Q,_t.parseProgram=Xe,_t.parsePropertyFunction=U,_t.parseRelationalExpression=se,_t.parseStatement=Ge,_t.parseShiftExpression=ae,_t.parseSwitchCase=Re,_t.parseUnaryExpression=re,_t.parseVariableDeclaration=be,_t.parseVariableIdentifier=xe,_t.consumeSemicolon=L,oe=n(_t.parseAdditiveExpression),me=n(_t.parseAssignmentExpression),ce=n(_t.parseBitwiseANDExpression),le=n(_t.parseBitwiseORExpression),pe=n(_t.parseBitwiseXORExpression),ye=n(_t.parseBlock),Qe=n(_t.parseFunctionSourceElements),Y=n(_t.parseCallMember),Be=n(_t.parseCatchClause),J=n(_t.parseComputedMember),he=n(_t.parseConditionalExpression),Ee=n(_t.parseConstLetDeclaration),ue=n(_t.parseEqualityExpression),ge=n(_t.parseExpression),ke=n(_t.parseForVariableDeclaration),He=n(_t.parseFunctionDeclaration),ze=n(_t.parseFunctionExpression),fe=n(_t.parseLogicalANDExpression),de=n(_t.parseLogicalORExpression),ie=n(_t.parseMultiplicativeExpression),Z=n(_t.parseNewExpression),K=n(_t.parseNonComputedMember),X=n(_t.parseNonComputedProperty),G=n(_t.parseObjectProperty),V=n(_t.parseObjectPropertyKey),ne=n(_t.parsePostfixExpression),Q=n(_t.parsePrimaryExpression),Xe=n(_t.parseProgram),U=n(_t.parsePropertyFunction),se=n(_t.parseRelationalExpression),Ge=n(_t.parseStatement),ae=n(_t.parseShiftExpression),Re=n(_t.parseSwitchCase),re=n(_t.parseUnaryExpression),be=n(_t.parseVariableDeclaration),xe=n(_t.parseVariableIdentifier)),_t.errors&&(Ge=t(Ge),ge=e(ge),X=e(X),L=e(L)),"undefined"!=typeof _t.tokens&&(_t.advance=C,_t.scanRegExp=E,C=Ye,E=Ze)}function it(){"function"==typeof _t.skipComment&&(v=_t.skipComment),_t.raw&&(et=_t.createLiteral),(_t.range||_t.loc||_t.errors)&&(oe=_t.parseAdditiveExpression,me=_t.parseAssignmentExpression,ce=_t.parseBitwiseANDExpression,le=_t.parseBitwiseORExpression,pe=_t.parseBitwiseXORExpression,ye=_t.parseBlock,Qe=_t.parseFunctionSourceElements,Y=_t.parseCallMember,Be=_t.parseCatchClause,J=_t.parseComputedMember,he=_t.parseConditionalExpression,Ee=_t.parseConstLetDeclaration,ue=_t.parseEqualityExpression,ge=_t.parseExpression,ke=_t.parseForVariableDeclaration,He=_t.parseFunctionDeclaration,ze=_t.parseFunctionExpression,fe=_t.parseLogicalANDExpression,de=_t.parseLogicalORExpression,ie=_t.parseMultiplicativeExpression,Z=_t.parseNewExpression,K=_t.parseNonComputedMember,X=_t.parseNonComputedProperty,G=_t.parseObjectProperty,V=_t.parseObjectPropertyKey,Q=_t.parsePrimaryExpression,ne=_t.parsePostfixExpression,Xe=_t.parseProgram,U=_t.parsePropertyFunction,se=_t.parseRelationalExpression,Ge=_t.parseStatement,ae=_t.parseShiftExpression,Re=_t.parseSwitchCase,re=_t.parseUnaryExpression,be=_t.parseVariableDeclaration,xe=_t.parseVariableIdentifier,L=_t.consumeSemicolon),"function"==typeof _t.scanRegExp&&(C=_t.advance,E=_t.scanRegExp)}function ot(e){var t,n=e.length,r=[];for(t=0;t0?1:0,vt=0,yt=dt.length,xt=null,bt={allowIn:!0,labelSet:{},lastParenthesized:null,inFunctionBody:!1,inIteration:!1,inSwitch:!1},_t={},"undefined"!=typeof t&&(_t.range="boolean"==typeof t.range&&t.range,_t.loc="boolean"==typeof t.loc&&t.loc,_t.raw="boolean"==typeof t.raw&&t.raw,"boolean"==typeof t.tokens&&t.tokens&&(_t.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(_t.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(_t.errors=[])),yt>0&&"undefined"==typeof dt[0]&&(e instanceof String&&(dt=e.valueOf()),"undefined"==typeof dt[0]&&(dt=ot(e))),rt();try{n=Xe(),"undefined"!=typeof _t.comments&&(n.comments=_t.comments),"undefined"!=typeof _t.tokens&&(n.tokens=_t.tokens),"undefined"!=typeof _t.errors&&(n.errors=_t.errors)}catch(e){throw e}finally{it(),_t={}}return n}var st,ut,ct,lt,pt,ft,dt,ht,mt,gt,vt,yt,xt,bt,_t;st={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8},ut={},ut[st.BooleanLiteral]="Boolean",ut[st.EOF]="",ut[st.Identifier]="Identifier",ut[st.Keyword]="Keyword",ut[st.NullLiteral]="Null",ut[st.NumericLiteral]="Numeric",ut[st.Punctuator]="Punctuator",ut[st.StringLiteral]="String",ct={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},lt={Data:1,Get:2,Set:4},pt={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},ft={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},"undefined"==typeof"esprima"[0]&&(n=function(e,t){return dt.slice(e,t).join("")}),e.version="1.0.0-dev",e.parse=at,e.Syntax=function(){var e,t={};"function"==typeof Object.create&&(t=Object.create(null));for(e in ct)ct.hasOwnProperty(e)&&(t[e]=ct[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()}("undefined"==typeof exports?esprima={}:exports),define("sap/watt/lib/orion/ui/esprima/esprima",function(){}),define("sap/watt/lib/orion/javascript/esprima/esprimaVisitor",["./scriptedLogger","sap/watt/lib/orion/ui/esprima/esprima"],function(e){return{parse:function(t,n){n||(n={}),n.range||(n.range=!0),n.tolerant||(n.tolerant=!0),n.comment||(n.comment=!0);try{var r=esprima.parse(t,n);return r}catch(r){"undefined"!=typeof e&&(e.warn("Problem parsing file","CONTENT_ASSIST"),e.warn(r.message,"CONTENT_ASSIST"),e.warn(r.stack,"CONTENT_ASSIST"));var i=null;return n.tolerant&&(i=this.emptyAST(t),i.errors=[r]),i}},visit:function(e,t,n,r){var i,o,a,s;if(n(e,t,!0)){s=[];for(o in e)if("range"!==o&&"errors"!==o&&"target"!==o&&"extras"!==o&&"comments"!==o)if(a=e[o],Array.isArray(a))for(i=0;i0)for(s.sort(function(e,t){return e.range&&t.range?e.range[0]-t.range[0]:e.range?1:t.range?-1:0}),i=0;i0;t>>>=1,e+=e)1&t&&(n+=e);return n}function u(e){return/[\r\n]/g.test(e)}function c(e){var t=e.length;return t&&z.code.isLineTerminator(e.charCodeAt(t-1))}function l(e,t){var n;for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function p(e,t){function n(e){return"object"==typeof e&&e instanceof Object&&!(e instanceof RegExp)}var r,i;for(r in t)t.hasOwnProperty(r)&&(i=t[r],n(i)?n(e[r])?p(e[r],i):e[r]=p({},i):e[r]=i);return e}function f(e){var t,n,r,i,o;if(e!==e)throw new Error("Numeric literal whose value is NaN");if(e<0||0===e&&1/e<0)throw new Error("Numeric literal whose value is negative");if(e===1/0)return K?"null":J?"1e400":"1e+400";if(t=""+e,!J||t.length<3)return t;for(n=t.indexOf("."),K||48!==t.charCodeAt(0)||1!==n||(n=0,t=t.slice(1)),r=t,t=t.replace("e+","e"),i=0,(o=r.indexOf("e"))>0&&(i=+r.slice(o+1),r=r.slice(0,o)),n>=0&&(i-=r.length-n-1,r=+(r.slice(0,n)+r.slice(n+1))+""),o=0;48===r.charCodeAt(r.length+o-1);)--o;return 0!==o&&(i-=o,r=r.slice(0,o)),0!==i&&(r+="e"+i),(r.length1e12&&Math.floor(e)===e&&(r="0x"+e.toString(16)).length255?"\\u"+"0000".slice(n.length)+n:0!==e||z.code.isDecimalDigit(t)?11===e?"\\x0B":"\\x"+"00".slice(n.length)+n:"\\0")}function g(e){if(92===e)return"\\\\";if(10===e)return"\\n";if(13===e)return"\\r";if(8232===e)return"\\u2028";if(8233===e)return"\\u2029";throw new Error("Incorrectly classified character")}function v(e){var t,n,r,i;for(i="double"===Z?'"':"'",t=0,n=e.length;t=32&&r<=126)){a+=m(r,e.charCodeAt(t+1));continue}}a+=String.fromCharCode(r)}if(i=!("double"===Z||"auto"===Z&&u=0&&!z.code.isLineTerminator(e.charCodeAt(t));--t);return e.length-1-t}function T(e,t){var n,r,i,o,a,s,u,c;for(n=e.split(/\r\n|[\r\n]/),s=Number.MAX_VALUE,r=1,i=n.length;ra&&(s=a)}for("undefined"!=typeof t?(u=$,"*"===n[1][s]&&(t+=" "),$=t):(1&s&&--s,u=$),r=1,i=n.length;r0){if(o=t,pe){for(i=e.leadingComments[0],t=[],p=i.extendedRange,f=i.range,h=le.substring(p[0],f[0]),v=(h.match(/\n/g)||[]).length,v>0?(t.push(s("\n",v)),t.push(E(D(i)))):(t.push(h),t.push(D(i))),d=f,n=1,r=e.leadingComments.length;n0?(t.push(s("\n",v)),t.push(E(D(i)))):(t.push(h),t.push(D(i)));else for(a=!c(b(t).toString()),u=s(" ",C(b([$,t,X]).toString())),n=0,r=e.trailingComments.length;n":G.Relational,"<=":G.Relational,">=":G.Relational,in:G.Relational,instanceof:G.Relational,"<<":G.BitwiseSHIFT,">>":G.BitwiseSHIFT,">>>":G.BitwiseSHIFT,"+":G.Additive,"-":G.Additive,"*":G.Multiplicative,"%":G.Multiplicative,"/":G.Multiplicative};var he=1,me=2,ge=4,ve=8,ye=16,xe=32,be=me|ge,_e=he|me,we=he|me|ge,Ee=he,Se=ge,Ce=he|ge,Te=he,De=he|xe,Ae=0,Pe=he|ye,ke=he|ve;q=Array.isArray,q||(q=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),N.prototype.maybeBlock=function(e,t){var n,r,i=this;return r=!se.comment||!e.leadingComments,e.type===V.BlockStatement&&r?[ne,this.generateStatement(e,t)]:e.type===V.EmptyStatement&&r?";":(S(function(){n=[te,E(i.generateStatement(e,t))]}),n)},N.prototype.maybeBlockSuffix=function(e,t){var n=c(b(t).toString());return e.type!==V.BlockStatement||se.comment&&e.leadingComments||n?n?[t,$]:[t,te,$]:[t,ne]},N.prototype.generatePattern=function(e,t,n){return e.type===V.Identifier?j(e):this.generateExpression(e,t,n)},N.prototype.generateFunctionParams=function(e){var t,n,r,i;if(i=!1,e.type!==V.ArrowFunctionExpression||e.rest||e.defaults&&0!==e.defaults.length||1!==e.params.length||e.params[0].type!==V.Identifier){for(r=e.type===V.ArrowFunctionExpression?[R(e,!1)]:[],r.push("("),e.defaults&&(i=!0),t=0,n=e.params.length;t")),e.expression?(t.push(ne),n=this.generateExpression(e.body,G.Assignment,we),"{"===n.toString().charAt(0)&&(n=["(",n,")"]),t.push(n)):t.push(this.maybeBlock(e.body,ke)),t},N.prototype.generateIterationForStatement=function(e,t,n){var r=["for"+ne+"("],i=this;return S(function(){t.left.type===V.VariableDeclaration?S(function(){r.push(t.left.kind+_()),r.push(i.generateStatement(t.left.declarations[0],Ae))}):r.push(i.generateExpression(t.left,G.Call,we)),r=w(r,e),r=[w(r,i.generateExpression(t.right,G.Sequence,we)),")"]}),r.push(this.maybeBlock(t.body,n)),r},N.prototype.generatePropertyKey=function(e,t){var n=[];return t&&n.push("["),n.push(this.generateExpression(e,G.Sequence,we)),t&&n.push("]"),n},N.prototype.generateAssignment=function(e,t,n,r,i){return G.Assignment2&&(r=le.substring(n[0]+1,n[1]-1),"\n"===r[0]&&(i=["{"]),i.push(r)));var a,s,u,l;for(l=Te,t&ve&&(l|=ye),a=0,s=e.body.length;a0&&(e.body[a-1].trailingComments||e.body[a].leadingComments||k(e.body[a-1].range[1],e.body[a].range[0],i))),a===s-1&&(l|=xe),u=e.body[a].leadingComments&&pe?o.generateStatement(e.body[a],l):E(o.generateStatement(e.body[a],l)),i.push(u),c(b(u).toString())||(pe&&a1?S(n):n(),r.push(this.semicolon(t)),r},ThrowStatement:function(e,t){return[w("throw",this.generateExpression(e.argument,G.Sequence,we)),this.semicolon(t)]},TryStatement:function(e,t){var n,r,i,o;if(n=["try",this.maybeBlock(e.block,Te)],n=this.maybeBlockSuffix(e.block,n),e.handlers)for(r=0,i=e.handlers.length;r0?"\n":""],a=Pe,i=0;i0&&(e.body[i-1].trailingComments||e.body[i].leadingComments||k(e.body[i-1].range[1],e.body[i].range[0],n))),r=E(this.generateStatement(e.body[i],a)),n.push(r),i+10){for(r.push("("),o=0,a=i;o=2&&48===i.charCodeAt(0))&&r.push(".")),r.push("."),r.push(j(e.property))),I(r,G.Member,t)},UnaryExpression:function(e,t,n){var r,i,o,a,s;return i=this.generateExpression(e.argument,G.Unary,we),""===ne?r=w(e.operator,i):(r=[e.operator],e.operator.length>2?r=w(r,i):(a=b(r).toString(),s=a.charCodeAt(a.length-1),o=i.toString().charCodeAt(0),(43===s||45===s)&&s===o||z.code.isIdentifierPart(s)&&z.code.isIdentifierPart(o)?(r.push(_()),r.push(i)):r.push(i))),I(r,G.Unary,t)},YieldExpression:function(e,t,n){var r;return r=e.delegate?"yield*":"yield",e.argument&&(r=w(r,this.generateExpression(e.argument,G.Yield,we))),I(r,G.Yield,t)},AwaitExpression:function(e,t,n){var r=w(e.delegate?"await*":"await",this.generateExpression(e.argument,G.Await,we));return I(r,G.Await,t)},UpdateExpression:function(e,t,n){return e.prefix?I([e.operator,this.generateExpression(e.argument,G.Unary,we)],G.Unary,t):I([this.generateExpression(e.argument,G.Postfix,we),e.operator],G.Postfix,t)},FunctionExpression:function(e,t,n){var r=[R(e,!0),"function"];return e.id?(r.push(L(e)||_()),r.push(j(e.id))):r.push(L(e)||ne),r.push(this.generateFunctionBody(e)),r},ExportBatchSpecifier:function(e,t,n){return"*"},ArrayPattern:function(e,t,n){return this.ArrayExpression(e,t,n)},ArrayExpression:function(e,t,n){var r,i,o=this;return e.elements.length?(i=e.elements.length>1,r=["[",i?te:""],S(function(t){var n,a;for(n=0,a=e.elements.length;n1,S(function(){o=a.generateExpression(e.properties[0],G.Sequence,we)}),r||u(b(o).toString())?(S(function(t){var n,s;if(i=["{",te,t,o],r)for(i.push(","+te),n=1,s=e.properties.length;n0||se.moz.comprehensionExpressionStartsWithAssignment?r=w(r,a):r.push(a)}),e.filter&&(r=w(r,"if"+ne),a=this.generateExpression(e.filter,G.Sequence,we),r=w(r,["(",a,")"])),se.moz.comprehensionExpressionStartsWithAssignment||(a=this.generateExpression(e.body,G.Assignment,we),r=w(r,a)),r.push(e.type===V.GeneratorExpression?")":"]"),r},ComprehensionBlock:function(e,t,n){var r;return r=e.left.type===V.VariableDeclaration?[e.left.kind,_(),this.generateStatement(e.left.declarations[0],Ae)]:this.generateExpression(e.left,G.Call,we),r=w(r,e.of?"of":"in"),r=w(r,this.generateExpression(e.right,G.Sequence,we)),["for"+ne+"(",r,")"]},SpreadElement:function(e,t,n){return["...",this.generateExpression(e.argument,G.Assignment,we)]},TaggedTemplateExpression:function(e,t,n){var r=_e;n&me||(r=Ee);var i=[this.generateExpression(e.tag,G.Call,r),this.generateExpression(e.quasi,G.Primary,Se)];return I(i,G.TaggedTemplate,t)},TemplateElement:function(e,t,n){return e.value.raw},TemplateLiteral:function(e,t,n){var r,i,o;for(r=["`"],i=0,o=e.quasis.length;i=0.10.0"},maintainers:[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"http://github.com/Constellation"}],repository:{type:"git",url:"http://github.com/estools/escodegen.git"},dependencies:{estraverse:"^1.9.1",esutils:"^1.1.6",esprima:"^1.2.2",optionator:"^0.5.0"},optionalDependencies:{"source-map":"~0.1.40"},devDependencies:{"acorn-6to5":"^0.11.1-25",bluebird:"^2.3.11","bower-registry-client":"^0.2.1",chai:"^1.10.0","commonjs-everywhere":"^0.9.7","esprima-moz":"*",gulp:"^3.8.10","gulp-eslint":"^0.2.0","gulp-mocha":"^2.0.0",semver:"^4.1.0"},licenses:[{type:"BSD",url:"http://github.com/estools/escodegen/raw/master/LICENSE.BSD"}],scripts:{test:"gulp travis","unit-test":"gulp test",lint:"gulp lint",release:"node tools/release.js","build-min":"./node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js",build:"./node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js"}}}),t.define("/node_modules/source-map/lib/source-map.js",function(e,n,r,i){n.SourceMapGenerator=t("/node_modules/source-map/lib/source-map/source-map-generator.js",e).SourceMapGenerator,n.SourceMapConsumer=t("/node_modules/source-map/lib/source-map/source-map-consumer.js",e).SourceMapConsumer,n.SourceNode=t("/node_modules/source-map/lib/source-map/source-node.js",e).SourceNode}),t.define("/node_modules/source-map/lib/source-map/source-node.js",function(e,t,n,r){define(function(e,t,n){function r(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[u]=!0,null!=r&&this.add(r)}var i=e("/node_modules/source-map/lib/source-map/source-map-generator.js",n).SourceMapGenerator,o=e("/node_modules/source-map/lib/source-map/util.js",n),a=/(\r?\n)/,s=/\r\n|[\s\S]/g,u="$$$isSourceNode$$$";r.fromStringWithSourceMap=function(e,t,n){function i(e,t){if(null===e||void 0===e.source)s.add(t);else{var i=n?o.join(n,e.source):e.source;s.add(new r(e.originalLine,e.originalColumn,i,t,e.name))}}var s=new r,u=e.split(a),c=function(){var e=u.shift(),t=u.shift()||"";return e+t},l=1,p=0,f=null;return t.eachMapping(function(e){if(null!==f){if(!(l0&&(f&&i(f,c()),s.add(u.join(""))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);null!=r&&(null!=n&&(e=o.join(n,e)),s.setSourceContent(e,r))}),s},r.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},r.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},r.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n0){for(t=[],n=0;n=0;c--)r=s[c],"."===r?s.splice(c,1):".."===r?u++:u>0&&(""===r?(s.splice(c+1,u),u=0):(s.splice(c,2),u--));return t=s.join("/"),""===t&&(t=a?"/":"."),n?(n.path=t,o(n)):t}function s(e,t){""===e&&(e="."),""===t&&(t=".");var n=i(t),r=i(e);if(r&&(e=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),o(n);if(n||t.match(m))return t;if(r&&!r.host&&!r.path)return r.host=t,o(r);var s="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t);return r?(r.path=s,o(r)):s}function u(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");var n=i(e);return"/"==t.charAt(0)&&n&&"/"==n.path?t.slice(1):0===t.indexOf(e+"/")?t.substr(e.length+1):t}function c(e){return"$"+e}function l(e){return e.substr(1)}function p(e,t){var n=e||"",r=t||"";return(n>r)-(n0&&(e.splice(t-1,2),t-=2)}}function a(e,t){var n;return e&&"."===e.charAt(0)&&t&&(n=t.split("/"),n=n.slice(0,n.length-1),n=n.concat(e.split("/")),i(n),e=n.join("/")),e}function s(e){return function(t){return a(t,e)}}function u(e){function t(t){h[e]=t}return t.fromText=function(e,t){throw new Error("amdefine does not implement load.fromText")},t}function c(t,n,i){var a,s,u,c;if(t)s=h[t]={},u={id:t,uri:o,exports:s},a=p(r,s,u,t);else{if(m)throw new Error("amdefine with no module ID cannot be called more than once per file.");m=!0,s=e.exports,u=e,a=p(r,s,u,e.id)}n&&(n=n.map(function(e){return a(e)})),c="function"==typeof i?i.apply(u.exports,n):i,void 0!==c&&(u.exports=c,t&&(h[t]=u.exports))}function l(e,t,n){Array.isArray(e)?(n=t,t=e,e=void 0):"string"!=typeof e&&(n=e,e=t=void 0),t&&!Array.isArray(t)&&(n=t,t=void 0),t||(t=["require","exports","module"]),e?d[e]=[e,t,n]:c(e,t,n)}var p,f,d={},h={},m=!1,g=t("path",e);return p=function(e,t,r,i){function o(o,a){return"string"==typeof o?f(e,t,r,o,i):(o=o.map(function(n){return f(e,t,r,n,i)}),void n.nextTick(function(){a.apply(null,o)}))}return o.toUrl=function(e){return 0===e.indexOf(".")?a(e,g.dirname(r.filename)):e},o},r=r||function(){return e.require.apply(e,arguments)},f=function(e,t,n,r,i){var o,l,m=r.indexOf("!"),g=r;if(m===-1){if(r=a(r,i),"require"===r)return p(e,t,n,i);if("exports"===r)return t;if("module"===r)return n;if(h.hasOwnProperty(r))return h[r];if(d[r])return c.apply(null,d[r]),h[r];if(e)return e(g);throw new Error("No module with ID: "+r)}return o=r.substring(0,m),r=r.substring(m+1,r.length),l=f(e,t,n,o,i),r=l.normalize?l.normalize(r,s(i)):a(r,i),h[r]?h[r]:(l.load(r,p(e,t,n,i),u(r),{}),h[r])},l.require=function(e){return h[e]?h[e]:d[e]?(c.apply(null,d[e]),h[e]):void 0},l.amd={},l}e.exports=a}),t.define("/node_modules/source-map/lib/source-map/source-map-generator.js",function(e,t,n,r){define(function(e,t,n){function r(e){e||(e={}),this._file=o.getArg(e,"file",null),this._sourceRoot=o.getArg(e,"sourceRoot",null),this._sources=new a,this._names=new a,this._mappings=[],this._sourcesContents=null}var i=e("/node_modules/source-map/lib/source-map/base64-vlq.js",n),o=e("/node_modules/source-map/lib/source-map/util.js",n),a=e("/node_modules/source-map/lib/source-map/array-set.js",n).ArraySet;r.prototype._version=3,r.fromSourceMap=function(e){var t=e.sourceRoot,n=new r({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=o.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)}),e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&n.setSourceContent(t,r)}),n},r.prototype.addMapping=function(e){var t=o.getArg(e,"generated"),n=o.getArg(e,"original",null),r=o.getArg(e,"source",null),i=o.getArg(e,"name",null);this._validateMapping(t,n,r,i),null==r||this._sources.has(r)||this._sources.add(r),null==i||this._names.has(i)||this._names.add(i),this._mappings.push({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i})},r.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=o.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[o.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var i=this._sourceRoot;null!=i&&(r=o.relative(i,r));var s=new a,u=new a;this._mappings.forEach(function(t){if(t.source===r&&null!=t.originalLine){var a=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=a.source&&(t.source=a.source,null!=n&&(t.source=o.join(n,t.source)),null!=i&&(t.source=o.relative(i,t.source)),t.originalLine=a.line,t.originalColumn=a.column,null!=a.name&&(t.name=a.name))}var c=t.source;null==c||s.has(c)||s.add(c);var l=t.name;null==l||u.has(l)||u.add(l)},this),this._sources=s,this._names=u,e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=o.join(n,t)),null!=i&&(t=o.relative(i,t)),this.setSourceContent(t,r))},this)},r.prototype._validateMapping=function(e,t,n,r){if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},r.prototype._serializeMappings=function(){var e,t=0,n=1,r=0,a=0,s=0,u=0,c="";this._mappings.sort(o.compareByGeneratedPositions);for(var l=0,p=this._mappings.length;l0){if(!o.compareByGeneratedPositions(e,this._mappings[l-1]))continue;c+=","}c+=i.encode(e.generatedColumn-t),t=e.generatedColumn,null!=e.source&&(c+=i.encode(this._sources.indexOf(e.source)-u),u=this._sources.indexOf(e.source),c+=i.encode(e.originalLine-1-a),a=e.originalLine-1,c+=i.encode(e.originalColumn-r),r=e.originalColumn,null!=e.name&&(c+=i.encode(this._names.indexOf(e.name)-s),s=this._names.indexOf(e.name)))}return c},r.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=o.relative(t,e));var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},r.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},r.prototype.toString=function(){return JSON.stringify(this)},t.SourceMapGenerator=r})}),t.define("/node_modules/source-map/lib/source-map/array-set.js",function(e,t,n,r){define(function(e,t,n){function r(){this._array=[],this._set={}}var i=e("/node_modules/source-map/lib/source-map/util.js",n);r.fromArray=function(e,t){for(var n=new r,i=0,o=e.length;i=0&&e>1;return t?-n:n}var o=e("/node_modules/source-map/lib/source-map/base64.js",n),a=5,s=1<>>=a,i>0&&(t|=c),n+=o.encode(t);while(i>0); return n},t.decode=function(e,t){var n,r,s=0,l=e.length,p=0,f=0;do{if(s>=l)throw new Error("Expected more digits in base 64 VLQ value.");r=o.decode(e.charAt(s++)),n=!!(r&c),r&=u,p+=r<0;)if(";"===p.charAt(0))r++,p=p.slice(1),o=0;else if(","===p.charAt(0))p=p.slice(1);else{if(n={},n.generatedLine=r,s.decode(p,f),n.generatedColumn=o+f.value,o=n.generatedColumn,p=f.rest,p.length>0&&!this._nextCharIsMappingSeparator(p)){if(s.decode(p,f),n.source=this._sources.at(c+f.value),c+=f.value,p=f.rest,0===p.length||this._nextCharIsMappingSeparator(p))throw new Error("Found a source, but no line and column");if(s.decode(p,f),n.originalLine=a+f.value,a=n.originalLine,n.originalLine+=1,p=f.rest,0===p.length||this._nextCharIsMappingSeparator(p))throw new Error("Found a source and line, but no column");s.decode(p,f),n.originalColumn=u+f.value,u=n.originalColumn,p=f.rest,p.length>0&&!this._nextCharIsMappingSeparator(p)&&(s.decode(p,f),n.name=this._names.at(l+f.value),l+=f.value,p=f.rest)}this.__generatedMappings.push(n),"number"==typeof n.originalLine&&this.__originalMappings.push(n)}this.__generatedMappings.sort(i.compareByGeneratedPositions),this.__originalMappings.sort(i.compareByOriginalPositions)},r.prototype._findMapping=function(e,t,n,r,i){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return o.search(e,t,i)},r.prototype.computeColumnSpans=function(){for(var e=0;e=0){var r=this._generatedMappings[n];if(r.generatedLine===t.generatedLine){var o=i.getArg(r,"source",null);return null!=o&&null!=this.sourceRoot&&(o=i.join(this.sourceRoot,o)),{source:o,line:i.getArg(r,"originalLine",null),column:i.getArg(r,"originalColumn",null),name:i.getArg(r,"name",null)}}}return{source:null,line:null,column:null,name:null}},r.prototype.sourceContentFor=function(e){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=i.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var t;if(null!=this.sourceRoot&&(t=i.urlParse(this.sourceRoot))){var n=e.replace(/^file:\/\//,"");if("file"==t.scheme&&this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if((!t.path||"/"==t.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}throw new Error('"'+e+'" is not in the SourceMap.')},r.prototype.generatedPositionFor=function(e){var t={source:i.getArg(e,"source"),originalLine:i.getArg(e,"line"),originalColumn:i.getArg(e,"column")};null!=this.sourceRoot&&(t.source=i.relative(this.sourceRoot,t.source));var n=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions);if(n>=0){var r=this._originalMappings[n];return{line:i.getArg(r,"generatedLine",null),column:i.getArg(r,"generatedColumn",null),lastColumn:i.getArg(r,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},r.prototype.allGeneratedPositionsFor=function(e){var t={source:i.getArg(e,"source"),originalLine:i.getArg(e,"line"),originalColumn:1/0};null!=this.sourceRoot&&(t.source=i.relative(this.sourceRoot,t.source));var n=[],r=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions);if(r>=0)for(var o=this._originalMappings[r];o&&o.originalLine===t.originalLine;)n.push({line:i.getArg(o,"generatedLine",null),column:i.getArg(o,"generatedColumn",null),lastColumn:i.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[--r];return n.reverse()},r.GENERATED_ORDER=1,r.ORIGINAL_ORDER=2,r.prototype.eachMapping=function(e,t,n){var o,a=t||null,s=n||r.GENERATED_ORDER;switch(s){case r.GENERATED_ORDER:o=this._generatedMappings;break;case r.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;o.map(function(e){var t=e.source;return null!=t&&null!=u&&(t=i.join(u,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name}}).forEach(e,a)},t.SourceMapConsumer=r})}),t.define("/node_modules/source-map/lib/source-map/binary-search.js",function(e,t,n,r){define(function(e,t,n){function r(e,t,n,i,o){var a=Math.floor((t-e)/2)+e,s=o(n,i[a],!0);return 0===s?a:s>0?t-a>1?r(a,t,n,i,o):a:a-e>1?r(e,a,n,i,o):e<0?-1:e}t.search=function(e,t,n){return 0===t.length?-1:r(-1,t.length,e,t,n)}})}),t.define("/node_modules/esutils/lib/utils.js",function(e,n,r,i){!function(){"use strict";n.ast=t("/node_modules/esutils/lib/ast.js",e),n.code=t("/node_modules/esutils/lib/code.js",e),n.keyword=t("/node_modules/esutils/lib/keyword.js",e)}()}),t.define("/node_modules/esutils/lib/keyword.js",function(e,n,r,i){!function(){"use strict";function n(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function r(e,t){return!(!t&&"yield"===e)&&i(e,t)}function i(e,t){if(t&&n(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function o(e,t){return"null"===e||"true"===e||"false"===e||r(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||i(e,t)}function s(e){return"eval"===e||"arguments"===e}function u(e){var t,n,r;if(0===e.length)return!1;if(r=e.charCodeAt(0),!p.isIdentifierStart(r)||92===r)return!1;for(t=1,n=e.length;t=48&&e<=57}function n(e){return t(e)||97<=e&&e<=102||65<=e&&e<=70}function r(e){return e>=48&&e<=55}function i(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&c.indexOf(e)>=0}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e){return e>=97&&e<=122||e>=65&&e<=90||36===e||95===e||92===e||e>=128&&u.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function s(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||36===e||95===e||92===e||e>=128&&u.NonAsciiIdentifierPart.test(String.fromCharCode(e))}var u,c;u={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},c=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],e.exports={isDecimalDigit:t,isHexDigit:n,isOctalDigit:r,isWhiteSpace:i,isLineTerminator:o,isIdentifierStart:a,isIdentifierPart:s}}()}),t.define("/node_modules/esutils/lib/ast.js",function(e,t,n,r){!function(){"use strict";function t(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function n(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function i(e){return r(e)||null!=e&&"FunctionDeclaration"===e.type}function o(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function a(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=o(t)}while(t);return!1}e.exports={isExpression:t,isStatement:r,isIterationStatement:n,isSourceElement:i,isProblematicIfStatement:a,trailingStatement:o}}()}),t.define("/node_modules/estraverse/estraverse.js",function(e,t,n,r){!function(e,n){"use strict";n(t)}(this,function e(t){"use strict";function n(){}function r(e){var t,n,i={};for(t in e)e.hasOwnProperty(t)&&(n=e[t],"object"==typeof n&&null!==n?i[t]=r(n):i[t]=n);return i}function i(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function o(e,t){var n,r,i,o;for(r=e.length,i=0;r;)n=r>>>1,o=i+n,t(e[o])?r=n:(i=o+1,r-=n+1);return i}function a(e,t){var n,r,i,o;for(r=e.length,i=0;r;)n=r>>>1,o=i+n,t(e[o])?(i=o+1,r-=n+1):r=n;return i}function s(e,t){return w(t).forEach(function(n){e[n]=t[n]}),e}function u(e,t){this.parent=e,this.key=t}function c(e,t,n,r){this.node=e,this.path=t,this.wrap=n,this.ref=r}function l(){}function p(e){return null!=e&&("object"==typeof e&&"string"==typeof e.type)}function f(e,t){return(e===v.ObjectExpression||e===v.ObjectPattern)&&"properties"===t}function d(e,t){var n=new l;return n.traverse(e,t)}function h(e,t){var n=new l;return n.replace(e,t)}function m(e,t){var n;return n=o(t,function(t){return t.range[0]>e.range[0]}),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),n-=1,n>=0&&(e.extendedRange[0]=t[n].range[1]),e}function g(e,t,n){var i,o,a,s,u=[];if(!e.range)throw new Error("attachComments needs range information");if(!n.length){if(t.length){for(a=0,o=t.length;ae.range[0]){if(t.extendedRange[0]e.range[1]?x.Skip:void 0}}),s=0,d(e,{leave:function(e){for(var t;se.range[1]?x.Skip:void 0}}),e}var v,y,x,b,_,w,E,S,C;return y=Array.isArray,y||(y=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),n(i),n(a),_=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}(),w=Object.keys||function(e){var t,n=[];for(t in e)n.push(t);return n},v={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportBatchSpecifier:"ExportBatchSpecifier",ExportDeclaration:"ExportDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},b={AssignmentExpression:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","defaults","rest","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass"],ClassExpression:["id","body","superClass"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportBatchSpecifier:[],ExportDeclaration:["declaration","specifiers","source"],ExportSpecifier:["id","name"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","defaults","rest","body"],FunctionExpression:["id","params","defaults","rest","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["id"],ImportNamespaceSpecifier:["id"],ImportSpecifier:["id","name"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},E={},S={},C={},x={Break:E,Skip:S,Remove:C},u.prototype.replace=function(e){this.parent[this.key]=e},u.prototype.remove=function(){return y(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},l.prototype.path=function(){function e(e,t){if(y(t))for(r=0,i=t.length;r=0;)if(u=h[l],m=o[u])if(y(m)){for(d=m.length;(d-=1)>=0;)if(m[d]){if(f(a,h[l]))i=new c(m[d],[u,d],"Property",null);else{if(!p(m[d]))continue;i=new c(m[d],[u,d],null,null)}n.push(i)}}else p(m)&&n.push(new c(m,u,null,null))}}else if(i=r.pop(),s=this.__execute(t.leave,i),this.__state===E||s===E)return},l.prototype.replace=function(e,t){function n(e){var t,n,i,o;if(e.ref.remove())for(n=e.ref.key,o=e.ref.parent,t=r.length;t--;)if(i=r[t],i.ref&&i.ref.parent===o){if(i.ref.key=0;)if(b=m[d],g=o[b])if(y(g)){for(h=g.length;(h-=1)>=0;)if(g[h]){if(f(a,m[d]))l=new c(g[h],[b,h],"Property",new u(g,h));else{if(!p(g[h]))continue;l=new c(g[h],[b,h],null,new u(g,h))}r.push(l)}}else p(g)&&r.push(new c(g,b,null,new u(o,b)))}}else if(l=i.pop(),s=this.__execute(t.leave,l),void 0!==s&&s!==E&&s!==S&&s!==C&&l.ref.replace(s),this.__state!==C&&s!==C||n(l),this.__state===E||s===E)return x.root;return x.root},t.version="1.8.1-dev",t.Syntax=v,t.traverse=d,t.replace=h,t.attachComments=g,t.VisitorKeys=b,t.VisitorOption=x,t.Controller=l,t.cloneEnvironment=function(){return e({})},t})}),t("/tools/entry-point.js")}.call(this,this),define("sap.watt.saptoolsets.ui5.project.ui5projecthandler/util/GenericHandler",["sap/watt/lib/lodash/lodash","sap/watt/lib/orion/javascript/esprima/esprimaVisitor","sap/watt/lib/orion/ui/esprima/esprima","sap/watt/lib/orion/ui/escodegen/escodegen.browser"],function(e,t){"use strict";var n=function(e){var t=e.getEntity().getFullPath(),n=t.lastIndexOf("/");return t.substr(0,n)},r=function(e,t){return e.getContent().then(function(e){return a(e,t)})},i=function(e){return e.getProject()},o=function(t,n,r,i){t||Q.reject(new Error(this.context.i18n.getText("i18n","projectHandler_noProjectSelected")));var o=e.filter(n,function(e){return e.name===r});return i.service.platform.builder.getTargetFolder(t).then(function(e){if(e!==t){var n="projectHandler_failFindDescFile",r="projectHandler_failFindDescFile";o=m(e,o,i,n,r)}return g(o,i)}).fail(function(){return g(o,i)})},a=function(e,t){var n=t.substr(0,t.length-3),r=null,i=/\.declare\s*\(\s*/,o=e.search(i);if(o!==-1){var a,s=e.indexOf('"',o);if(s!==-1)a=e.indexOf("."+n,s),a!==-1&&(r=e.substring(s+1,a));else{var u=e.indexOf("'",o);u!==-1&&(a=e.indexOf("."+n,u),a!==-1&&(r=e.substring(u+1,a)))}}if(null===r){var c='.extend\\(\\"(.*).',l=new RegExp(c+n+'\\"'),p=l.exec(e);p&&(r=p[1])}return r?r:""},s=function(e,t){return e.type!==esprima.Syntax.Property||!e.key||e.key.name!==t.sBlockName||(t.bContent===!0?t.oBlock=e.value:t.oBlock=e,!1)},u=function(e,t){return e.type!==esprima.Syntax.Property||!e.key||e.key.name!==t.sBlockName||(e.value=t.oBlock.value,!1)},c=function(e,t){return e.type!==esprima.Syntax.Property||!e.key||e.key.name!==t.sParentBlockName||(e.value.properties.push(t.oBlock),!1)},l=function(t,n){return t.type!==esprima.Syntax.CallExpression||!t.callee||!t.callee.property||t.callee.property.type!==esprima.Syntax.Identifier||"extend"!==t.callee.property.name||(!t.arguments[0].value||!e.endsWith(t.arguments[0].value,n.sIdSuffix)||(n.oExtendedObjectContent=t.arguments[1],!1))},p=function(e,t){return!(e.type===esprima.Syntax.CallExpression&&e.callee&&e.callee.object&&e.callee.object.object&&e.callee.object.object.object&&"sap"===e.callee.object.object.object.name&&e.callee.object.object.property&&"ui"===e.callee.object.object.property.name&&e.callee.object.property&&"component"===e.callee.object.property.name&&e.callee.property&&"load"===e.callee.property.name)||(t.oLoadObjectContent=e.arguments[0],!1)},f=function(e,t){return t.service.platform.builder.getTargetFolder(e).then(function(e){return e})},d=function(t,n){var r=e.find(t,function(e){return e.name===n});return r},h=function(e,t){return e.getParent().then(function(e){if(e)return e.getChild(t).then(function(e){return e})})},m=function(t,n){var r=t.getEntity().getName(),i=e.filter(n,function(t){var n=t.path,i=n.lastIndexOf("/");return!e.includes(n.substr(0,i),r)});return i},g=function(t,n){var r=e.sortBy(t,function(e){return e.path.length}),i=e.head(r);return i?n.service.filesystem.documentProvider.getDocument(i.path).then(function(e){return e}):null},v=function(t){var n=e.values(t);return e.isEmpty(n)?null:n[0]};return{getHandlerFilePath:n,getHandlerNamespace:r,getProject:i,getBlockByName:s,replaceBlockContent:u,getExtendedObjectBySuffix:l,createBlock:c,getTargetBuildFolder:f,getAppComponent:o,getFileFromFolder:d,getDescriptorFileFromCompLocation:h,getFirstDataSource:v,getLoadObjectBySuffix:p}}),define("sap.watt.saptoolsets.ui5.project.ui5projecthandler/util/ComponentHandler",["sap/watt/lib/lodash/lodash","sap.watt.saptoolsets.ui5.project.ui5projecthandler/util/GenericHandler","sap/watt/lib/orion/javascript/esprima/esprimaVisitor","sap/watt/lib/orion/ui/esprima/esprima","sap/watt/lib/orion/ui/escodegen/escodegen.browser"],function(e,t,n){"use strict";var r="Component.js",i=function(){var e=new Error("This method is not implemented");throw e.name="UnimplementedMethod",e},o=function(){return r},a=function(e){return t.getHandlerFilePath(e)},s=function(e){return t.getHandlerNamespace(e,r)},u=function(e){return e.getContent().then(function(e){try{var r=n.parse(e),i={oLoadObjectContent:{},sIdSuffix:".load"};return n.visit(r,i,t.getLoadObjectBySuffix),i.oLoadObjectContent}catch(e){var o=new Error("File parsing failed");throw o.name="FileParsingFailed",o}})},c=function(e){var t=e.properties;if(t){for(var n,r,i,o=0;o0){for(var p,f,d,h,m=l.elements,g={},v=0;v0){i=e.d.results;for(var t in i)i[t].TechnicalName.indexOf("/")>-1&&(i[t].TechnicalName=i[t].TechnicalName.replace(new RegExp("/","g"),"_"))}return i}).fail(function(){return[]})}}}),define("sap.watt.saptoolsets.ui5.project.uiannotations/service/SelectAnnotationStep",{_step:null,_aExtensionFilters:[],configure:function(e){e.styles&&this.context.service.resource.includeStyles(e.styles).done(),e.repositoryBrowserExtensionFilters.length>0&&(this._aExtensionFilters=e.repositoryBrowserExtensionFilters)},getContent:function(){jQuery.sap.require("sap.watt.saptoolsets.ui5.project.plugin.uiannotations.ui.wizard.AnnotationSelectionWizardStep"),this._step=new sap.watt.saptoolsets.ui5.project.plugin.uiannotations.ui.wizard.AnnotationSelectionWizardStep({context:this.context,extensionFilters:this._aExtensionFilters});var e=this.context.i18n.getText("annotationSelectionWizardStep_title_label");return this.context.service.wizard.createWizardStep(this._step,e,"")}}),define("sap.watt.saptoolsets.ui5.common.metadatahandler/service/metadataHandler",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{METADATA_FILE_NAME:"metadata.xml",WEBAPP_FOLDER_NAME:"webapp",WEBAPP_FOLDER_NAME_XS2:"resources/webapp",WEBAPP_SCAFFOLDING_FOLDER_NAME:"src/main/webapp",MODEL_FOLDER_NAME:"model",LOCALSERVICE_FOLDER_NAME:"localService",WEBAPP_LOCALSERVICE_FOLDER_NAME:"webapp/localService",_oUpdateAnnotationsQueue:new Q.sap.Queue,onAfterGenerate:function(e){"xs2"===sap.watt.getEnv("server_type")&&(this.WEBAPP_LOCALSERVICE_FOLDER_NAME="resources/webapp/localService");var t=e.params.model,n=t.connectionData,r="",i=null;if(e.params.model.webappPath)r=e.params.model.webappPath,i=this.context.service.filesystem.documentProvider.getDocument(e.params.targetDocument.getEntity().getFullPath()+"/"+r);else if(t.componentPath){var o=t.componentPath.split("/"),a="/"+o[1];o[2]&&(a=t.componentPath.slice(0,t.componentPath.lastIndexOf("/"))),i=this.context.service.filesystem.documentProvider.getDocument(a)}else i=Q(e.params.targetDocument);var s=this;return i.then(function(r){if(n){var i=t.componentPath?t.connectionData.serviceName:"",o=t.connectionData.metadataPath;return s.updateMetadataXml(r,n.metadataContent,i,o).then(function(){ if(s._addTemplateInfoToAppDescriptor(e).done(),t.annotationsXML||t.annotations)return s._generateAnnotationFiles(r,t,o)})}if(t.annotationsXML||t.annotations)return s._addTemplateInfoToAppDescriptor(e).done(),s._generateAnnotationFiles(r,t,o)}).then(function(){return s.context.event.fireMetadataUploaded()})},_generateAnnotationFiles:function(e,t,n){var r=t.annotations,i=this,o=[];if(r)for(var a=0;a-1;return i?n.WEBAPP_LOCALSERVICE_FOLDER_NAME:n.LOCALSERVICE_FOLDER_NAME}}):r.isScaffoldingBased(e).then(function(t){var r=t?n.WEBAPP_SCAFFOLDING_FOLDER_NAME:n.WEBAPP_FOLDER_NAME;return e.objectExists(r).then(function(t){return t?e.objectExists(n.LOCALSERVICE_FOLDER_NAME).then(function(e){return e?n.WEBAPP_LOCALSERVICE_FOLDER_NAME:r+"/"+n.MODEL_FOLDER_NAME}):n.MODEL_FOLDER_NAME})})}).fail(function(){return n.MODEL_FOLDER_NAME})}},getMetadataDocuments:function(e){if(e){var t=this;return t.getMetadataPath(e).then(function(n){return e.getCurrentMetadata(!0).then(function(e){for(var r=[],i=new RegExp("/"+n+"(/.+)?/"+t.METADATA_FILE_NAME),o=0;oIconDialog_SearchTooltip}",suggest:t}).addStyleClass("SearchField"),o=new sap.ui.table.Table({title:"",selectionMode:sap.ui.table.SelectionMode.Single,selectionBehavior:sap.ui.table.SelectionBehavior.RowOnly,visibleRowCount:9,rows:"{/icons}",width:"100%",columns:[new sap.ui.table.Column({label:new sap.ui.commons.Label({text:"{i18n>IconDialog_Icon}",design:sap.ui.commons.LabelDesign.Bold}),template:new sap.ui.core.Icon({src:"{icon}"}).addStyleClass("iconsize"),resizable:!1,width:"30%"}),new sap.ui.table.Column({label:new sap.ui.commons.Label({text:"{i18n>IconDialog_Name}",design:sap.ui.commons.LabelDesign.Bold}),template:new sap.ui.commons.TextView({text:"{name}"}),resizable:!1,width:"70%"})],rowSelectionChange:function(e){e.getParameter("rowContext")&&(r.setProperty("/selectedIcon",e.getParameter("rowContext").getProperty("name")),r.setProperty("/hasSelection",!0))}}),a=new sap.ui.commons.Dialog({title:"{i18n>IconDialog_SelectIcon}",resizable:!1,width:"420px",height:"500px",modal:!0,content:[i,o],buttons:[new sap.ui.commons.Button({text:"{i18n>IconDialog_OKButton}",enabled:"{/hasSelection}",press:function(){r.setProperty("/accepted",!0),a.close()}}),new sap.ui.commons.Button({text:"{i18n>IconDialog_CancelButton}",press:function(){a.close()}})]});return a.setInitialFocus(i),a.setModel(r),{_init:e.once(function(){r.setProperty("/icons",e.sortBy(e.map(sap.ui.core.IconPool.getIconNames(),function(e){return{name:e.toLowerCase(),icon:sap.ui.core.IconPool.getIconInfo(e).uri}}),"name")),this.context.i18n.applyTo(a)}),openIconDialog:function(e){function n(){a.detachClosed(n),s.resolve({icon:r.getProperty("/selectedIcon"),accepted:r.getProperty("/accepted")})}var s=Q.defer();return this._init(),r.setProperty("/selectedIcon",(e||"").replace(/^(sap-icon:\/\/)(.*)/,"$2")),r.setProperty("/accepted",!1),t(),r.setProperty("/hasSelection",o.getSelectedIndex()!==-1),i.setValue(""),a.attachClosed(n),a.open(),s.promise}}}),define("sap/watt/platform/plugin/platform/service/ui/AbstractConfig",[],function(){"use strict";var e=sap.ui.base.Object.extend("sap.watt.common.plugin.platform.service.ui.AbstractConfig",{getProjectSettingContent:function(e,t){return Q()},saveProjectSetting:function(e,t){return Q()},getUserPreferenceContent:function(e,t){return Q()},saveUserPreference:function(e,t){return Q()}});return e}),define("sap.watt.saptoolsets.ui5.common.ui5versionsui/service/ui5VersionsUi",["sap/watt/platform/plugin/platform/service/ui/AbstractConfig","sap/watt/lib/lodash/lodash"],function(e,t){"use strict";return e.extend("sap.watt.saptoolsets.ui5.common.ui5versionsui.view.ui5VersionsUi",{LIBRARY_NAME:"sapui5",constructor:function(){this._oView=null},init:function(){return this.context.service.resource.includeStyles([{uri:"sap.watt.saptoolsets.ui5.common.ui5versionsui/css/ui5versionsui.css",type:"css"}])},_createView:function(e){this._oView=sap.ui.view({viewName:"sap.watt.saptoolsets.ui5.common.ui5versionsui.view.ui5VersionsUi",type:sap.ui.core.mvc.ViewType.XML,viewData:{oContext:this.context,sProjectPath:e}}),this.context.i18n.applyTo(this._oView)},saveProjectSetting:function(e,t,n){var r=this,i=r._oView.getController();this.context.service.document.getDocumentByPath(n).then(function(e){var t=r._oView.getController().getSelectedVersion();return r.context.service.ui5librarymetadata.setProjectVersion(t.display,e).then(function(){var t=r._getSelectedLibraries();return r.context.service.ui5librarymetadata.setProjectSubLibraries(e,t).then(function(){return r.getUI5ProjectVersion(e).then(function(e){if(e&&e.info.ui5minimalversion&&e.info.status)return r.context.service.ui5librarymetadata.isValidVersion(e.info.ui5minimalversion).then(function(t){return i.displayError(e.info.status,t)})})})})})},_getSelectedLibraries:function(){var e=this._oView.getModel().getProperty("/libraries");return t.map(t.filter(e,["checked",!0]),"name")},getUI5ProjectVersion:function(e){return this.context.service.ui5librarymetadata.getProjectVersion(e).then(function(e){if(e&&e.info)return e}).fail(function(){})},_setVersionsList:function(){var e=this;return this.context.service.ui5librarymetadata.getVersions(this.LIBRARY_NAME).then(function(t){e._oView.getController().setVersions(t)})},getProjectSettingContent:function(e,t,n){this._createView(n),this._setVersionsList();var r=this,i=r._oView.getController();return this.context.service.document.getDocumentByPath(n).then(function(e){return r.context.service.ui5librarymetadata.getProjectVersion(e).then(function(t){return t&&!t.value&&t.info.status?Q.reject(t.info.status):i.updateSelectedVersion(t).then(function(){return r.context.service.ui5librarymetadata.areProjectSubLibrariesEditable(e).then(function(e){return e?i.setLibrariesList():void r._oView.getModel().setProperty("/bIsManifest",!1)})})}).fail(function(e){return r._oView.getModel().setProperty("/bIsManifest",!1),i.displayError(e)})}),this._oView},isAvailable:function(e){var t=this,n="hcproxy"===sap.watt.getEnv("server_type")||"local_hcproxy"===sap.watt.getEnv("server_type");return!!n&&t.context.service.projectType.hasProjectType(e,"mta").then(function(n){return!n&&t.context.service.ui5librarymetadata.isProjectVersionEditable(e)})}})});var JSZip=function(e,t){this.files={},this.root="",e&&this.load(e,t)};JSZip.signature={LOCAL_FILE_HEADER:"PK",CENTRAL_FILE_HEADER:"PK",CENTRAL_DIRECTORY_END:"PK",ZIP64_CENTRAL_DIRECTORY_LOCATOR:"PK",ZIP64_CENTRAL_DIRECTORY_END:"PK",DATA_DESCRIPTOR:"PK\b"},JSZip.defaults={base64:!1,binary:!1,dir:!1,date:null,compression:null},JSZip.support={arraybuffer:function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array}(),nodebuffer:function(){return"undefined"!=typeof Buffer}(),uint8array:function(){return"undefined"!=typeof Uint8Array}(),blob:function(){if("undefined"==typeof ArrayBuffer)return!1;var e=new ArrayBuffer(0);try{return 0===new Blob([e],{type:"application/zip"}).size}catch(e){}try{var t=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,n=new t;return n.append(e),0===n.getBlob("application/zip").size}catch(e){}return!1}()},JSZip.prototype=function(){var e,t;JSZip.support.uint8array&&"function"==typeof TextEncoder&&"function"==typeof TextDecoder&&(e=new TextEncoder("utf-8"),t=new TextDecoder("utf-8"));var n=function(e){if(e._data instanceof JSZip.CompressedObject&&(e._data=e._data.getContent(),e.options.binary=!0,e.options.base64=!1,"uint8array"===JSZip.utils.getTypeOf(e._data))){var t=e._data;e._data=new Uint8Array(t.length),0!==t.length&&e._data.set(t,0)}return e._data},r=function(t){var r=n(t),i=JSZip.utils.getTypeOf(r);if("string"===i){if(!t.options.binary){if(e)return e.encode(r);if(JSZip.support.nodebuffer)return new Buffer(r,"utf-8")}return t.asBinary()}return r},i=function(e){var t=n(this);return null===t||"undefined"==typeof t?"":(this.options.base64&&(t=JSZip.base64.decode(t)),t=e&&this.options.binary?JSZip.prototype.utf8decode(t):JSZip.utils.transformTo("string",t),e||this.options.binary||(t=JSZip.prototype.utf8encode(t)),t)},o=function(e,t,n){this.name=e,this._data=t,this.options=n};o.prototype={asText:function(){return i.call(this,!0)},asBinary:function(){return i.call(this,!1)},asNodeBuffer:function(){var e=r(this);return JSZip.utils.transformTo("nodebuffer",e)},asUint8Array:function(){var e=r(this);return JSZip.utils.transformTo("uint8array",e)},asArrayBuffer:function(){return this.asUint8Array().buffer}};var a=function(e,t){var n,r="";for(n=0;n>>=8;return r},s=function(){var e,t,n={};for(e=0;e0?e.substring(0,t):""},p=function(e){return"/"!=e.slice(-1)&&(e+="/"),this.files[e]||c.call(this,e,null,{dir:!0}),this.files[e]},f=function(e,t){var n,i=new JSZip.CompressedObject;return e._data instanceof JSZip.CompressedObject?(i.uncompressedSize=e._data.uncompressedSize,i.crc32=e._data.crc32,0===i.uncompressedSize||e.options.dir?(t=JSZip.compressions.STORE,i.compressedContent="",i.crc32=0):e._data.compressionMethod===t.magic?i.compressedContent=e._data.getCompressedContent():(n=e._data.getContent(),i.compressedContent=t.compress(JSZip.utils.transformTo(t.compressInputType,n)))):(n=r(e),n&&0!==n.length&&!e.options.dir||(t=JSZip.compressions.STORE,n=""),i.uncompressedSize=n.length,i.crc32=this.crc32(n),i.compressedContent=t.compress(JSZip.utils.transformTo(t.compressInputType,n))),i.compressedSize=i.compressedContent.length,i.compressionMethod=t.magic,i},d=function(e,t,n,r){var i,o,s=(n.compressedContent,this.utf8encode(t.name)),u=s!==t.name,c=t.options;i=c.date.getHours(),i<<=6,i|=c.date.getMinutes(),i<<=5,i|=c.date.getSeconds()/2,o=c.date.getFullYear()-1980,o<<=4,o|=c.date.getMonth()+1,o<<=5,o|=c.date.getDate();var l="";l+="\n\0",l+=u?"\0\b":"\0\0",l+=n.compressionMethod,l+=a(i,2),l+=a(o,2),l+=a(n.crc32,4),l+=a(n.compressedSize,4),l+=a(n.uncompressedSize,4),l+=a(s.length,2),l+="\0\0";var p=JSZip.signature.LOCAL_FILE_HEADER+l+s,f=JSZip.signature.CENTRAL_FILE_HEADER+"\0"+l+"\0\0\0\0\0\0"+(t.options.dir===!0?"\0\0\0":"\0\0\0\0")+a(r,4)+s;return{fileRecord:p,dirRecord:f,compressedObject:n}},h=function(){this.data=[]};h.prototype={append:function(e){e=JSZip.utils.transformTo("string",e),this.data.push(e)},finalize:function(){return this.data.join("")}};var m=function(e){this.data=new Uint8Array(e),this.index=0};return m.prototype={append:function(e){0!==e.length&&(e=JSZip.utils.transformTo("uint8array",e),this.data.set(e,this.index),this.index+=e.length)},finalize:function(){return this.data}},{load:function(e,t){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(e){var t,n,r,i,a=[];for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],i=new o(r.name,r._data,s(r.options)),n=t.slice(this.root.length,t.length),t.slice(0,this.root.length)===this.root&&e(n,i)&&a.push(i));return a},file:function(e,t,n){if(1===arguments.length){if(JSZip.utils.isRegExp(e)){var r=e;return this.filter(function(e,t){return!t.options.dir&&r.test(e)})}return this.filter(function(t,n){return!n.options.dir&&t===e})[0]||null}return e=this.root+e,c.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(JSZip.utils.isRegExp(e))return this.filter(function(t,n){return n.options.dir&&e.test(t)});var t=this.root+e,n=p.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!=e.slice(-1)&&(e+="/"),t=this.files[e]),t)if(t.options.dir)for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),r=0;r>>8^i;return t^-1},clone:function(){var e=new JSZip;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e},utf8encode:function(t){if(e){var n=e.encode(t);return JSZip.utils.transformTo("string",n)}if(JSZip.support.nodebuffer)return JSZip.utils.transformTo("string",new Buffer(t,"utf-8"));for(var r=[],i=0,o=0;o127&&a<2048?(r[i++]=String.fromCharCode(a>>6|192),r[i++]=String.fromCharCode(63&a|128)):(r[i++]=String.fromCharCode(a>>12|224),r[i++]=String.fromCharCode(a>>6&63|128),r[i++]=String.fromCharCode(63&a|128))}return r.join("")},utf8decode:function(e){var n=[],r=0,i=JSZip.utils.getTypeOf(e),o="string"!==i,a=0,s=0,u=0,c=0;if(t)return t.decode(JSZip.utils.transformTo("uint8array",e));if(JSZip.support.nodebuffer)return JSZip.utils.transformTo("nodebuffer",e).toString("utf-8");for(;a191&&s<224?(u=o?e[a+1]:e.charCodeAt(a+1),n[r++]=String.fromCharCode((31&s)<<6|63&u),a+=2):(u=o?e[a+1]:e.charCodeAt(a+1),c=o?e[a+2]:e.charCodeAt(a+2),n[r++]=String.fromCharCode((15&s)<<12|(63&u)<<6|63&c),a+=3);return n.join("")}}}(),JSZip.compressions={STORE:{magic:"\0\0",compress:function(e){return e},uncompress:function(e){return e},compressInputType:null,uncompressInputType:null}},function(){function e(e){return e}function t(e,t){for(var n=0;n1;)try{"array"===i||"nodebuffer"===i?n.push(String.fromCharCode.apply(null,e.slice(o,Math.min(o+t,r)))):n.push(String.fromCharCode.apply(null,e.subarray(o,Math.min(o+t,r)))),o+=t}catch(e){t=Math.floor(t/2)}return n.join("")}function r(e,t){for(var n=0;n>2,s=(3&r)<<4|i>>4,u=(15&i)<<2|o>>6,c=63&o,isNaN(i)?u=c=64:isNaN(o)&&(c=64),l=l+e.charAt(a)+e.charAt(s)+e.charAt(u)+e.charAt(c);return l},decode:function(t,n){var r,i,o,a,s,u,c,l="",p=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");p>4,i=(15&s)<<4|u>>2,o=(3&u)<<6|c,l+=String.fromCharCode(r),64!=u&&(l+=String.fromCharCode(i)),64!=c&&(l+=String.fromCharCode(o));return l}}}(),define("sap/watt/lib/jszip/jszip",function(e){return function(){var t;return t||e.JSZip}}(this)),function(){"use strict";if(!JSZip)throw"JSZip not defined";var e={};(function(){(function(){function e(e,t){var n=e.split("."),r=d;!(n[0]in r)&&r.execScript&&r.execScript("var "+n[0]);for(var i;n.length&&(i=n.shift());)n.length||t===p?r=r[i]?r[i]:r[i]={}:r[i]=t}function t(e,t){if(this.index="number"==typeof t?t:0,this.d=0,this.buffer=e instanceof(h?Uint8Array:Array)?e:new(h?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&n(this)}function n(e){var t,n=e.buffer,r=n.length,i=new(h?Uint8Array:Array)(r<<1);if(h)i.set(n);else for(t=0;t>16&255,i[o++]=n>>24;var a;switch(f){case 1===r:a=[0,r-1,0];break;case 2===r:a=[1,r-2,0];break;case 3===r:a=[2,r-3,0];break;case 4===r:a=[3,r-4,0];break;case 6>=r:a=[4,r-5,1];break;case 8>=r:a=[5,r-7,1];break;case 12>=r:a=[6,r-9,2];break;case 16>=r:a=[7,r-13,2];break;case 24>=r:a=[8,r-17,3];break;case 32>=r:a=[9,r-25,3];break;case 48>=r:a=[10,r-33,4];break;case 64>=r:a=[11,r-49,4];break;case 96>=r:a=[12,r-65,5];break;case 128>=r:a=[13,r-97,5];break;case 192>=r:a=[14,r-129,6];break;case 256>=r:a=[15,r-193,6];break;case 384>=r:a=[16,r-257,7];break;case 512>=r:a=[17,r-385,7];break;case 768>=r:a=[18,r-513,8];break;case 1024>=r:a=[19,r-769,8];break;case 1536>=r:a=[20,r-1025,9];break;case 2048>=r:a=[21,r-1537,9];break;case 3072>=r:a=[22,r-2049,10];break;case 4096>=r:a=[23,r-3073,10];break;case 6144>=r:a=[24,r-4097,11];break;case 8192>=r:a=[25,r-6145,11];break;case 12288>=r:a=[26,r-8193,12];break;case 16384>=r:a=[27,r-12289,12];break;case 24576>=r:a=[28,r-16385,13];break;case 32768>=r:a=[29,r-24577,13];break;default:throw"invalid distance"}n=a,i[o++]=n[0],i[o++]=n[1],i[o++]=n[2];var s,u;for(s=0,u=i.length;s=o;)b[o++]=0;for(o=0;29>=o;)_[o++]=0}for(b[256]=1,r=0,i=t.length;r=i){for(d&&n(d,-1),o=0,a=i-r;oa&&t+al&&(i=r,l=a),258===a)break}return new o(l,t-i)}function u(e,t){var n,i,o,a,s,u=e.length,l=new r(572),p=new(h?Uint8Array:Array)(u);if(!h)for(a=0;a2*c[o-1]+l[o]&&(c[o]=2*c[o-1]+l[o]),f[o]=Array(c[o]),d[o]=Array(c[o]);for(i=0;ie[i]?(f[o][a]=s,d[o][a]=t,u+=2):(f[o][a]=e[i],d[o][a]=i,++i);m[o]=0,1===l[o]&&r(o)}return p}function l(e){var t,n,r,i,o=new(h?Uint16Array:Array)(e.length),a=[],s=[],u=0;for(t=0,n=e.length;t>>=1;return o}var p=void 0,f=!0,d=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array;t.prototype.a=function(e,t,r){var i,o=this.buffer,a=this.index,s=this.d,u=o[a];if(r&&1>>8&255]<<16|b[e>>>16&255]<<8|b[e>>>24&255])>>32-t:b[e]>>8-t),8>t+s)u=u<>t-i-1&1,8===++s&&(s=0,o[a++]=b[u],u=0,a===o.length&&(o=n(this)));o[a]=u,this.buffer=o,this.d=s,this.index=a},t.prototype.finish=function(){var e,t=this.buffer,n=this.index;return 0m;++m){for(var v=m,y=v,x=7,v=v>>>1;v;v>>>=1)y<<=1,y|=1&v,--x;g[m]=(y<>>0}var b=g;r.prototype.getParent=function(e){return 2*((e-2)/4|0)},r.prototype.push=function(e,t){var n,r,i,o=this.buffer;for(n=this.length,o[this.length++]=t,o[this.length++]=e;0o[r]);)i=o[n],o[n]=o[r],o[r]=i,i=o[n+1],o[n+1]=o[r+1],o[r+1]=i,n=r;return this.length},r.prototype.pop=function(){var e,t,n,r,i,o=this.buffer;for(t=o[0],e=o[1],this.length-=2,o[0]=o[this.length],o[1]=o[this.length+1],i=0;(r=2*i+2,!(r>=this.length))&&(r+2o[r]&&(r+=2),o[r]>o[i]);)n=o[i],o[i]=o[r],o[r]=n,n=o[i+1],o[i+1]=o[r+1],o[r+1]=n,i=r;return{index:e,value:t,length:this.length}};var _,w=2,E=[];for(_=0;288>_;_++)switch(f){case 143>=_:E.push([_+48,8]);break;case 255>=_:E.push([_-144+400,9]);break;case 279>=_:E.push([_-256+0,7]);break;case 287>=_:E.push([_-280+192,8]);break;default:throw"invalid literal: "+_}i.prototype.h=function(){var e,n,r,i,o=this.input;switch(this.e){case 0:for(r=0,i=o.length;r>>8&255,x[b++]=255&g,x[b++]=g>>>8&255,h)x.set(s,b),b+=s.length,x=x.subarray(0,b);else{for(v=0,y=s.length;v$)for(;0<$--;)te[K++]=0,ne[0]++;else for(;0<$;)J=138>$?$:138,J>$-3&&J<$&&(J=$-3),10>=J?(te[K++]=17,te[K++]=J-3,ne[17]++):(te[K++]=18,te[K++]=J-11,ne[18]++),$-=J;else if(te[K++]=ee[z],ne[ee[z]]++,$--,3>$)for(;0<$--;)te[K++]=ee[z],ne[ee[z]]++;else for(;0<$;)J=6>$?$:6,J>$-3&&J<$&&(J=$-3),te[K++]=16,te[K++]=J-3,ne[16]++,$-=J}for(e=h?te.subarray(0,K):te.slice(0,K),L=u(ne,7),V=0;19>V;V++)H[V]=L[Q[V]];for(F=19;4=e:return[265,e-11,1];case 14>=e:return[266,e-13,1];case 16>=e:return[267,e-15,1];case 18>=e:return[268,e-17,1];case 22>=e:return[269,e-19,2];case 26>=e:return[270,e-23,2];case 30>=e:return[271,e-27,2];case 34>=e:return[272,e-31,2];case 42>=e:return[273,e-35,3];case 50>=e:return[274,e-43,3];case 58>=e:return[275,e-51,3];case 66>=e:return[276,e-59,3];case 82>=e:return[277,e-67,4];case 98>=e:return[278,e-83,4];case 114>=e:return[279,e-99,4];case 130>=e:return[280,e-115,4];case 162>=e:return[281,e-131,5];case 194>=e:return[282,e-163,5];case 226>=e:return[283,e-195,5];case 257>=e:return[284,e-227,5];case 258===e:return[285,e-258,0];default:throw"invalid length: "+e}}var t,n,r=[];for(t=3;258>=t;t++)n=e(t),r[t]=n[2]<<24|n[1]<<16|n[0];return r}(),C=h?new Uint32Array(S):S;e("Zlib.RawDeflate",i),e("Zlib.RawDeflate.prototype.compress",i.prototype.h);var T,D,A,P,k={NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)T=Object.keys(k);else for(D in T=[],A=0,k)T[A++]=D;for(A=0,P=T.length;Af&&(f=e[c]),e[c]>=1;for(l=a;l>>t,e.c=i-t,e.d=s,n}function i(e,t){for(var n,r,i,o=e.f,s=e.c,u=e.input,c=e.d,l=t[0],p=t[1];s>>16,e.f=o>>i,e.c=s-i,e.d=c,65535&r}function o(e){function n(e,t,n){var o,a,s,u;for(u=0;u>>=1){case 0:var t=this.input,n=this.d,i=this.b,s=this.a,p=a,f=a,d=a,h=i.length,m=a;if(this.c=this.f=0,p=t[n++],p===a)throw Error("invalid uncompressed block header: LEN (first byte)");if(f=p,p=t[n++],p===a)throw Error("invalid uncompressed block header: LEN (second byte)");if(f|=p<<8,p=t[n++],p===a)throw Error("invalid uncompressed block header: NLEN (first byte)");if(d=p,p=t[n++],p===a)throw Error("invalid uncompressed block header: NLEN (second byte)");if(d|=p<<8,f===~d)throw Error("invalid uncompressed block header: length verify");if(n+f>t.length)throw Error("input buffer is broken");switch(this.i){case c:for(;s+f>i.length;){if(m=h-s,f-=m,u)i.set(t.subarray(n,n+m),s),s+=m,n+=m;else for(;m--;)i[s++]=t[n++];this.a=s,i=this.e(),s=this.a}break;case l:for(;s+f>i.length;)i=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(u)i.set(t.subarray(n,n+f),s),s+=f,n+=f;else for(;f--;)i[s++]=t[n++];this.d=n,this.a=s,this.b=i;break;case 1:this.j(T,A);break;case 2:o(this);break;default:throw Error("unknown BTYPE: "+e)}}return this.m()};var p,f,d=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],h=u?new Uint16Array(d):d,m=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],g=u?new Uint16Array(m):m,v=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],y=u?new Uint8Array(v):v,x=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],b=u?new Uint16Array(x):x,_=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],w=u?new Uint8Array(_):_,E=new(u?Uint8Array:Array)(288);for(p=0,f=E.length;p=p?8:255>=p?9:279>=p?7:8;var S,C,T=t(E),D=new(u?Uint8Array:Array)(30);for(S=0,C=D.length;Sa)o>=l&&(this.a=o,n=this.e(),o=this.a),n[o++]=a;else for(s=a-257,c=g[s],0=l&&(this.a=o,n=this.e(),o=this.a);c--;)n[o]=n[o++-u];for(;8<=this.c;)this.c-=8,this.d--;this.a=o},n.prototype.s=function(e,t){var n=this.b,o=this.a;this.n=e;for(var a,s,u,c,l=n.length;256!==(a=i(this,e));)if(256>a)o>=l&&(n=this.e(),l=n.length),n[o++]=a;else for(s=a-257,c=g[s],0l&&(n=this.e(),l=n.length);c--;)n[o]=n[o++-u];for(;8<=this.c;)this.c-=8,this.d--;this.a=o},n.prototype.e=function(){var e,t,n=new(u?Uint8Array:Array)(this.a-32768),r=this.a-32768,i=this.b;if(u)n.set(i.subarray(32768,n.length));else for(e=0,t=n.length;ee;++e)i[e]=i[r+e];return this.a=32768,i},n.prototype.u=function(e){var t,n,r,i,o=this.input.length/this.d+1|0,a=this.input,s=this.b;return e&&("number"==typeof e.o&&(o=e.o),"number"==typeof e.q&&(o+=e.q)),2>o?(n=(a.length-this.d)/this.n[2],i=258*(n/2)|0,r=it&&(this.b.length=t),e=this.b),this.buffer=e},e("Zlib.RawInflate",n),e("Zlib.RawInflate.prototype.decompress",n.prototype.t);var P,k,I,F,O={ADAPTIVE:l,BLOCK:c};if(Object.keys)P=Object.keys(O);else for(k in P=[],I=0,O)P[I++]=k;for(I=0,F=P.length;I=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return s.utils.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1)}},n.prototype=new t,n.prototype.byteAt=function(e){return this.data.charCodeAt(e)},n.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)},n.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.index,this.index+e);return this.index+=e,t},r.prototype=new t,r.prototype.byteAt=function(e){return this.data[e]},r.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),o=this.length-4;o>=0;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===r&&this.data[o+3]===i)return o;return-1},r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.subarray(this.index,this.index+e);return this.index+=e,t},i.prototype=new r,i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.index,this.index+e);return this.index+=e,t},o.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},prepareCompressedContent:function(e,t,n){return function(){var r=e.index;e.setIndex(t);var i=e.readData(n);return e.setIndex(r),i}},prepareContent:function(e,t,n,r,i){return function(){var e=s.utils.transformTo(r.uncompressInputType,this.getCompressedContent()),t=r.uncompress(e);if(t.length!==i)throw new Error("Bug : uncompressed data size mismatch");return t}},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readString(this.fileNameLength),e.skip(n),this.compressedSize==-1||this.uncompressedSize==-1)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize == -1 || uncompressedSize == -1)");if(t=p(this.compressionMethod),null===t)throw new Error("Corrupted zip : compression "+l(this.compressionMethod)+" unknown (inner file : "+this.fileName+")");if(this.decompressed=new s.CompressedObject,this.decompressed.compressedSize=this.compressedSize,this.decompressed.uncompressedSize=this.uncompressedSize,this.decompressed.crc32=this.crc32,this.decompressed.compressionMethod=this.compressionMethod,this.decompressed.getCompressedContent=this.prepareCompressedContent(e,e.index,this.compressedSize,t),this.decompressed.getContent=this.prepareContent(e,e.index,this.compressedSize,t,this.uncompressedSize),this.loadOptions.checkCRC32&&(this.decompressed=s.utils.transformTo("string",this.decompressed.getContent()),s.prototype.crc32(this.decompressed)!==this.crc32))throw new Error("Corrupted zip : CRC32 mismatch")},readCentralPart:function(e){if(this.versionMadeBy=e.readString(2),this.versionNeeded=e.readInt(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4),this.fileNameLength=e.readInt(2),this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");this.fileName=e.readString(this.fileNameLength),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readString(this.fileCommentLength),this.dir=!!(16&this.externalFileAttributes)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=new n(this.extraFields[1].value);this.uncompressedSize===c&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===c&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===c&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===c&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index;for(this.extraFields=this.extraFields||{};e.index1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0})},_routeHasResourcesOrWebappResourcesPath:function(e){return e.path===this._RESOURCES_PATH||e.path===this._WEBAPP_RESOURCES_PATH},_getNeoappDocumentAndContent:function(e){var t=this,n=e.getEntity().getFullPath()+"/"+this._NEO_APP_FILE_NAME;return this.context.service.document.getDocumentByPath(n).then(function(e){return e?[e,t._getNeoappContent(e)]:Q.reject("MISSING_NEOAPP")})},_getNeoappContent:function(e){return e.getContent().then(function(e){try{return JSON.parse(e)}catch(e){return Q.reject("PARSE_ERROR")}})},_getProjectMinimalVersion:function(e){var t=this;return t.context.service.ui5projecthandler.getDependencies(e).then(function(e){return e?e.minUI5Version:void 0}).fail(function(){})},_isSelectedVersionLowerThanInManifest:function(e,t){var n,r=0,i=0,o=!1;if("snapshot"===e)return!1;if(e.indexOf("snapshot")>-1){if(n=e.split("-"),!(n.length>1))return!1;n=n.splice(1,1),n=n[0].split(".")}else n=e.split(".");for(var a=t.split("."),s=0;si){o=!1;break}if(r!==i&&r0)){n[i]=""+o.pop()+"";continue}a=o.shift(),o.length>0&&(s=o.pop()),""!==s?n[i]=""+a+" "+s+"":n[i]=""+a+""}}return e}return""}}}),define("sap.watt.saptoolsets.ui5.common.ui5librarymetadata/service/UI5MetadataXMLProvider",["../util/Utilities"],function(e){"use strict";return{_sHelpUrlPrefix:"",init:function(){this.context.service.ui5librarymetadata.attachEvent("projectConfigurationChanged",function(e){var t=e.params.projectDocument;this.context.event.fireProjectConfigurationChanged({projectDocument:t}).done()},this)},configure:function(e){this._sHelpUrlPrefix=e.helpUrlPrefix},getMetadata:function(e){return this.context.service.ui5librarymetadata.getMetadata("xml",e,!1)},getHelpData:function(t){var n={};return n.helpUrl=this._getHelpUrl(t),n.helpDescription=e.formatProposalHelpDescription(t.helpDescription,this._sHelpUrlPrefix),n},_getHelpUrl:function(e){var t="",n=e.category,r=e.fullName,i=e.helpTarget;if(this._sHelpUrlPrefix&&n&&r&&i)switch(t=this._sHelpUrlPrefix+i+".html",n){case 3:t+="#event:"+r.substring(r.indexOf("#")+1);break;case 2:case 6:case 11:case 12:t+="#constructor";break;case 13:case 21:var o=r.substring(r.indexOf("#")+1);t+="#."+o}return t}}}),define("sap.watt.saptoolsets.ui5.common.ui5librarymetadata/service/UI5MetadataJSProvider",["../util/Utilities"],function(e){"use strict";return{_sHelpUrlPrefix:"",_UI5ServiceName:"sapui5",init:function(){this.context.service.ui5librarymetadata.attachEvent("projectConfigurationChanged",function(e){var t=e.params.projectDocument;this.context.event.fireProjectConfigurationChanged({projectDocument:t}).done()},this)},configure:function(e){this._sHelpUrlPrefix=e.helpUrlPrefix},getMetadata:function(e){return this.context.service.ui5librarymetadata.getMetadata("js",e,!1)},getHelpData:function(t){var n={};return n.helpUrl=this._getHelpUrl(t),n.helpDescription=e.formatProposalHelpDescription(t.helpDescription,this._sHelpUrlPrefix),n},_getHelpUrl:function(e){var t,n=this,r=e.category,i=e.helpTarget;if("namespace"===r||"class"===r||"static class"===r)t=n._sHelpUrlPrefix+i+".html";else if("function"===r||"template"===r&&e.isStatic&&!e.name){var o=i.lastIndexOf(".");if(o>0){var a=(e.isStatic?".":"")+i.substring(o+1),s=i.substring(0,o);t=n._sHelpUrlPrefix+s+".html#"+a}}else"template"===r&&(t=n._sHelpUrlPrefix+i+".html#constructor");return t}}}),define("sap.watt.saptoolsets.ui5.common.ui5librarymetadatafromhcp/service/UI5LibraryMetadataFromHcp",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{_aUi5Versions:null,_oActiveVersion:null,_INTERNAL_ENV:"sapui5versionsinternal",_EXTERNAL_ENV:"sapui5versions",_UI5TEMPLATES:"ui5templates",_SNAPSHOT_VERSION:"sapui5nightly",getVersionsOverview:function(){var t=this;return this._getUI5Data(sap.watt.getEnv("context_root")+this._UI5TEMPLATES+"/versionoverview.json").then(function(n){if(n&&n.versions){var r=n.versions,i=[];return t.getVersions().then(function(t){if(t)for(var n=0;n0)return e._aUi5Versions=t,e._aUi5Versions}):e._isNullUndefinedOrArrayOfZero(e._aUi5Versions)?Q([]):Q(e._aUi5Versions)},getMetadata:function(t,n,r){var i=this;return this._getVersionFromHCP(n).then(function(n){if(!n)return Q();var o=n.value,a=sap.watt.getEnv("context_root")+(sap.watt.getEnv("internal")&&"internal"===n.info.source?i._INTERNAL_ENV:i._EXTERNAL_ENV);a="snapshot"===o.toLowerCase()?"/"+i._SNAPSHOT_VERSION:a+"/"+o;var s={},u=[];return r.forEach(function(e){var n=a+"/test-resources/"+e.replace(/\./g,"/")+"/designtime/codeassistance/",r=n+"Library."+t+"meta.json",o=n+"Library."+t+"templates.json";u.push(i._getDataFromHCP(r,"text",e,"index")),u.push(i._getDataFromHCP(o,"text",e,"template"))}),Q.allSettled(u).then(function(t){return t.forEach(function(t){"fulfilled"===t.state&&e.set(s,[t.value.packageName,t.value.type],t.value.package)}),s})})},_getDataFromHCP:function(e,t,n,r){return window.location.origin||(window.location.origin=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")),this._getResponseFromHCP(window.location.origin+e,t,n,r).fail(function(){return console.log("Missed "+window.location.origin+e),Q.reject()})},_getResponseFromHCP:function(e,t,n,r){var i=Q.defer(),o=new XMLHttpRequest;return o.open("GET",e),o.setRequestHeader("Accept","*/*"),o.responseType=t,o.onload=function(e){4===this.readyState&&this.status<300?i.resolve(this.response?{packageName:n,package:this.response,type:r}:{packageName:n,package:this.responseText,type:r}):i.reject(e)},o.send(),i.promise},_getVersionFromHCP:function(t){return this.getVersions().then(function(n){return e.clone(e.find(n,{value:t}))})},getSubLibraries:function(e){var t=this;return this._getVersionFromHCP(e).then(function(e){return t._getUI5Libraries(e)})},_getUI5Libraries:function(t){var n="",r="snapshot"===t.value.toLowerCase();r||(n=sap.watt.getEnv("context_root")+(sap.watt.getEnv("internal")&&"internal"===t.info.source?this._INTERNAL_ENV:this._EXTERNAL_ENV));var i=r?this._SNAPSHOT_VERSION:t.value,o=n+"/"+i+"/resources/sap-ui-version.json";return this._getUI5Data(o).then(function(t){if(t&&t.libraries){var n=e.map(t.libraries,"name");return e.reject(n,function(e){var t=/(^themelib_|.*\.server\..*)/i;return t.test(e)})}return[]})},_isNullUndefinedOrArrayOfZero:function(e){return this._isNullOrUndefined(e)||!this._isNullOrUndefined(e.length)&&0===e.length},_getUI5Data:function(e){var t=this,n=Q.defer();return window.location.origin||(window.location.origin=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")),jQuery.ajax({url:window.location.origin+e,dataType:"json",success:function(e){n.resolve(e)},error:function(){n.reject()}}),n.promise.fail(function(){t.context.service.log.warn("UI5 Versions From HCP","Error while fetching data for SAPUI5 versions from "+e,["user"]).done()})},_getUI5Versions:function(){var e=this,t=[this._getUI5Data(sap.watt.getEnv("context_root")+this._EXTERNAL_ENV+"/neo-app.json")];return sap.watt.getEnv("internal")&&t.push(this._getUI5Data(sap.watt.getEnv("context_root")+this._INTERNAL_ENV+"/neo-app.json")),Q.allSettled(t).spread(function(t,n){return e._getUI5AllVersions(t,n)})},_isNullOrUndefined:function(e){return void 0===e||null===e},_isNullOrUndefinedOrPromiseRejected:function(e){return void 0===e||null===e||void 0===e.value},_getUI5AllVersions:function(e,t){var n=this._isNullOrUndefinedOrPromiseRejected(e),r=this._isNullOrUndefinedOrPromiseRejected(t);if(n&&r)return[];var i=[];if(n||this._addUi5versions(e.value,i,"external"),r||this._addUi5versions(t.value,i,"internal"),sap.watt.getEnv("internal")){var o={aSnapshotVersions:[],aStandardVersions:[]};if(o=i.reduce(function(e,t){return t.value.indexOf("snapshot")>-1?o.aSnapshotVersions.push(t):o.aStandardVersions.push(t),o},0),o&&o.aStandardVersions&&o.aStandardVersions.length>0&&(i=o.aStandardVersions),i.sort(this._sortVersions),o&&o.aSnapshotVersions&&o.aSnapshotVersions.length>0)for(var a=0;a-1){i.splice(c,0,s);break}if(u>l.value){i.splice(c,0,s);break}}}}else i.sort(this._sortVersions);return this._oActiveVersion&&i.splice(0,0,this._oActiveVersion),i},_addUi5versions:function(e,t,n){var r;if(null!==e.routes&&void 0!==e.routes)for(var i=0;i0){var n=t.filter(function(e){return"Innovation"===e.support}),r=t.filter(function(e){return"Maintenance"===e.support}),i=[];if(r&&r.length>0&&(n.sort(e._compare),r.sort(e._compare),r.forEach(function(t){var n=e._constructVersionName(t,"Maintenance");t.patch&&n&&i.push({versionName:n,sVersion:t.patch})})),n&&n.length>0){var o=e._constructVersionName(n[0],"Innovation");n[0].patch&&o&&i.unshift({versionName:o,sVersion:n[0].patch})}return Q(i)}return Q([])})},_compare:function(e,t){return e.patch0){var r=n[0].fullPath,i=t.getEntity().getParentPath().split("/");return e.forEach(n,function(e){var t=e.fullPath.split("/");t[2]===i[2]&&(r=e.fullPath)}),r}})},getI18nFilePathFromManifest:function(e,t,n){if(e&&t[e]){var r="";if(t[e].settings&&t[e].settings.bundleName){var i=t[e].settings.bundleName;return i=i.replace(/\./g,"/"),r=n+i.substring(i.indexOf("i18n"),i.length)+".properties",{fullPath:r,modelName:e}}if(t[e].settings&&t[e].settings.bundleUri)return r=n+t[e].settings.bundleUri,{fullPath:r,modelName:e};if(t[e].uri)return r=n+t[e].uri,{fullPath:r,modelName:e}}},filteri18nByManifestModels:function(t,n,r){var i=[];t=e.keyBy(t,"fullPath");for(var o=this._convertModelsArrayToi18nFilePathArray(n,r),a=0;a");if(t.length>1){var n=t[1].substring(0,t[1].indexOf("}")),r=t[0].substring(t[0].indexOf("{")+1,t[0].length);return{sI18nModelName:r,sI18nValue:n}}}}}),define("sap.watt.saptoolsets.ui5.common.plugin.I18n/command/EditI18n",["../util/Utilities"],function(e){"use strict";return{_oI18n:"",execute:function(){var e=this;return this._getCurrDocumentInfo().then(function(t){if(t.doc.getProject().then(function(t){t?e.context.service.usagemonitoring.report("editor","editi18n","from_command",t.getTitle()).done():e.context.service.usagemonitoring.report("editor","editi18n","from_command","").done()}).done(),t&&t.contentStatus.token&&t.contentStatus.token.value)return e._isI18nStringValid(t.contentStatus.token.value,t.doc).then(function(n){return n.length>0?e.context.service.translation.openAddEntryDialogForEditingI18n(n,t.doc):e.context.service.usernotification.liteNotificationInfo(e.context.i18n.getText("i18n","noI18nKeyExistError"))})})},isAvailable:function(){var e=/(.js|view.xml|fragment.xml)$/;return this.context.service.selection.getOwner().then(function(t){if(t&&t.instanceOf&&t.instanceOf("sap.watt.common.plugin.aceeditor.service.Editor"))return t.getSelection().then(function(t){if(t){var n=t.document,r=n.getExtInfo();return(!r||!r.external)&&e.exec(n.getTitle())}return!1})})},_getCurrDocumentInfo:function(){return this.context.service.selection.getOwner().then(function(e){return e.getSelection().then(function(t){var n=t.document;return e.getContentStatus(!0,!0).then(function(e){return{doc:n,contentStatus:e}})})})},_isI18nStringValid:function(t,n){var r,i,o=e._parseI18nString(t)?e._parseI18nString(t):{sI18nValue:t.replace(/\"/g,"")},a=this,s=[],u=[];return!!o&&this._getI18nFileModelPath(o.sI18nModelName,n).then(function(e){return!!e&&(_.forEach(e,function(e){i=a.context.service.translation.getAllPropertyKeys("",e.modelPath,n).then(function(e,t){var n=_.keyBy(t,"key");n[o.sI18nValue]&&(r=n[o.sI18nValue],r.textType&&(r.textType="#"+r.textType),r.modelName=o.sI18nModelName||e.modelPath,r.fullPath=e.filePath,r.modelPath=e.modelPath,u.push(r))}.bind(void 0,e)),s.push(i)}),Q.all(s).then(function(){return u}))})},_getAllI18nFilesPath:function(t){var n=[];return e.getI18nFiles(t,this.context).then(function(e){return _.forEach(e,function(e){var t=e.fullPath;n.push({modelPath:t.substring(t.indexOf("/i18n/")+"/i18n/".length,t.indexOf(".properties")),filePath:t})}),n})},_getI18nFileModelPath:function(t,n){var r=this,i=[];return this.context.service.ui5projecthandler.getModels(n).then(function(o){return o[t]?e.getManifestFilePath(n,r.context).then(function(n){var r=n.substring(0,n.length-"manifest.json".length),a=e.getI18nFilePathFromManifest(t,o,r);if(a){var s=a.fullPath;return i.push({modelPath:s.substring(s.indexOf("/i18n/")+"/i18n/".length,s.indexOf(".properties")),filePath:s}),i}}):r._getAllI18nFilesPath(n)}).fail(function(){return r._getAllI18nFilesPath(n)})}}}),define("sap.watt.saptoolsets.ui5.common.plugin.I18n/service/GoToI18n",["sap/watt/lib/lodash/lodash","../util/Utilities"],function(e,t){"use strict";return{goToI18n:function(e,n){var r,i=this;return n&&(r=t._parseI18nString(n)),r||(r={sI18nValue:void 0,sI18nModelName:void 0}),t.getI18nFiles(e,i.context).then(function(n){return n.length>1?i.context.service.ui5projecthandler.getModels(e).then(function(o){return t.getManifestFilePath(e,i.context).then(function(e){var a=e.substring(0,e.length-13),s=t.getI18nFilePathFromManifest(r.sI18nModelName,o,a);return s&&s.fullPath?i.context.service.document.getDocumentByPath(s.fullPath).then(function(e){return e?i._openI18nFile(e,r.sI18nValue):i._filterI18nFilesAndOpenDialog(n,o,a,r)}):i._filterI18nFilesAndOpenDialog(n,o,a,r)})}).fail(function(){i._openI18nDialog(n,r.sI18nValue)}):1===n.length?i.context.service.document.getDocumentByPath(n[0].fullPath).then(function(e){return i._openI18nFile(e,r.sI18nValue)}):void i.context.service.usernotification.liteNotificationInfo(i.context.i18n.getText("i18n","noI18nPropertiesFileError")).done()})},_openI18nDialog:function(e,t){var n=new sap.ui.model.json.JSONModel;n.setData({aI18nFiles:e,currentI18nFile:e[0].fullPath,i18nValue:t}),this._oI18nDialogFragment=sap.ui.xmlfragment("sap.watt.saptoolsets.ui5.common.plugin.I18n.fragment.GoToI18n",this),this._oI18nDialogFragment.setModel(n),this.context.i18n.applyTo(this._oI18nDialogFragment),this._oI18nDialogFragment.open()},onCancel:function(){this._oI18nDialogFragment.close()},onOk:function(e){var t=this,n=e.getSource().getModel(),r=n.getProperty("/currentI18nFile"),i=n.getProperty("/i18nValue");return t.context.service.document.getDocumentByPath(r).then(function(e){return t._openI18nFile(e,i).then(function(){t._oI18nDialogFragment.close()})})},onAfterClose:function(e){this._oI18nDialogFragment.destroy()},_filterI18nFilesAndOpenDialog:function(e,n,r,i){var o=t.filteri18nByManifestModels(e,n,r);return o<1?this.context.service.usernotification.liteNotificationInfo(this.context.i18n.getText("i18n","noI18nPropertiesModelsError")):this._openI18nDialog(o,i.sI18nValue)},_openI18nFile:function(e,t){var n=this;return this.context.service.editor.getSpecificEditor(e,"aceeditor").then(function(r){return n.context.service.content.open(e,r.service).then(function(){return n._openEditorInSpecificPosition(t,r.service)})})},_openEditorInSpecificPosition:function(e,t){if(e)return t.getContentStatus().then(function(n){var r=n.buffer.indexOf(e);return r===-1&&(e=""),t.indexToPosition(r).then(function(n){return t.setSelectionRange(n,e.length)})})}}}),define("sap.watt.saptoolsets.ui5.common.plugin.I18n/service/PushToI18n",["sap/watt/lib/lodash/lodash","../util/Utilities"],function(e,t){"use strict";return{pushToI18n:function(e){var n=this;return t.getI18nFiles(e,n.context).then(function(r){return r.length<1?n.context.service.usernotification.liteNotificationInfo(n.context.i18n.getText("i18n","noI18nPropertiesFileError")).done():n.context.service.ui5projecthandler.getModels(e).then(function(i){return t.getManifestFilePath(e,n.context).then(function(o){var a=o.substring(0,o.length-13),s=t.filteri18nByManifestModels(r,i,a);return s.length<1&&(s=r),n._createI18nObj(s,e)})}).fail(function(){return n._createI18nObj(r,e)})})},_createI18nObj:function(e,t){var n=this;return this.context.service.translation.openAddEntryDialogForI18nFiles(e,t).then(function(e){if(e)return n._insertI18nString(e,t)})},_insertI18nString:function(t,n){var r="";return t.modelName||(t.modelName="i18n"),e.endsWith(n.getName(),".js")?r=t.key:e.endsWith(n.getName(),".xml")&&(r="{"+t.modelName+">"+t.key+"}"),this.context.service.aceeditor.addString(r)}}}),define("sap.watt.saptoolsets.ui5.common.plugin.I18n/codeCompletion/localI18nContentAssist",[],function(){"use strict";return{createProposals:function(e,t,n,r){return this._oContext=n,this._oDoc=r,this.filterProposalsByPrefix(t.prefix,e)},createProposalInfo:function(e){var t="",n="",r=this._oContext.i18n.getText("tooltip_info_property"),i=this._oContext.i18n.getText("tooltip_type_property"),o=this._oContext.i18n.getText("tooltip_model_property"),a=this._oContext.i18n.getText("tooltip_key_property"),s=this._oContext.i18n.getText("tooltip_filePath_property"),u="";e.extraInfo&&(t="

"+r+e.extraInfo),e.textType&&(n="

"+i+e.textType),_.endsWith(this._oDoc.getName(),".js")?u=e.key:_.endsWith(this._oDoc.getName(),".xml")&&(u="{"+e.modelName+">"+e.key+"}");var c={overwrite:!0,proposal:u,description:e.value,helpDescription:s+e.filePath+"

"+o+e.modelName+"

"+a+e.key+n+t};return c},filterProposalsByPrefix:function(e,t){var n=e.split(">");return 1===n.length?this.filterProposalsByValue(t,n):n[0]&&n[1]?(n[0]=_.trimStart(n[0],"{"),this.filterProposalsByKey(t,n)):n[0]?(n[0]=_.trimStart(n[0],"{"),this.filterProposalsByModel(t,n)):void 0},filterProposalsByValue:function(e,t){var n=this,r=[];return _.forEach(e,function(e){_.startsWith(e.value,t[0])&&(e=n.createProposalInfo(e),r.push(e))}),r},filterProposalsByModel:function(e,t){var n=this,r=[];return _.forEach(e,function(e){e.modelName===t[0]&&(e=n.createProposalInfo(e),r.push(e))}),r},filterProposalsByKey:function(e,t){var n=this,r=[];return _.forEach(e,function(e){e.modelName===t[0]&&_.startsWith(e.key,t[1])&&(e=n.createProposalInfo(e),r.push(e))}),r}}}),define("sap.watt.saptoolsets.ui5.common.plugin.I18n/service/localI18nCodeCompletion",["../util/Utilities","../codeCompletion/localI18nContentAssist"],function(e,t){"use strict";return{getWordSuggestions:function(t){var n=this;return this.context.service.document.getDocumentByPath(t.targetFile).then(function(r){return e.getI18nFiles(r,n.context).then(function(i){return n.context.service.ui5projecthandler.getModels(r).then(function(o){return e.getManifestFilePath(r,n.context).then(function(a){var s=a.substring(0,a.length-13),u=e.filteri18nByManifestModels(i,o,s);return n.getProposals(u,r,t)})}).fail(function(){if(1===i.length)return n.getProposals(i,r,t)})})})},getProposals:function(e,n,r){var i,o=this,a=[],s=[];return _.forEach(e,function(e){var t=o.getModelPath(e);i=o.context.service.translation.getAllPropertyKeys("",t.modelPath,n).then(function(e,t){_.forEach(t,function(t){t.filePath=e.filePath,t.modelName=e.modelName}),a=a.concat(t)}.bind(void 0,t))}),s.push(i),Q.all(s).then(function(){var e=t.createProposals(a,r,o.context,n);return{proposals:e}})},getModelPath:function(e){var t=e.fullPath;return e.modelName||(e.modelName="i18n"),{modelName:e.modelName,modelPath:t.substring(t.indexOf("/i18n/")+"/i18n/".length,t.indexOf(".properties")),filePath:t}},getCalculatedPrefix:function(e){var t="";return e.token&&e.token.value&&(t=e.token.value.substr(0,e.cursorPosition.column-e.token.start).slice(1)),t}}}),define("sap.watt.saptoolsets.fiori.project.servicecatalog/command/Select",{isAvailable:function(){var e=this.context.service.selection;return e.isOwner(this.context.service.servicecatalog).then(function(t){return!!t&&e.getSelection().then(function(e){return 0!==e.length&&(!!e[0].document.data("ServiceUrl")||!!e[0].document.data("RDLPackage"))})})},isEnabled:function(){return!0},execute:function(){var e=this.context.service.servicecatalog;return this.context.service.selection.getSelection().then(function(t){return e.setSelectedNode(t[0].document)})}}),define("sap.watt.saptoolsets.fiori.project.servicecatalog/command/Expand",{isAvailable:function(){var e=this.context.service.selection;return e.isOwner(this.context.service.servicecatalog).then(function(t){return!!t&&e.getSelection().then(function(e){return e.length>0&&e[0].document.getHasExpander()&&!e[0].document.getExpanded()})})},isEnabled:function(){return!0},execute:function(){return this.context.service.selection.getSelection().then(function(e){var t=e[0].document;t&&(t.setExpanded(!0),t.fireToggleOpenState(!0))})}}),define("sap.watt.saptoolsets.fiori.project.servicecatalog/command/Collapse",{isAvailable:function(){var e=this.context.service.selection;return e.isOwner(this.context.service.servicecatalog).then(function(t){return!!t&&e.getSelection().then(function(e){return e.length>0&&e[0].document.getHasExpander()&&e[0].document.getExpanded()})})},isEnabled:function(){return!0},execute:function(){return this.context.service.selection.getSelection().then(function(e){var t=e[0].document;t&&(t.setExpanded(!1),t.fireToggleOpenState(!1))})}}),define("sap.watt.saptoolsets.fiori.project.servicecatalog/utils/DataConnectionUtils",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{BSP_EXECUTE_ABAP:"bsp_execute_abap",_CATALOG_APIMGMT_PROXY:"api_mgmt_proxy",getAdditionalData:function(e){ var t={};if(e)for(var n=0;nt.description.toLowerCase()?1:0},getConnections:function(e,t,n){var r=this,i=r.getFormatterConnections(e,t);return n?(r.addBSPConnections(e,i),i):i},addBSPConnections:function(e,t){var n=this,r=[];return r=e.filter(function(e){return e.wattUsage===n.BSP_EXECUTE_ABAP}),r.sort(n.compareDestinationsByDescription),r.forEach(function(e){for(var r=!1,i=0;idataConnectionWizardStep_apiDetailsLabel}",width:"100%",layoutData:new sap.ui.layout.GridData({span:"L5 M5 S5"}),visible:{path:"bSelectedApiService",formatter:function(e){return e}}}).addStyleClass("serviceCatalogHeaderLabel");this.oCatalogComboBox=new sap.ui.commons.DropdownBox({width:"100%",change:[e._handleCatalogComboBox,e],placeholder:"{i18n>catalog_select_system_placeholder}",layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"}),accessibleRole:sap.ui.core.AccessibleRole.Combobox,visible:{path:"bSelectAPIStep",formatter:function(e){return e}}}).addStyleClass("serviceCatalogStepBottomMargin"),this.populateConnections(this.oCatalogComboBox,0),this.oSearchField=new sap.ui.commons.SearchField({enableListSuggest:!1,enableFilterMode:!0,enableClear:!0,enabled:!1,width:"100%",tooltip:"{i18n>service_name_or_description_search}",suggest:[e._doSuggest,e],startSuggestion:0,layoutData:new sap.ui.layout.GridData({linebreak:!0,span:"L12 M12 S12"}),accessibleRole:sap.ui.core.AccessibleRole.Search,visible:{path:"bSelectAPIStep",formatter:function(e){return e}}}).addStyleClass("serviceCatalogStepBottomMargin"),this.oGrid.addContent(this.oCatalogComboBox),this.oGrid.addContent(this.oSearchField);var o=new sap.ui.commons.Button({text:"{i18n>dataConnectionWizardStep_apiBackToApiListButton}",lite:!0,icon:"sap-icon://navigation-left-arrow",press:function(){e.oServiceInfoAndDetailsGrid.getModel().setProperty("/modelData/bSelectAPIStep",!0),e.oServiceInfoAndDetailsGrid.getModel().setProperty("/modelData/bSelectedApiService",!0)},layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"}),visible:{path:"bSelectAPIStep",formatter:function(e){return!e}}}).addStyleClass("oBackToApiListButton");this.oGrid.addContent(o),this.oProductsTree=new sap.ui.commons.Tree({showHeader:!1,height:"300px",width:"100%",visible:{path:"bSelectAPIStep",formatter:function(e){return e===!1}},layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"}),select:function(){e.oServiceInfoAndDetailsGrid.getModel().setProperty("/modelData/bSelectedProduct",!0)}}).addStyleClass("productsTree"),this.oAPIProductsNodeTemplate=new sap.ui.commons.TreeNode({text:"{dataModel>name}",expanded:!1,nodes:[new sap.ui.commons.TreeNode({selectable:!1,text:"{dataModel>description}"}).addStyleClass("productDescriptionNode")]}),this.oGrid.addContent(this.oProductsTree);var a=new sap.ui.layout.Grid({layoutData:new sap.ui.layout.GridData({span:"L5 M5 S5"}),visible:{path:"bSelectedApiService",formatter:function(e){return e}}}),s=new sap.ui.commons.Label({text:"{i18n>dataConnectionWizardStep_apiDescriptionLabel}",width:"100%",layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"})});this.oApiDescriptionText=new sap.ui.commons.TextArea({editable:!1,wrapping:sap.ui.core.Wrapping.Soft,rows:3,width:"100%",layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"})}).addStyleClass("apiDescriptionText"),a.addContent(s),a.addContent(this.oApiDescriptionText);var u=new sap.ui.commons.Button({text:"{i18n>dataConnectionWizardStep_apiSubscribeButton}",press:function(){e.oServiceInfoAndDetailsGrid.getModel().setProperty("/modelData/bSelectAPIStep",!1),e.oServiceInfoAndDetailsGrid.getModel().setProperty("/modelData/bSelectedApiService",!1)},visible:{path:"bSelectedApiService",formatter:function(e){return e}},enabled:{path:"bHasRelatedProduct",formatter:function(e){return e}}}),c=new sap.ui.commons.Button({text:"{i18n>dataConnectionWizardStep_apiSelectProductButton}",press:function(){e._onSubscribeToProduct()},visible:{path:"bSelectAPIStep",formatter:function(e){return!e}},enabled:{path:"bSelectedProduct",formatter:function(e){return e}}}),l=new sap.ui.layout.HorizontalLayout({content:[u,c],layoutData:new sap.ui.layout.GridData({span:"L7 M7 S7"})}).addStyleClass("subscribeLayout");this.oServiceInfoAndDetailsGrid.addContent(r),this.oServiceInfoAndDetailsGrid.addContent(i),this.oServiceInfoAndDetailsGrid.addContent(this.oGrid),this.oServiceInfoAndDetailsGrid.addContent(a),this.oServiceInfoAndDetailsGrid.addContent(l)},_resetTreeFields:function(){this.oTree&&(this.oGrid.removeContent(this.oTree),this.nodes=void 0,this.oSearchField.setValue(""),this._markAsDisabled(this.oSearchField,!0),this.context.event.fireValidateNextSent({bNextEnabled:!1,message:"",severity:""}).done())},populateConnections:function(e,n){var r=this;this.context.event.fireRequestSent().done(),this.context.service.destination.getDestinations().then(function(i){t.forEach(i,function(e){if(e.wattUsage===r._CATALOG_APIMGMT_PROXY)return r._oApiManagmentEndPointDest=e,!1}),e.addItem(new sap.ui.core.ListItem({text:""}).data("connection",void 0)),r._getFormatterConnections(i,n).forEach(function(t){e.addItem(new sap.ui.core.ListItem({text:t.name}).data("connection",t))});var o=e.getItems();2===o.length&&(e.fireEvent("change",{selectedItem:o[1]}),e.setSelectedItemId(o[1].getId()))}).fail(function(e){r._throwValidate(e)}).fin(function(){r.context.event.fireRequestCompleted().done()})},_markAsDisabled:function(e,t){e.setEnabled(!t)},_onBeforeClose:function(e){e&&e.data&&(this.context.event.fireValidateNextSent({bNextEnabled:!1,sMessage:"",severity:""}).done(),this._oConnectionDetails.wattUsage===this._CATALOG_ODATA_ABAP?this._handleOnBeforeCloseOData(e):this._oConnectionDetails.wattUsage===this._CATALOG_APIMGMT_CATALOG&&this._handleOnSelectedForApiMgm(e))},getServiceConnectionData:function(e,t){var r=this,i=[],o=e.destination,a=n.getUrlPath(t),s=n.getDesigntimeUrl(o,a);o.wattUsage===this._CATALOG_ODATA_ABAP&&(t=s);var u=n.getRuntimeUrl(a,o);return o.wattUsage===this._CATALOG_GENERIC&&(u=s),e.isApimgmt&&(i.apiKey=e.apiKey),this.context.event.fireRequestSent().done(),s="/"!==s.charAt(s.length-1)?s+"/":s,this._callAjax(s+"$metadata","GET",null,"text",i).then(function(i){return""===i[0]?void r._throwValidate(new Error(r._i18n.getText("i18n","serviceCatalogWizardStep_invalid_document"))):r.context.service.csdlParser.parse(i[0],null,null).then(function(a){return r.context.service.astLibrary.getRiverAstLibrary(a.response[0]).then(function(a){return r.context.event.fireServiceSelectionCompleted({connectionData:{serviceName:"",metadata:a,runtimeUrl:u,url:t,type:r._CATALOG_RDL,destination:o,metadataContent:n.removeAbsoluteURL(i[0],o.url),apiKey:e.apiKey}})})}).fail(function(){r._throwValidate(new Error(r._i18n.getText("i18n","serviceCatalogWizardStep_could_not_parse_file")))})}).fail(function(e){r._throwValidate(new Error(e.statusText))}).fin(function(){r.context.event.fireRequestCompleted().done()})},_handleOnSelectedForApiMgm:function(e){if(e.data("APIProxy")){var t=this;this.oServiceInfoAndDetailsGrid.getModel().setProperty("/modelData/bSelectedProduct",!1),this.oApiDescriptionText.setValue(e.data("Description"));var n=this._oConnectionDetails.url,r=e.data("APIProxy")+"?$expand=ToProxyEndPoints,ToAPIProducts";this.context.event.fireRequestSent().done();var i="/"===n[n.length-1]?n+r:n+"/"+r,o=new sap.ui.model.json.JSONModel;this._oServiceCallsQueue.next(function(){t._callAjax(i,"GET",null,"json").then(function(n,r,i){o.setData(n[0]),t.oProductsTree.setModel(o,"dataModel"),t.oProductsTree.bindNodes("dataModel>/d/ToAPIProducts/results",t.oAPIProductsNodeTemplate,null,[new sap.ui.model.Filter({test:function(){return!0},path:"name"})]);var a=n[0].d.ToAPIProducts.results.length>0;if(!a){var s=t._i18n.getText("i18n","catalogService_No_Products_for_API_Proxy");t._throwValidate(new Error(s),"info")}t.oServiceInfoAndDetailsGrid.getModel().setProperty("/modelData/bHasRelatedProduct",a),t.oServiceInfoAndDetailsGrid.getModel().setProperty("/modelData/bSelectedApiService",!0),e.data("ServiceUrl",n[0].d.ToProxyEndPoints.results[0].base_path),sap.ui.getCore().getEventBus().publish("servicecatalog","requestCompleted")}).fail(function(n){t._errorHandler(new Error(n.statusText),e)}).fin(function(){t.context.event.fireRequestCompleted().done()})})}},_handleOnBeforeCloseOData:function(e){if(e.data("ServiceUrl")){var t=this,r=e.data("ServiceUrl"),i=e.data("serviceName");this.context.event.fireRequestSent().done();var o="/"===r[r.length-1]?URI(r+"$metadata").path():URI(r+"/$metadata").path();o.indexOf(this._oConnectionDetails.url)===-1&&(o=o.replace(this._oConnectionDetails.path,this._oConnectionDetails.url)),this._oServiceCallsQueue.next(function(){t._callAjax(o,"GET",null,"text").then(function(o,a,s){return""===o[0]?void t._throwValidate(new Error(t._i18n.getText("i18n","serviceCatalogWizardStep_invalid_document"))):t.context.service.csdlParser.parse(o[0]).then(function(a){return t.context.service.astLibrary.getRiverAstLibrary(a.response[0]).then(function(a){return t.context.event.fireServiceSelectionCompleted({connectionData:{serviceName:i,metadata:a,runtimeUrl:n.getRuntimeUrl(r,t._oConnectionDetails),url:r,type:t._CATALOG_RDL,destination:t._oConnectionDetails,metadataContent:n.removeAbsoluteURL(o[0],t._oConnectionDetails.url),sPath:e.getBindingContext().getPath()}})})}).fail(function(){t._throwValidate(new Error(t._i18n.getText("i18n","serviceCatalogWizardStep_could_not_parse_file")))})}).fail(function(n){t._errorHandler(new Error(n.statusText),e)}).fin(function(){t.context.event.fireRequestCompleted().done()})})}},_handleCatalogComboBox:function(e){if(this.oServiceInfoAndDetailsGrid.getModel().setProperty("/modelData/bSelectedApiService",!1),!e.getParameter("selectedItem")||""===e.getParameter("selectedItem").getText())return void this._resetTreeFields();var t=e.getParameter("selectedItem").data("connection");t&&(this._populateServicesTree(t),this._oConnectionDetails=t.destination,this._sConnectionUrl=t.url)},_populateServicesTree:function(e){var t=this;this._resetTreeFields(),this.context.event.fireRequestSent().done(),e&&this.getCatalog(e).then(function(e){t.oTree=e,t.oTree.attachBrowserEvent("contextmenu",t._onRightClick,t),t.oTree.attachBrowserEvent("dblclick",t._onSelectedTreeNode,t),e.setLayoutData(new sap.ui.layout.GridData({span:"L12 M12 S12"})),e.setShowHeader(!1),e.addStyleClass("serviceCatalogStepBottomMargin"),t.oGrid.addContent(e),t.context.event.fireRequestCompleted().done(),t._markAsDisabled(t.oSearchField,!1)}).fail(function(e){t._throwValidate(e),t.context.event.fireRequestCompleted().done()}).done()},_onRightClick:function(e){e.preventDefault();for(var t=e.target;t&&!t.attributes.id;)t=t.parentElement;if(t&&t.attributes.id){var n=t.attributes.id.value,r=sap.ui.getCore().byId(n);this.setCurrentSelectedDocument(r),this.context.service.contextMenu.open(this._oContextMenuGroup,e.pageX,e.pageY).done()}},_onAPIServiceToggle:function(e){e.getSource()},_onServiceToggle:function(e){var t=this,n=e.getSource();if(n.getNodes()&&0===n.getNodes().length&&(this.context.event.fireRequestSent().done(),this._oConnectionDetails.wattUsage===this._CATALOG_ODATA_ABAP)){var r=n.data("ServiceUrl"),i=n.data("sap_client");r.indexOf(this._oConnectionDetails.url)===-1&&(r=r.replace(this._oConnectionDetails.path,this._oConnectionDetails.url));var o=URI(r).path(),a=n.data("metadata");a||this._oServiceCallsQueue.next(function(){t.context.service.odataProvider.getMetadata(o,i).then(function(e){n.data("metadata",e),require(["sap.watt.saptoolsets.fiori.project.servicecatalog/providers/ODataTreeNodesProvider"],function(r){try{r.getCatalogServiceTreeNodes(e,t.context.service.odataProvider,t.context.i18n).forEach(function(e){n.addNode(e)})}catch(e){t._errorHandler(e,n)}},t._throwValidate)}).fail(function(e){t._errorHandler(e,n)}).fin(function(){t.context.event.fireRequestCompleted().done()})})}},_doSuggest:function(e){this.nodes||(this.nodes=this.oTree.getNodes());var t=this;this.oTree.removeAllNodes(),this.nodes.forEach(function(n){n.getText().toLowerCase().indexOf(e.getParameter("value").toLowerCase())!==-1&&t.oTree.addNode(n)})},_errorHandler:function(e,t){var n="";t.getHasExpander()&&(n=e&&e.response&&e.response.statusText?e.response.statusText:e.statusText?e.statusText:e.message,t.setIsSelected(!1),t.setSelectable(!1),t.addStyleClass("serviceCatalogTreeNode"),t.setText(t.getText()),t.setHasExpander(!1),t.data("ServiceUrl",void 0),t.data("APIProxy",void 0),this.context.event.fireValidateNextSent({bNextEnabled:!1,sMessage:n,severity:""}).done())},_throwValidate:function(e,t){var n="";e.status&&401===e.status||(n=this._i18n.getText("i18n","odata_request_failed")),e.detailedMessage&&(n=e.detailedMessage),e.message&&(n=e.message),t||(t=""),this.context.event.fireValidateNextSent({bNextEnabled:!1,sMessage:n,severity:t}).done()},_getFormatterConnections:function(e,t){var r=this,i=[];return e&&(i=3===t?n.getFormatterConnections(e,[this._CATALOG_ODATA_ABAP,this._CATALOG_GENERIC]):n.getFormatterConnections(e,[this._CATALOG_ODATA_ABAP,this._CATALOG_APIMGMT_CATALOG]),i.forEach(function(e){e.type!==r._CATALOG_ODATA_ABAP||e.isFullUrl||(e.url=e.url+"/IWFND/CATALOGSERVICE;v=2")})),i},_onSelectedTreeNode:function(e){e&&e.getSource&&(e.getSource().data("ServiceUrl")||e.getSource().data("RDLApplicationName")&&e.getSource().data("RDLPackage")||e.getSource().data("serviceName")||e.getSource().data("APIProxy"))&&this._onBeforeClose(e.getSource())},_onSubscribeToProduct:function(){var e=this,t=this.oProductsTree.getSelection(),r=t.getText(),i=this.oTree.getSelection(),o=i.data("ServiceUrl"),a=i.data("ServiceName"),s=Q.defer(),u=o.split("/"),c=u.splice(0,3).join("").length+3;if(!e._oApiManagmentEndPointDest)return void e._throwValidate(new Error(e._i18n.getText("i18n","catalogService_No_Destination_for_API_Endpoint")));var l=e._oApiManagmentEndPointDest.url+"/"+o.substring(c);this.context.event.fireRequestSent().done();var p=this._context?this._context.appName:"",f={id:"0",version:"1",title:p,ToAPIProductsDetails:[{__metadata:{uri:"APIMgmt.APIProducts('"+r+"')"}}]},d=this._oConnectionDetails.url+"/APIMgmt.Applications";return this._callAjax(d,"POST",f,"json").then(function(t){var i=t[0].d.id,o=d+"('"+i+"')";e._callAjax(o,"GET",null,"json").then(function(i){e.appKey=i[0].d.app_key,e.appSecret=i[0].d.app_secret;var o={APIKey:e.appKey,appSecret:e.appSecret};e._callAjax(l+"/$metadata","GET",null,"text",o).then(function(i){if(""===t[0])throw e._throwValidate(new Error(e._i18n.getText("i18n","serviceCatalogWizardStep_invalid_document")));return e.context.service.csdlParser.parse(i[0]).then(function(t){return e.context.service.astLibrary.getRiverAstLibrary(t.response[0]).then(function(t){return e.context.event.fireServiceSelectionCompleted({connectionData:{serviceName:a,productName:r,metadata:t,runtimeUrl:l,url:l,apiKey:e.appKey,appSecret:e.appSecre,type:e._CATALOG_RDL,destination:e._oApiManagmentEndPointDest,metadataContent:n.removeAbsoluteURL(i[0],e._oApiManagmentEndPointDest.url)}})})}).fail(function(){e._throwValidate(new Error(e._i18n.getText("i18n","serviceCatalogWizardStep_could_not_parse_file")))})}).fail(function(t){e._throwValidateror(new Error(t.statusText));var n=new Error(e._i18n.getText("i18n","ajax_request_failed",[t.statusText]));s.reject(n)}).fin(function(){e.context.event.fireRequestCompleted().done()})})}).fail(function(t){e._throwValidate(new Error(t.statusText));var n=new Error(e._i18n.getText("i18n","ajax_request_failed",[t.statusText]));e._setXHRDataToError(n,t),s.reject(n)}).done(),s.promise},_getAPIMgmtCatalog:function(e){var t=this,n=new sap.ui.commons.TreeNode({text:{parts:["proxiesModel>title","proxiesModel>description","proxiesModel>version"],formatter:function(e,t,n){return e+" ["+t+"] version "+n}},expanded:!1,hasExpander:!1,selected:[t._onSelectedTreeNode,t],toggleOpenState:[t._onAPIServiceToggle,t]}).data("APIProxy","APIMgmt.APIProxies('{proxiesModel>name}')").data("Description","{proxiesModel>description}").data("ServiceName","{proxiesModel>name}"),r=new sap.ui.model.json.JSONModel,i=Q.defer(),o=e.url+"/APIMgmt.APIProxies";return this._callAjax(o,"GET",null,"json").then(function(e){r.setData(e[0]),t.oTree.setModel(r,"proxiesModel"),t.oTree.bindNodes("proxiesModel>/d/results",n,null,[new sap.ui.model.Filter({test:function(){return!0},path:"name"})]),t.oSearchField&&t._markAsDisabled(t.oSearchField,!1),sap.ui.getCore().getEventBus().publish("servicecatalog","requestCompleted"),i.resolve(t.oTree)}).fail(function(e){t._throwValidate(new Error(e.statusText));var n=new Error(t._i18n.getText("i18n","ajax_request_failed",[e.statusText]));t._setXHRDataToError(n,e),i.reject(n)}).done(),i.promise},_getODataCatalog:function(e,t){var n=this,r=new sap.ui.commons.TreeNode({text:{parts:["Title","Description"],formatter:function(e,t){return e+" ["+t+"]"}},expanded:!1,hasExpander:!0,selected:[n._onSelectedTreeNode,n],toggleOpenState:[n._onServiceToggle,n]}).data("ServiceUrl",{parts:["ServiceUrl"],formatter:function(e){return URI(e).path()}}).data("serviceName","{Title}"),i=new sap.ui.model.odata.ODataModel(e.url,!0,null,null,{},!1,!1,!0);this._getNumOfCatalogServiceCollections(i).then(function(e){i.setSizeLimit(e),n.oTree.setModel(i)});var o=t;return o||(o=Q.defer()),i.attachRequestCompleted(function(e){if(!e.getParameter("success")){var t=new Error(n._i18n.getText("i18n","serviceCatalog_request_failed"));t.status=404,o.reject(t)}n.oSearchField&&n._markAsDisabled(n.oSearchField,!1),sap.ui.getCore().getEventBus().publish("servicecatalog","requestCompleted"),o.resolve(n.oTree)}),i.attachMetadataFailed(function(){var t=e.url.indexOf(";v="),r=arguments[0].getParameters().statusCode;if(t>-1&&403===r)e.url=e.url.substring(0,t),n._getODataCatalog(e,o);else{var i,a,s=e.isFullUrl;404===r&&s?(i=n._i18n.getText("i18n","odata_full_url_request_failed"),a=r):(i=n._i18n.getText("i18n","odata_request_failed"),a=401);var u=new Error(i);u.status=a,o.reject(u)}}),i.attachMetadataLoaded(function(){n.oTree.bindNodes({path:"/ServiceCollection",template:r,parameters:{navigation:{}}})}),o.promise},_getNumOfCatalogServiceCollections:function(e){var n=Q.defer(),r=8e3;return e.read("/ServiceCollection/$count",null,null,!0,function(e,i){var o=t.parseInt(i.body);t.isNaN(o)&&(o=r),n.resolve(o)},function(e){n.resolve(r)}),n.promise},_getRDLCatalog:function(e){var t=this,n=new sap.ui.commons.TreeNode({text:{parts:["name","pkg"],formatter:function(e,t){return e+" ["+t+"]"}},selected:[t._onSelectedTreeNode,t],expanded:!1,hasExpander:!0,toggleOpenState:[t._onServiceToggle,t]}).data("RDLApplicationName","{name}").data("RDLPackage","{pkg}"),r=new sap.ui.model.json.JSONModel,i=Q.defer();return this._callAjax(e.url+"/sap/hana/rdl/catalog/service/search?exp=*","GET",null).then(function(e){r.setData(e[0]),t.oTree.setModel(r),t.oTree.bindNodes("/d/results",n),t.oSearchField&&t._markAsDisabled(t.oSearchField,!1),sap.ui.getCore().getEventBus().publish("servicecatalog","requestCompleted"),i.resolve(t.oTree)}).fail(function(e){t._throwValidate(new Error(e.statusText));var n=new Error(t._i18n.getText("i18n","ajax_request_failed",[e.statusText]));t._setXHRDataToError(n,e),i.reject(n)}).done(),i.promise},_callAjax:function(e,t,n,r,i){return i||(i={}),i["Content-Type"]="application/json",void 0!==i.apiKey&&(i["Cache-Control"]="no-cache",i["no-store"]="must-revalidate"),"POST"==t?(i["X-CSRF-Token"]="Fetch",Q.sap.ajax({type:"GET",url:e,headers:i,dataType:r,beforeSend:function(e){e.setRequestHeader("X-Requested-With",{toString:function(){return""}})}}).then(function(o){return i["X-CSRF-Token"]=o[1].getResponseHeader("X-CSRF-Token"),Q.sap.ajax({type:t,url:e,data:JSON.stringify(n),headers:i,dataType:r,beforeSend:function(e){e.setRequestHeader("X-Requested-With",{toString:function(){return""}})}})})):Q.sap.ajax({type:t,url:e,data:n?JSON.stringify(n):null,headers:i,dataType:r,beforeSend:function(e){e.setRequestHeader("X-Requested-With",{toString:function(){return""}})}})},_setXHRDataToError:function(e,t){e.status=t.status,e.statusText=t.statusText,e.responseText=t.responseText,e.responseJSON=t.responseJSON},getContent:function(){var e=this,t={};return this.oCatalogViewer&&this.oCatalogViewer.destroy(),jQuery.sap.require("sap.gateway.uitools.CatalogViewer"),this.oCatalogViewer=new sap.gateway.uitools.CatalogViewer({context:this.context,isDetailVisible:!0,isSingleSystemSelect:!0,isSystemVisible:!0,isDescriptionVisible:!0,isGeneriCatalog:!0,width:"100%",layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"}),catalogRequestSent:function(n){e.context.event.fireRequestSent().done(),t=n.getParameters().destinationObject.destination},serviceRequestSent:function(){e.context.event.fireRequestSent().done()},requestCompleted:function(){e.context.event.fireRequestCompleted().done()},serviceMetaDataLoaded:function(r){var i=r.oSource.selectedServiceModel;if(i){var o=new URI(i.ServiceUrl),a=o.path()+o.search(),s=r.getParameter("edmxContent");return e.context.event.fireServiceSelectionCompleted({connectionData:{serviceName:i.ODataNodeTitle,metadata:null,runtimeUrl:n.getRuntimeUrl(a,t),url:a,type:e._CATALOG_RDL,destination:t,metadataContent:n.removeAbsoluteURL(s,t.url),sPath:"/ServiceCollection('"+i.ID+"')"}})}},subscriptionSuccess:function(t){e.context.event.fireRequestCompleted().done()},subscriptionFail:function(t){e.context.event.fireRequestCompleted().done()},productsFound:function(t){e.context.event.fireRequestCompleted().done()},isValid:function(t){e.context.event.fireRequestCompleted().done();var n=t.getParameters().message;n&&e.context.event.fireValidateNextSent({bNextEnabled:!1,sMessage:n,severity:"error"}).done()}}),this.oCatalogViewer},setSelectedNode:function(e){return this._onBeforeClose(e)},setServiceContext:function(e){this._context=e},getCatalog:function(e){return this.oTree=new sap.ui.commons.Tree({showHeaderIcons:!1,height:"300px",width:"100%",visible:{path:"bSelectAPIStep",formatter:function(e){return e}}}),this.oSearchField&&this._markAsDisabled(this.oSearchField,!0),sap.ui.getCore().getEventBus().publish("servicecatalog","requestSent"),e.type===this._CATALOG_RDL?this._getRDLCatalog(e):e.type===this._CATALOG_ODATA_ABAP?this._getODataCatalog(e):e.type===this._CATALOG_APIMGMT_CATALOG?this._getAPIMgmtCatalog(e):void 0},cleanSelection:function(){this.oTree&&(this.oTree.collapseAll(),this.oTree.getSelection()&&this.oTree.getSelection().setIsSelected(!1)),this.oProductsTree&&(this.oProductsTree.collapseAll(),this.oProductsTree.getSelection()&&this.oProductsTree.getSelection().setIsSelected(!1)),this.oServiceInfoAndDetailsGrid&&(this.oServiceInfoAndDetailsGrid.getModel().setProperty("/modelData/bSelectedApiService",!1),this.oServiceInfoAndDetailsGrid.getModel().setProperty("/modelData/bSelectAPIStep",!0),this.oServiceInfoAndDetailsGrid.getModel().setProperty("/modelData/bHasRelatedProduct",!1),this.oServiceInfoAndDetailsGrid.getModel().setProperty("/modelData/bSelectedProduct",!1))},cleanGrid:function(){this.cleanSelection(),this.oServiceInfoAndDetailsGrid=void 0},getFocusElement:function(){return this.oServiceInfoAndDetailsGrid},getSelection:function(e){return this._oCurrentSelectedDocument},setCurrentSelectedDocument:function(e){e?this._oCurrentSelectedDocument={document:e}:this._oCurrentSelectedDocument=null,this.context.event.fireSelectionChanged().done()}});return r}),define("sap.watt.saptoolsets.fiori.project.servicecatalog/service/MTACatalogViewer",["sap/watt/platform/plugin/platform/service/ui/AbstractPart","sap/watt/lib/lodash/lodash","../utils/DataConnectionUtils"],function(e,t,n){var r=e.extend("sap.watt.saptoolsets.fiori.project.servicecatalog.service.MTACatalog",{_oServiceCallsQueue:new Q.sap.Queue,_oServiceInformationLabel:null,_context:null,_oTreeTable:null,_oGrid:null,configure:function(e){e.styles&&this.context.service.resource.includeStyles(e.styles).done()},_i18n:void 0,init:function(){jQuery.sap.require("sap.ui.core.util.MockServer")},_isV4Version:function(e){return t.isString(e)?/]*version="4.0"/i.test(e):"4.0"===t.get(e,"version")},_createGrid:function(){this.oServiceInfoAndDetailsGrid=new sap.ui.layout.Grid({vSpacing:0,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"})}),this._oGrid=new sap.ui.layout.Grid({hSpacing:0,vSpacing:0,layoutData:new sap.ui.layout.GridData({span:"L7 M7 S7"})}).addStyleClass("serviceCatalogMainGridBorder"),this._oServiceInformationLabel=new sap.ui.commons.Label({text:"xs2"===sap.watt.getEnv("server_type")?"{i18n>dataConnectionWizardStep_oMTAServicesInformationLabel}":"",textAligh:"Left",width:"100%",layoutData:new sap.ui.layout.GridData({span:"L7 M7 S7"})}).addStyleClass("serviceCatalogHeaderLabel"),this.oServiceInfoAndDetailsGrid.addContent(this._oServiceInformationLabel),this.oServiceInfoAndDetailsGrid.addContent(this._oGrid)},_resetTreeFields:function(){this._oTreeTable&&(this._oGrid.removeContent(this._oTreeTable),this.context.event.fireValidateNextSent({bNextEnabled:!1,message:"",severity:""}).done())},_addServicesTree:function(){var e=this;return this.context.service.mtaodatadiscovery.getMTAProjects().then(function(t){var n=t[0].name;e._resetTreeFields(),e.context.event.fireRequestSent().done(),e.getCatalog(n).then(function(t){e._oTreeTable=t,t.setLayoutData(new sap.ui.layout.GridData({span:"L12 M12 S12"})),e._oGrid.addContent(t),e.context.event.fireRequestCompleted().done()}).fail(function(t){e._throwValidate(t),e.context.event.fireRequestCompleted().done()}).done()})},_toggleTree:function(e,t){var n=this,r=e.actualData;return this._oServiceCallsQueue.next(function(){return n.context.service.odataProvider.validateMetadata(r).then(function(e){return require(["sap.watt.saptoolsets.fiori.project.servicecatalog/providers/MTAODataObjectTreeProvider"],function(i){var o=i.buildODataTreeObject(e,t,r);n._oTreeTable.getModel().setProperty(t+"/children",o)})}).fail(function(e){n._throwValidate(e)}).fin(function(){n.context.event.fireRequestCompleted().done()})})},_onServiceToggle:function(e){var t=this,n=e.getParameter("rowContext"),r=n&&n.sPath,i=e.getSource();if(i&&r){var o=i.getModel().getProperty(r);if(o.isRoot){var a=o.actualData,s=this._isV4Version(a);return s?void 0:a?t._toggleTree(o,r):t._retrieveMetaDataFromService(o).then(function(e){return t._toggleTree(o,r)})}}},_throwValidate:function(e,t){var n="";e.status&&401===e.status||(n=this._i18n.getText("i18n","odata_request_failed")),e.detailedMessage&&(n=e.detailedMessage),e.message&&(n=e.message),t||(t=""),this.context.event.fireValidateNextSent({bNextEnabled:!1,sMessage:n,severity:t}).done()},_onSelectedTreeNode:function(e){var t=e.getParameter("rowContext"),n=t&&t.sPath,r=e.getSource(),i=r.getModel().getProperty(n);if(r&&n&&i.isRoot)return this.context.event.fireValidateNextSent({bNextEnabled:!1,sMessage:"",severity:""}).done(),this._retrieveMetaDataFromService(i)},_isHanaWebIde:function(){return"xs2"===sap.watt.getEnv("server_type")},_getDestination:function(e,t,n){var r={};if(!this._isHanaWebIde()){var i="Dummy destination to be mapped to a real destination when running the application (hc_destmapping URL parameter)",o="destination-placeholder";r={description:i,name:o,path:n,entryPath:n}}return r},_retrieveMetaDataFromService:function(e){var t=this,n=e.serviceName,r=e.servicePath,i=e.serviceType,o=e.serviceModulePath,a=e.moduleName,s="_be";return this.context.event.fireRequestSent().done(),this._isHanaWebIde()||(r=r+"/"+n+"/",s="_api"),this._oServiceCallsQueue.next(function(){return t.context.service.mtaodatadiscovery.getServiceMetadata(o,r).then(function(u,c,l){var p="";return p=u.documentElement?(new XMLSerializer).serializeToString(u.documentElement):u,""===p?void t._throwValidate(new Error(t._i18n.getText("i18n","serviceCatalogWizardStep_invalid_document"))):t._isValidXml(p)?t.context.service.odatav4handler.isV4Version(p).then(function(u){e.actualData=p;var c=e.dependentModule?e.dependentModule:a,l=t._getDestination(i,c,e.servicePath);return u?t.context.service.odatav4handler.getV4Object(p).then(function(e){if("V4"===e.version)return t.context.event.fireServiceSelectionCompleted({connectionData:{serviceName:n,metadata:e.obj,runtimeUrl:r,url:"",type:i,metadataContent:p,sPath:o,moduleDependency:{dependentDestination:c+s,dependentModule:c},destination:l}})}).fail(function(){t._throwValidate(new Error(t._i18n.getText("i18n","serviceCatalogWizardStep_invalid_document"))); }):t.context.service.csdlParser.parse(p).then(function(e){return t.context.service.astLibrary.getRiverAstLibrary(e.response[0]).then(function(e){return t.context.event.fireServiceSelectionCompleted({connectionData:{serviceName:n,metadata:e,runtimeUrl:r,url:"",type:i,metadataContent:p,sPath:o,moduleDependency:{dependentDestination:c+s,dependentModule:c},destination:l}})})}).fail(function(){t._throwValidate(new Error(t._i18n.getText("i18n","MTAserviceCatalogWizardStep_V4_not_supported")))})}).fail(function(e){t._throwValidate(new Error(e.statusText))}).fin(function(){t.context.event.fireRequestCompleted().done()}):void t._throwValidate(new Error(t._i18n.getText("i18n","serviceCatalogWizardStep_invalid_document")))})})},_isValidXml:function(e){var t=new DOMParser,n=t.parseFromString(e,"text/xml");return 0===n.getElementsByTagName("parsererror").length},_setXHRDataToError:function(e,t){e.status=t.status,e.statusText=t.statusText,e.responseText=t.responseText,e.responseJSON=t.responseJSON},getContent:function(){return this._i18n=this.context.i18n,this._createGrid(),this._addServicesTree(),this.context.service.focus.attachFocus(this.context.self).done(),this._i18n.applyTo(this.oServiceInfoAndDetailsGrid),this.oServiceInfoAndDetailsGrid},getCatalog:function(e){var t=this,n=new sap.ui.commons.layout.HorizontalLayout({}),r=new sap.ui.commons.Label({text:"{ODataNodeTitle}",tooltip:"{serviceModulePath}"}),i=new sap.ui.commons.Image({src:"{ODataNodeImage}"});i.addStyleClass("nodeImage"),n.addContent(i),n.addContent(r),this._oTreeTable=new sap.ui.table.TreeTable({layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),showColumnVisibilityMenu:!1,visibleRowCount:6,allowColumnReordering:!1,selectionMode:sap.ui.table.SelectionMode.Single,selectionBehavior:sap.ui.table.SelectionBehavior.RowOnly,expandFirstLevel:!1,visibleRowCountMode:sap.ui.table.VisibleRowCountMode.Fixed,toggleOpenState:[t._onServiceToggle,t],rowSelectionChange:[t._onSelectedTreeNode,t],rows:{path:"/services",arrayNames:["children"]}});var o=new sap.ui.table.Column({label:"{i18n>MTAserviceCatalogWizardStep_Service_Column}",template:n,width:"50%"});this._oTreeTable.addColumn(o);var a=new sap.ui.table.Column({label:"{i18n>MTAserviceCatalogWizardStep_ModuleType_Column}",template:(new sap.ui.commons.TextView).bindProperty("text","description"),width:"30%"}),s=new sap.ui.table.Column({label:"{i18n>MTAserviceCatalogWizardStep_ModuleName_Column}",template:(new sap.ui.commons.TextView).bindProperty("text","moduleName"),width:"20%"}),u=new sap.ui.table.Column({label:"{i18n>MTAserviceCatalogWizardStep_Service_Status}",template:(new sap.ui.commons.TextView).bindProperty("text","status"),width:"20%"});this._oTreeTable.addColumn(a),this._oTreeTable.addColumn(s),"xs2"===sap.watt.getEnv("server_type")&&this._oTreeTable.addColumn(u),sap.ui.getCore().getEventBus().publish("servicecatalog","requestSent");var c={services:[]},l=new sap.ui.model.json.JSONModel(c);return t._oTreeTable.setModel(l),this.context.service.mtaodatadiscovery.getServicesForMTA(e).then(function(e){var n=t.getServicesListTreeNodes(e);if(0===n.length){var r=t._i18n.getText("i18n","MTAserviceCatalogWizardStep_NoServices");t._oServiceInformationLabel.setText(r)}return l.setProperty("/services",n),t._oTreeTable})},getServicesListTreeNodes:function(e){return e.forEach(function(e){e.serviceNameDisplay?e.ODataNodeTitle=e.serviceNameDisplay:e.ODataNodeTitle=e.serviceName,e.ODataNodeImage=require.toUrl("sap.watt.saptoolsets.fiori.project.servicecatalog/img/ServiceNormal.png"),e.children=[{name:""}],e.isRoot=!0}),e},cleanSelection:function(){this._oTreeTable&&(this._oTreeTable.collapseAll(),this._oTreeTable.clearSelection())},cleanStep:function(){this.cleanSelection(),this.oServiceInfoAndDetailsGrid=void 0},getFocusElement:function(){return this.oServiceInfoAndDetailsGrid}});return r}),define("sap.watt.saptoolsets.fiori.project.servicecatalog/service/ServiceDiscovery",["sap/watt/platform/plugin/platform/service/ui/AbstractPart","../utils/DataConnectionUtils"],function(e,t){var n=e.extend("sap.watt.saptoolsets.fiori.project.servicecatalog.service.CatalogEx",{_CATALOG_RDL:"river",_oContextMenuGroup:null,configure:function(e){e.styles&&this.context.service.resource.includeStyles(e.styles).done()},_createConnectionData:function(e,n,r){var i,o={},a="",s=e.getParameter("edmxContent");o.metadata=null,o.runtimeUrl="",o.url="",o.destination=null,o.sPath="",o.type=this._CATALOG_RDL,o.serviceName="",o.sPath="";var u="api_mgmt_catalog"===r.wattUsage,c="apihub_catalog"===r.wattUsage,l="hci_catalog"===r.wattUsage,p=r;(u||c||l)&&(p=e.getParameter("MetadataEndPtDestination"));var f;switch(n){case"Generic":f=e.oSource.selectedServiceModel,f&&(o.serviceName=f.ODataNodeTitle,o.destination=p,i=new URI(f.ServiceUrl),a=i.path()+i.search(),u?(a=t.getDesigntimeUrl(p,a),o.productName=f.ProductName,o.apiKey=f.AppKey):c?(a=t.getDesigntimeUrl(p,a),o.apiKey=e.getParameter("ApiKey")):l?a=t.getDesigntimeUrl(p,a):o.sPath="/ServiceCollection('"+encodeURIComponent(f.ID)+"')",o.runtimeUrl=t.getRuntimeUrl(a,p),o.url=a);break;case"PasteURL":f=e.oSource.serviceDetailObject,f&&(i=new URI(f.runtimeServiceUrl),a=i.path()+i.search(),o.serviceName=f.serviceName,o.runtimeUrl=t.getRuntimeUrl(f.destinationURL,p),o.url=t.getDesigntimeUrl(p,a),o.destination=p)}return o.metadataContent=t.removeAbsoluteURL(s,p.url),o},getContent:function(e){var t=this,n={};jQuery.sap.require("sap.gateway.uitools.CatalogViewer");var r=new sap.gateway.uitools.CatalogViewer({context:this.context,isDetailVisible:!0,isSingleSystemSelect:!0,isSystemVisible:!0,isDescriptionVisible:!0,isGeneriCatalog:!0,width:"100%",templateODataVersion:e,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"}),catalogRequestSent:function(e){t.context.event.fireRequestSent().done(),e.getParameters().destinationObject&&(n=e.getParameters().destinationObject.destination)},serviceRequestSent:function(e){t.context.event.fireRequestSent().done(),e.oSource.oPasteURLSelectedDestination&&(n=e.oSource.oPasteURLSelectedDestination.destination)},requestCompleted:function(){t.context.event.fireRequestCompleted().done()},serviceMetaDataLoaded:function(e){return t.context.event.fireRequestSent().done(),t.xmlMetadata=e.getParameter("edmxContent"),t.oConnectionData=t._createConnectionData(e,this.getCatalogViewType(),n),t.context.service.odatav4handler.isV4Version(t.xmlMetadata).then(function(e){return e?t.context.service.odatav4handler.getV4Object(t.xmlMetadata).then(function(e){if("V4"===e.version)return t.oConnectionData.metadata=e.obj,t.metadataContent=t.xmlMetadata,t.context.event.fireRequestCompleted().done(),t.context.event.fireServiceSelectionCompleted({connectionData:t.oConnectionData})}).fail(function(){t._throwValidate(new Error(t._i18n.getText("i18n","serviceCatalogWizardStep_invalid_document")))}):t.context.service.csdlParser.parse(t.xmlMetadata,null,null).then(function(e){return t.context.service.astLibrary.getRiverAstLibrary(e.response[0]).then(function(e){return t.oConnectionData.metadata=e,t.context.event.fireRequestCompleted().done(),t.metadataContent=t.xmlMetadata,t.context.event.fireServiceSelectionCompleted({connectionData:t.oConnectionData})})}).fail(function(e){t.context.event.fireRequestCompleted().done();var n=t.context.i18n.getText("i18n","serviceCatalogWizardStep_could_not_parse_file");t.context.service.log.error("Service Discovery",n+": "+e,["user"]).done(),t.context.event.fireValidateNextSent({bNextEnabled:!1,sMessage:n,severity:"error"}).done()})})},subscriptionSuccess:function(e){t.context.event.fireRequestCompleted().done()},subscriptionFail:function(e){t.context.event.fireRequestCompleted().done();var n=e.getParameters().message;t.context.event.fireValidateNextSent({bNextEnabled:!1,sMessage:n,severity:"error"}).done()},productsFound:function(e){t.context.event.fireRequestCompleted().done()},isValid:function(e){if(t.context.event.fireRequestCompleted().done(),"ServiceTree"!==this.getCatalogViewType()){var n=e.getParameters().message,r=!!e.getParameters().isValid;!r&&n?t.context.event.fireValidateNextSent({bNextEnabled:r,sMessage:n,severity:"error"}).done():t.context.event.fireValidateNextSent({bNextEnabled:r,sMessage:n}).done()}}});return r}});return n}),define("sap.watt.saptoolsets.fiori.project.servicecatalog/service/Connectivity",{_getFileFromFolder:function(e,t){for(var n=0;n0&&(this._aExtensionFilters=e.repositoryBrowserExtensionFilters),e.contextMenu?this.context.service.commandGroup.getGroup(e.contextMenu).then(function(e){t._oContextMenuGroup=e}):void(e.apiHubWizardStep&&(apiHubService=e.apiHubWizardStep.service))},getContent:function(){jQuery.sap.require("sap.watt.saptoolsets.ui5.project.plugin.servicecatalog.ui.wizard.ServiceCatalogWizardStep"),this._step=new sap.watt.saptoolsets.ui5.project.plugin.servicecatalog.ui.wizard.ServiceCatalogWizardStep({context:this.context,extensionFilters:this._aExtensionFilters,destinationCreationService:this.context.service.destinationcreation,apiHubService:apiHubService});var e=this.context.i18n.getText("serviceCatalogWizardStep_title_label"),t=this.context.i18n.getText("dataConnectionWizardStep_oInstructionLabel_choose_service");return this.context.service.wizard.createWizardStep(this._step,e,t)},setProgressBarOn:function(){this._step.fireProcessingStarted()},setProgressBarOff:function(){this._step.fireProcessingEnded()},createDetailsContent:function(){this._step.createDetailsContent()},onCatalogServiceSelectionSuccess:function(e){this._step.onCatalogServiceSelectionSuccess(e.params.connectionData)},onServiceCatalogStepNext:function(e){this._step.onServiceCatalogStepNext(e.params.bNextEnabled,e.params.sMessage,e.params.severity)}}),define("sap.watt.saptoolsets.fiori.project.servicecatalog/service/ConnectivityComponentFinishStep",{getContent:function(){jQuery.sap.require("sap.watt.saptoolsets.ui5.project.plugin.servicecatalog.ui.wizard.ConnectivityComponentFinishStep");var e=new sap.watt.saptoolsets.ui5.project.plugin.servicecatalog.ui.wizard.ConnectivityComponentFinishStep({context:this.context});return this.context.service.wizard.createWizardStep(e,"","")}}),define("sap.watt.saptoolsets.fiori.project.servicecatalog/service/DataConnectionUtilsProvider",[],function(){return{getDataConnectionUtils:function(){return Q.sap.require("sap.watt.saptoolsets.fiori.project.servicecatalog/utils/DataConnectionUtils").then(function(e){return e})}}}),define("sap.watt.saptoolsets.fiori.rdlastlibrary/service/astPrint",[],function(){function e(){this.printNode=function(e,o){function a(){var e=[],i=r(F);e.push(i+"namespace "),o=P(o,e);var a=o.getAccessibleByList(),s=o.getAnnotations(),u=o.getNestedContexts(),c=o.getNestedEntities(),l=o.getElements(),p=o.getActions(),f=o.getNestedTypes();n(s)&&(jQuery.each(o.getAnnotations(),function(){t(this)||this.print(I,0)}),I.push("\n"+i)),"APPLICATION"===o.componentType?I.push("application "+o.getFullyQualifiedName()+" "):I.push(e.join("")+o.getName()+" "),n(a)&&(I.push("accessible by "),jQuery.each(a,function(){t(this)||this.print(I,0)})),I.push("{\n"),F++,e=I.length,jQuery.each(u,function(){t(this)||this.print(I,F)}),I.length!==e&&n(c)&&(I.push("\n"),e=I.length),jQuery.each(c,function(){t(this)||this.print(I,F)}),I.length!==e&&n(l)&&(I.push("\n"),e=I.length),jQuery.each(l,function(){t(this)||this.print(I,F)}),I.length!==e&&n(p)&&(I.push("\n"),e=I.length),jQuery.each(p,function(){t(this)||this.print(I,F)}),I.length!==e&&n(f)&&I.push("\n"),jQuery.each(f,function(){t(this)||this.print(I,F)}),I.push(i+"}\n")}function s(){I.push(r(F)+(o.exported?"export ":"")+"view "+o.getName()+" as\n"),F++,o.getQuery().print(I,F),I.push(";\n")}function u(){var e=I.length,i=r(F),a=o.getActions(),s=o.getNestedTypes();I.push(i+(o.exported?"export ":"")+"entity "+o.getName()+" {\n"),F++,jQuery.each(o.getConstElements(),function(){t(this)||this.print(I,F)}),jQuery.each(o.getElements(),function(){t(this)||this.print(I,F)}),I.length!==e&&n(a)&&(I.push("\n"),e=I.length),jQuery.each(a,function(){t(this)||this.print(I,F)}),I.length!==e&&n(s)&&I.push("\n"),jQuery.each(s,function(){t(this)||this.print(I,F)}),I.push(i+"}\n")}function c(){I.push(r(F)),jQuery.each(o.getAnnotations(),function(){t(this)||this.print(I,0)}),I.push("const "),I.push(o.getName()),I.push(T(o,o.getType()));var e=o.defaultExpression||o.calculatedExpression;t(e)||(I.push(o.defaultExpression?" default ":" = "),e.print(I,0)),I.push(";\n")}function l(){var e=A(o).instanceOf("IEnum");I.push(r(F)),jQuery.each(o.getAnnotations(),function(){t(this)||this.print(I,0)}),o.isKey&&I.push("key "),e||I.push("element "),I.push(o.getName()),I.push(T(o,o.getType()));var n=o.defaultExpression||o.calculatedExpression;t(n)||(I.push(!e&&o.defaultExpression?" default ":" = "),n.print(I,0)),I.push(";\n")}function p(){var e=r(F),n=[],i=o.getDefaultReturnParameter();I.push(e+"action "+o.getName()+" ("),jQuery.each(o.getParameters(),function(){t(this)||this.print(n,0)}),I.push(n.join(", ")),I.push(")"),i.print(I,0),I.push(" {\n"),F++,I.push(r(F)+"/* add your code here */\n"),t(i.getType())||I.push(r(F)+"return null; //this is generate code!\n"),I.push(e+"}\n")}function f(){I.push((o.instanceOf("IRdlNamedParameter")?o.getName():"")+T(o,o.getType()))}function d(){var e=r(F);I.push(e+"type "+o.getName()),I.push(T(o,o.getFrom())),I.push(" enum {\n"),F++,jQuery.each(o.getEnumValues(),function(){t(this)||this.print(I,F)}),I.push(e+"}\n")}function h(){var e=r(F);I.push(e+"type "+o.getName()+" {\n"),F++,jQuery.each(o.getElements(),function(){t(this)||this.print(I,F)}),I.push(e+"}\n")}function m(){I.push(r(F)+"type "+o.getName()),I.push(T(o,o.getFrom())),I.push(";\n")}function g(){I.push("@"+o.getName()+" ")}function v(){I.push(o.getName()+" ")}function y(){(o.upperBound>1||o.lowerBound===o.upperBound)&&I.push("["+o.lowerBound+".."+(4294967295===o.upperBound?"*":o.upperBound)+"] ")}function x(){function e(){if(n.instanceOf("IRdlStructuredType")){var e=[],t=r(F);jQuery.each(n.getElements(),function(){e.push(t+this.getName())}),I.push(e.join(","+(a?"\n":" ")))}else i("_printQLQuery.MISSING TYPE "+n.$intf)}var t=r(F),n=o.getType(),a=n.instanceOf("IArray");I.push(t+"SELECT "),o.isReturnOne?I.push("ONE"):o.topNum&&I.push("TOP "+o.topNum.intValue+" "),a||(I.push(" "),e(),I.push(" ")),o.getFrom().print(I,F),a&&(I.push("{\n"),F++,n=n.getType(),e(),F--,I.push("\n"+t+"}")),o.where&&(I.push("\n"),I.push(t+"WHERE ???")),o.groupBy&&(I.push("\n"),o.groupBy.print(I,F)),o.orderBy&&(I.push("\n"),o.orderBy.print(I,F))}function b(){var e=[];I.push("FROM "),jQuery.each(o.getElements(),function(){t(this)||this.print(e,0)}),I.push(e.join(", ")+" ")}function _(){var e=o.expr,t="";e.instanceOf("IIdentifierExpression")?t=e.getName():i("_printQLFromElement.MISSING TYPE "+e.$intf),o.alias&&(t+=" as "+o.alias),I.push(t)}function w(){var e=r(F),t=[];I.push(e+"GROUP BY\n"),jQuery.each(o.getEntries(),function(){var n=e;this.instanceOf("IDataAccessExpr")?n+=this.getName():i("_printQLGroupBy.MISSING TYPE "+this.$intf),t.push(n)}),I.push(t.join(",\n"))}function E(){var e=r(F),t=[];I.push(e+"ORDER BY\n"),jQuery.each(o.getEntries(),function(){var e=[];this.print(e,F),t.push(e.join(""))}),I.push(t.join(",\n"))}function S(){var e=o.expr,t=r(F);I.push(t),e.instanceOf("IIdentifierExpression")?I.push(e.getName()):e.instanceOf("IExprAgg")?I.push("SUM(???)"):i("_printQLOrderBy.MISSING TYPE "+e.$intf),"Descending"===o.order&&I.push(" DESC")}function C(){if(o.instanceOf("IFalseExpression"))return I.push("false");if(o.instanceOf("ITrueExpression"))return I.push("true");if(o.instanceOf("INullExpression"))return I.push("NULL");if(o.instanceOf("IDateExpression"))return I.push(o.astDateValue);if(o.instanceOf("ITimeExpression"))return I.push(o.astTimeValue);if(o.instanceOf("IStringExpression","IUTCDateTimeExpression","IUTCTimeStampExpression"))return I.push(o.astValue);if(o.instanceOf("IDataAccessExpr"))return I.push(o.getName());if(o.instanceOf("IQLQuery")){var e=[];return o.print(e,0),I.push(e.join(" ").replace("\n",""))}if(o.instanceOf("INumberExpression")){switch(o.numberType){case"INTEGER":return I.push(o.intValue);case"DOUBLE":return I.push(o.doubleValue);case"DECIMALFLOAT":return I.push(o.floatValue)}return I.push("0")}return i("AST_PRINT._printExpression: MISSING TYPE "+o.$intf),I.push(o.astValue||o.value||o.name)}function T(e,t){if(t.instanceOf("IPrimitiveUndefined","IEnumValueType"))return"";var n=" : ";if(t.instanceOf("IPrimitiveType"))n+=t.getFullyQualifiedName(),t.instanceOf("IPrimitiveString")?n+=5e3===t.param?"":"("+t.param+")":t.instanceOf("IPrimitiveDecimal")&&(n+="("+t.p+", "+t.s+")");else if(t.instanceOf("IEnum","IRdlEntity","IDerivedType","IRdlStructuredType")){var r=D(e).getFullyQualifiedName(),o=D(t).getFullyQualifiedName();n+=0===r.indexOf(o)?t.getName():t.getFullyQualifiedName()}else if(t.instanceOf("IAssociationType")){if(n+="association ",t.cardinality){var a=[];t.getCardinality().print(a,0),n+=a.join("")}n+="to "+t.getTargetEntity().getName(),t.instanceOf("IAssociationViaBacklink")?n+=" via backlink "+t.getViaBacklinkField().getName():t.instanceOf("IAssociationViaEntity")&&(n+=" via entity "+t.getViaEntity().getName())}else if(t.instanceOf("IArray")){var s=t.getCardinality();n=T(t,t.getType()),n+="["+(4294967295===s.upperBound?"":s.upperBound)+"]"}else i("AST_PRINT._printInlineType: MISSING TYPE "+t.$intf),n="";return n}function D(t){var n=t.getFullyQualifiedName(),r=(n||"").split(".");return t.instanceOf("IElement","IRdlAction")?n=r.slice(0,-2).join("."):t.instanceOf("IRdlStructuredType","IEnum")&&(n=r.slice(0,-1).join(".")),e.getSymbol(n)}function A(t){var n=(t.getFullyQualifiedName()||"").split(".");if(t.instanceOf("IElement")){var r=n.slice(0,-1).join(".");return e.getSymbol(r)}return null}function P(e,t){return jQuery.isArray(e)&&1===e.length&&(e=e[0]),e.isExplicitlyDefined?e:(t.push(e.getName()+"."),P(e.getNestedContexts()))}if(!o||!jQuery.isFunction(o.instanceOf))return null;if(o.instanceOf("IAstPosition"))return i("AST_PRINT.printNode: Not printable node "+o.$intf,i.WARNING),null;if(o.instanceOf("IQLQuery"))throw new Error("Query element is not supported");var k=2===arguments.length,I=[],F=0;if(k||(I=arguments[2],F=arguments[3]),o.instanceOf("IRdlContext")?a():o.instanceOf("IView")?s():o.instanceOf("IRdlEntity")?u():o.instanceOf("IConstElement")?c():o.instanceOf("IElement")?l():o.instanceOf("IAction")?p():o.instanceOf("IRdlParameter")?f():o.instanceOf("IEnum")?d():o.instanceOf("IRdlStructuredType")?h():o.instanceOf("IDerivedType")?m():o.instanceOf("IRdlAnnotation")?g():o.instanceOf("IAccessibleByItem")?v():o.instanceOf("ICardinality")?y():o.instanceOf("IQLQuery")?x():o.instanceOf("IQLFrom")?b():o.instanceOf("IQLFromElement")?_():o.instanceOf("IQLGroupBy")?w():o.instanceOf("IQLOrderBy")?E():o.instanceOf("IQLOrderByEntry")?S():o.instanceOf("IRdlExpression")?C():i("AST_PRINT.printNode: MISSING TYPE "+o.$intf),k){var O=I.join("");return i(O,i.LOG),O}}}function t(e){return!e||e.autoGenerated}function n(e){var n=!1;return jQuery.each(e||[],function(){if(!t(this))return n=!0,!1}),n}function r(e){for(var t="\t";t.lengtht?1:0}void 0===n&&(n="APPLICATION_NAME_NOT_PROVIDED"),void 0===r&&(r="FILE_URI_NOT_PROVIDED");try{var E=$.parseXML(t)}catch(e){return null}var S,C,T,D={},A=[],P=null;return i(),S=e.parseCsdl(E),T=o()},parse:function(e,t,n){return this._parseCsdl(e,t,n)}}}),function(){function e(t,n){function r(){return b=t.charAt(++w),b||""}function i(e){var n="",i=w;return e&&s(),n=t.charAt(w+1)||"",w=i-1,r(),n}function o(e){for(var n=w;r();)if("\\"===b)r();else{if(e.indexOf(b)!==-1)break;if("\n"===b)break}return t.substring(n,w+1)}function a(e){var t=w,n=o(e);return w=t-1,r(),n}function s(){for(var e="";_.test(i());)r(),e+=b;return e}function u(){var e="";for(b&&_.test(b)&&(e=b);_.test(r());)e+=b;return e}function c(e){var n=w;for(e="/"===i(),r();r();){if(!e&&"*"===b&&"/"===i()){r();break}if(e&&"\n"===b)return t.substring(n,w)}return t.substring(n,w)+b}function l(e){return t.substring(w-e.length,w).toLowerCase()===e}function p(){for(var e=0,n=w+1;nD):k=T>=D):"}"===b?(d(),A["}"](b),k=!1,I=!1,D&&D--,y&&0===T&&A.newLine(!0)):":"===b?(s(),!k&&!F||l("&")||p()?":"===i()?(r(),P.push("::")):P.push(":"):(I=!0,P.push(":"),A.singleSpace())):'"'===b||"'"===b?(A.preserveSingleSpace(),P.push(o(b))):";"===b?(I=!1,P.push(b),A.newLine()):"("===b?l("url")?(P.push(b),s(),r()&&(")"!==b&&'"'!==b&&"'"!==b?P.push(o(")")):w--)):(E++,A.preserveSingleSpace(),P.push(b),s()):")"===b?(P.push(b),E--):","===b?(P.push(b),s(),g&&!I&&E<1?A.newLine():A.singleSpace()):"]"===b?P.push(b):"["===b?(A.preserveSingleSpace(),P.push(b)):"="===b?(s(),b="=",P.push(b)):(A.preserveSingleSpace(),P.push(b))}var U="";return S&&(U+=S),U+=P.join("").replace(/[\r\n\t ]+$/,""),v&&(U+="\n"),"\n"!=x&&(U=U.replace(/[\n]/g,x)),U}e.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},e.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},"function"==typeof define&&define.amd?define("sap/watt/lib/beautifiers/css/beautify-css",[],function(){return{css_beautify:e}}):"undefined"!=typeof exports?exports.css_beautify=e:"undefined"!=typeof window?window.css_beautify=e:"undefined"!=typeof global&&(global.css_beautify=e)}(),define("sap.watt.toolsets.css/utils/CSSFormatter",["sap/watt/lib/beautifiers/css/beautify-css"],function(e){var t=function(){};return t.prototype.format=function(t,n){return e.css_beautify(t,n)},t}),define("sap.watt.toolsets.css/service/CSSBeautifierImpl",["../utils/CSSFormatter"],function(e){"use strict";var t=function(){this.formatCSS=new e};return t.prototype._oDefaultSettings={indent_size:4,indent_char:" "},t.prototype.beautify=function(e,t){var n=this.getSettings(t),r=this.formatCSS.format(e,n);return r},t.prototype.getSettings=function(e){return e?this._updateSetting(e):this._oDefaultSettings},t.prototype._updateSetting=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&("indent_size"==n?t.indent_size=e[n]:"indent_char"==n?t.indent_char=e[n]:t[n]=e[n]);return t},t._instance=void 0,t.getInstance=function(){return t._instance||(t._instance=new t),t._instance},t.getInstance()}),define("sap.watt.toolsets.xml/codecompletion/XMLVisitor",[],function(){var e=function(){};e.prototype={nodeTypes:{ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9},offsetTypes:{root:"root",text:"text",tag:"tag",closetag:"closetag",attr:"attr",value:"value",entity:"entity",cdata:"cdata",comments:"comments",instruction:"instruction",intag:"intag",error:"error"},createDocNode:function(){return{nodeType:this.nodeTypes.DOCUMENT,nodeName:"#document",nameSpaces:{},childNodes:[],schema:!1,schemaInfo:[]}},createTextNode:function(e){var t=/\s+/g,n=/\>/g,r=/\</g,i=/\"/g,o=/\'/g,a=/\&/g;return{nodeType:this.nodeTypes.TEXT,nodeName:"#text",isPrecedingOffset:this.isPrecedingOffset,nodeValue:e.replace(t," ").replace(n,">").replace(r,"<").replace(o,"'").replace(i,'"').replace(a,"&")}},preParseCData:function(e){},preParseComments:function(e){for(var t,n=//g,r=[],i=-1,o="",a="",s=0,u=0,c=0;null!=(t=n.exec(e.str));)i=n.lastIndex-t[0].length,c=n.lastIndex,o="",e.offset>i+3&&(e.offset",s+=t[0].length-a.length)),r.push({str:t[0].slice(4,-3),offset:i,prefix:o}),u++;var l=!1;n=/"+e.str.slice(r[p].offset+r[p].str.length+7);e.commentList=r,e.offset-=s},preParseString:function(e){for(var t,n=new RegExp("(\"([^\"]*)\")|('([^']*)')","g"),r=[],i=0,o=0,a=0,s=-1,u=/['"]/g,c="",l=-1,p="",f="";null!==(t=n.exec(e.str));){if(u=/['"]/g,c=u.exec(e.str.slice(a)),c&&c[0].charAt(0)!==t[0].charAt(0)){s=a+c.index;break}l=t.index,a=n.lastIndex,p="",f="",e.offset>l&&(e.offset-1&&(t=e.str.slice(s),l=s,p="",e.offset>l&&(e.offset=0;h--)e.str=e.str.slice(0,r[h].offset)+'"'+h+'"'+e.str.slice(r[h].offset+r[h].str.length+2);e.strList=r,e.offset-=i},preParse:function(e,t){var n={str:"",offset:0};return n.str=e.slice(0),n.offset=t,this.preParseCData(n),this.preParseComments(n),this.preParseString(n),n},parseTag:function(e,t,n,r,i,o,a){var s={offsetType:"",offsetSentence:"",offsetWord:"",offsetPrefix:"",offsetObj:void 0,tag:"",attr:""},u="_defaultns_",c=new RegExp("^\\s+|\\s+$","g"),l=new RegExp("([^=]*)=(\\s*(\"([^\"]*)\")|('([^']*)'))","g"),p=new RegExp("\\s+","g"),f=new RegExp("\\>","g"),d=new RegExp("\\<","g"),h=new RegExp("\\"","g"),m=new RegExp("\\'","g"),g=new RegExp("\\&","g"),v=null,y=null,x="",b="",_=null;if(o&&o>a+t[1].length+t[2].length+2&&(s.offsetType=this.offsetTypes.text,s.offsetPrefix=e.slice(a+t[1].length+t[2].length+3,o+1),s.offsetObj=r),"/"===t[2].charAt(0)&&t[2].replace(c,"").length>0)o&&(""===s.offsetType?(4===t.length&&o=0)if(0===t[1].length)o&&""===s.offsetType&&(s.offsetType=this.offsetTypes.tag,s.offsetPrefix="",v={nodeType:this.nodeTypes.ELEMENT,nodeName:"",localName:"",namespace:u,attributes:[],parentNode:r,isPrecedingOffset:this.isPrecedingOffset,childNodes:[]},s.offsetObj=v);else if("?"===t[1].charAt(0))o&&""===s.offsetType&&(s.offsetType=this.offsetTypes.instruction,s.offsetObj=r);else if("!"===t[1].charAt(0))0===t[1].indexOf("![CDATA[")?o&&""===s.offsetType&&(s.offsetType=this.offsetTypes.cdata,s.offsetObj=r):0===t[1].indexOf("!--")&&(b=null,b="--"==t[1].slice(-2)?t[1].slice(3,-2):t[1].slice(3),y=null,b.length>0&&(_=i.commentList[parseInt(b,10)],r.childNodes.push({nodeType:this.nodeTypes.COMMENT,nodeName:"#comment",nodeValue:_.str}),y=_.prefix),o&&""==s.offsetType&&o-1){var w=x.split(":");v.namespace=w[0],v.localName=w[1]}var E,S;o&&(S=-1);for(var C=a+t[1].length+2,T=null,D=null,A="",P=null;null!=(E=l.exec(t[2]));){if(y=null,E.length>0)if(x=E[1].replace(c,""),b=E[4]||E[6]||"",b.length>0&&(_=i.strList[parseInt(b,10)],b=_.str,y=_.prefix),b=b.replace(p," ").replace(f,">").replace(d,"<").replace(m,"'").replace(h,'"').replace(g,"&"),0==x.indexOf("xmlns"))"xmlns:xsi"==x&&"http://www.w3.org/2001/XMLSchema-instance"==b?n.schema=!0:x.indexOf(":")>0?(T=x.split(":"),r&&"#document"===r.nodeName&&(n.nameSpaces[T[1]]=b)):r&&"#document"===r.nodeName&&(n.nameSpaces[u]=b);else{var k=x;if(T=u,"xsi:nonamespaceschemalocation"==x.toLowerCase()){D=b.split(" ");for(var I=0;I0){var F=x.split(":");k=F[1],T=F[0]}v.attributes.push({nodeType:this.nodeTypes.ATTRIBUTE,nodeName:x,localName:k,namespace:T,nodeValue:b})}o&&""==s.offsetType&&(o1&&'"'==j.charAt(0)?(_=i.strList[parseInt(j.slice(1),10)],j=_.str):'"'!=j[0]&&"'"!=j[0]||(j=j.substring(1)),s.offsetPrefix=j,s.attr=O.slice(0,N)}}r&&(r.childNodes.push(v),v.parentNode=r,"/"!=t[2].charAt(t[2].length-1)&&(r=v)),s.offsetType==this.offsetTypes.text?s.offsetObj=r:""!=s.offsetType&&(s.offsetObj=v)}var R=t[3];return null!=t[3]&&(o&&o-1?n.status.content.substring(0,n.status.content.indexOf("<")):n.status.content;n.root.childNodes.push(this.createTextNode(a)),(o==-1||n.status.offset\\/\\s+]*)([^>]*)>([^<]*)","g");for(new RegExp("^\\s+|\\s+$","g");null!=(s=l.exec(n.status.content));)u=null,n.status.offset>i&&n.status.offset\\/\\s+]*)([^>]*)","g");p.lastIndex=i+1,null!=(s=p.exec(n.status.content))&&(u=null,n.status.offset>i&&n.status.offset)/).index;u=t>h&&t0&&(y=x.slice(0,b),""==y?y=r.nameSpaces[s]:r.nameSpaces[y]&&(y=r.nameSpaces[y]),x=x.slice(b+1));var _=""!=x;if(n&&n.rootNode&&n.rootNode.length>0){_=!1;for(var w=0;w-1&&(a.prefixns=a.prefix.slice(0,E),a.prefix=a.prefix.slice(E+1)),a.lbracket=!0,a.origText=a.prefix;break;case this._mParser.offsetTypes.attr:a.type=this.suggestTypes.attr,a.currentTag=g.status.offsetObj.nodeName,a.parentTag=g.status.offsetObj.parentNode?g.status.offsetObj.parentNode.nodeName:"",o=g.status.offsetObj.parentNode;for(var S=g.status.offsetObj.attributes,C=0;C-1&&(a.currentTagns=a.currentTag.slice(0,E),a.currentTag=a.currentTag.slice(E+1)),a.origText=a.prefix;break;case this._mParser.offsetTypes.value:a.type=this.suggestTypes.value,a.currentTag=g.status.offsetObj.nodeName,a.parentTag=g.status.offsetObj.parentNode?g.status.offsetObj.parentNode.nodeName:"",o=g.status.offsetObj.parentNode,a.currentAttr=g.status.attr,a.prefix=g.status.offsetPrefix,E=a.currentTag.indexOf(":"),E>-1&&(a.currentTagns=a.currentTag.slice(0,E),a.currentTag=a.currentTag.slice(E+1)),a.origText=a.prefix;break;case this._mParser.offsetTypes.intag:a.type=this.suggestTypes.intag,a.currentTag=g.status.offsetObj.nodeName,a.origText="";break;default:a.origText=""}}}}return{currentEnv:a,root:r,curobj:i,parentTagObj:o}}},t}),define("sap.watt.toolsets.xml/service/XMLCodeVisitorImpl",["../codecompletion/XMLVisitor"],function(e){var t=function(){this.xmlVisitor=new e};return t.prototype={getEnv:function(e,t,n){var r=this;if(e){null==t&&(t=e.length);var i=Q.defer();try{var o=null,a=this.xmlVisitor.getEnv(e,t,n);a&&a.currentEnv&&(o={currentTag:a.currentEnv.currentTag,currentTagns:a.currentEnv.currentTagns,currentAttr:a.currentEnv.currentAttr,currentAttrs:a.currentEnv.currentAttrs,parentTag:a.currentEnv.parentTag,gparentTag:a.currentEnv.gparentTag,lbracket:a.currentEnv.lbracket,origText:a.currentEnv.origText,prefix:a.currentEnv.prefix,prefixns:a.currentEnv.prefixns,type:a.currentEnv.type,xmlnsList:a.currentEnv.xmlnsList,parentTagObj:a.parentTagObj}),i.resolve(o)}catch(e){r.context.service.log.error("XMLCodeVisitor","Failed to get env "+e.message,["system"]).done(),i.resolve(null)}return i.promise}}},t}),define("sap.watt.toolsets.xml/codecompletion/UI5XmlTypes",[],function(){var e=function(){};return e.prototype={ui5Types:{"sap.m.ButtonType":"enum","sap.ui.core.TextDirection":"enum","sap.ui.core.TextAlign":"enum","sap.m.DialogType":"enum","sap.m.FlexAlignItems":"enum","sap.m.FlexAlignSelf":"enum","sap.m.FlexDirection":"enum","sap.m.FlexJustifyContent":"enum","sap.m.FlexRendertype":"enum","sap.m.InputType":"enum","sap.m.LabelDesign":"enum","sap.m.PageBackgroundDesign":"enum","sap.m.SwitchType":"enum","sap.m.DateTimeInputType":"enum","sap.ui.core.ValueState":"enum","sap.ui.core.Wrapping":"enum","sap.apb.TransitionType":"enum","sap.apb.makit.ChartType":"enum","sap.apb.makit.LegendPosition":"enum","sap.apb.makit.SortOrder":"enum"},candidateElements:function(e){var t=e.prefix,n=e.ns,r=e.parent,i=this.getLibrary(n);if(!i)return[];if(!r||this.IsRootElement(r))return this.getElements(t,n,i.controls,"Control");var o=this.getMetadata(n,r),a=null,s=null,u=null;if(o){var c=this.getAttributes(t,o,"getAllAggregations");s=this.getElements(t,n,i.controls,"Control"),u=this.getElements(t,n,i.elements,"Element"),a=c.concat(s).concat(u)}else s=this.getElements(t,n,i.controls,"Control"),u=this.getElements(t,n,i.elements,"Element"),a=s.concat(u);return a},candidateAttributes:function(e){var t=this.candidateAttributeProperties(e.prefix,e.ns,e.element),n=this.candidateAttributeEvents(e.prefix,e.ns,e.element);return t.concat(n)},candidateProperties:function(e){var t=this.candidateAttributeProperties(e.prefix,e.ns,e.element);return t},candidateEvents:function(e){var t=this.candidateAttributeEvents(e.prefix,e.ns,e.element);return t},candidateAttributeProperties:function(e,t,n){var r=this.getMetadata(t,n);return this.getAttributes(e,r,"getAllProperties")},candidateAttributeEvents:function(e,t,n){var r=this.getMetadata(t,n);return this.getAttributes(e,r,"getAllEvents")},candidateAttributeValues:function(e){var t=e.prefix,n=e.ns,r=e.element,i=e.attr,o=[],a=this.getMetadata(n,r),s=a.getAllProperties()[i],u=t.length;if(s){var c=s.type;if("boolean"==c)u>0?(this.compareStringIgnoreCase("false".substr(0,u),t)&&o.push({name:"false",type:"boolean"}),this.compareStringIgnoreCase("true".substr(0,u),t)&&o.push({name:"true",type:"boolean"})):(o.push({name:"false",type:"boolean"}),o.push({name:"true",type:"boolean"}));else if("enum"==this.ui5Types[c]){var l=this.getObject(n,c);if(l){var p=null;if(u>0)for(p in l)Object.prototype.hasOwnProperty.call(l,p)&&this.compareStringIgnoreCase(p.substr(0,u),t)&&o.push({name:p.toString(),type:"enum"});else for(p in l)Object.prototype.hasOwnProperty.call(l,p)&&o.push({name:p.toString(),type:"enum"})}}}return o},getAttributes:function(e,t,n){var r=[];if(t){var i=e.length,o=t[n](),a=null;if(i>0){for(a in o)if(Object.prototype.hasOwnProperty.call(o,a)){var s=o[a].name;this.compareStringIgnoreCase(s.substr(0,i),e)&&r.push(o[a])}}else for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&r.push(o[a])}return r},getElements:function(e,t,n,r){var i=[],o=t.length+1,a=e.length,s=null,u="";if(a>0)for(var c=0;c0&&i.push({name:u,type:r}));return i},IsRootElement:function(e){if("core:View"==e)return!0;var t=e.indexOf(":");return t>0&&"View"==e.substr(t+1)},getLibrary:function(e){for(var t=null,n=e;n.indexOf(".")>0&&!(t=sap.ui.getCore().getLoadedLibraries()[n]);)n=n.slice(0,n.lastIndexOf("."));if(!t)try{t=sap.ui.getCore().loadLibrary(e),console.log("load library ["+e+"] here...")}catch(t){ console.log("load library ["+e+"] error:"+t.message)}return t},getObject:function(e,t){return this.getLibrary(e),t.indexOf(".")<0&&(t=e+"."+t),jQuery.sap.getObject(t)},getMetadata:function(e,t){var n=null,r=this.getObject(e,t);return r?n=r.getMetadata():"sap.ui.core"==e&&"View"==t&&(r=this.getObject(e+".mvc",t),n=r.getMetadata()),n},compareStringIgnoreCase:function(e,t){return e.toLowerCase()===t.toLowerCase()}},e}),define("sap.watt.toolsets.xml/codecompletion/XMLMetadataContentAssist",[],function(){var e=function(e){this.mUI5XMLMetadata=e};return e.prototype={addMetadata:function(e,t){var n=this;if(e.enums){var r=Object.keys(e.enums);r.forEach(function(r){n.mUI5XMLMetadata.enums[r]=e.enums[r],n.mUI5XMLMetadata.enums[r].$library=t})}e.metadatas&&(r=Object.keys(e.metadatas),r.forEach(function(r){n.mUI5XMLMetadata.metadatas.hasOwnProperty(r)?n.mUI5XMLMetadata.metadatas[r].types&&n.mUI5XMLMetadata.metadatas[r].types.indexOf(e.metadatas[r].types[0])===-1&&(n.mUI5XMLMetadata.metadatas[r].types=n.mUI5XMLMetadata.metadatas[r].types.concat(e.metadatas[r].types)):(n.mUI5XMLMetadata.metadatas[r]=e.metadatas[r],n.mUI5XMLMetadata.metadatas[r].library=t)}))},resetMetadata:function(){this.mUI5XMLMetadata.enums={},this.mUI5XMLMetadata.metadatas={}},candidateElements:function(e){var t=e.prefix,n=e.ns,r=e.parent,i=this.getLibrary(n,e.isNameSpace,t);if(!i)return[];if(!r&&!e.isNameSpace)return this.getElements(t,n,i.controls,"Control");if(!r&&e.isNameSpace){var o=i.hasOwnProperty("typesWithClasses")?i.typesWithClasses:i.types;return this.getElements(t,n,o,"Namespaces")}var a=this.getMetadata(n,r),s=null,u=null,c=null;if(a){var l=this.getAttributes(t,a,"aggregations");u=this.getElements(t,n,i.controls,"Control"),c=this.getElements(t,n,i.elements,"Element"),s=l.concat(u).concat(c)}else u=this.getElements(t,n,i.controls,"Control"),c=this.getElements(t,n,i.elements,"Element"),s=u.concat(c);return s},candidateAttributes:function(e){var t=this.candidateAttributeProperties(e.prefix,e.ns,e.element),n=this.candidateAttributeEvents(e.prefix,e.ns,e.element);return t.concat(n)},candidateProperties:function(e){var t=this.candidateAttributeProperties(e.prefix,e.ns,e.element),n=this.candidateAttributeAssociations(e.prefix,e.ns,e.element);return t.concat(n)},candidateEvents:function(e){var t=this.candidateAttributeEvents(e.prefix,e.ns,e.element,e.pcontext);return t},candidateAttributeProperties:function(e,t,n){var r=this.getMetadata(t,n);return this.getAttributes(e,r,"properties")},candidateAttributeEvents:function(e,t,n,r){var i=this.getMetadata(t,n);return this.getAttributes(e,i,"events",r)},candidateAttributeAssociations:function(e,t,n){var r=this.getMetadata(t,n);return this.getAttributes(e,r,"associations")},candidateAttributeValues:function(e){for(var t=e.prefix,n=e.ns,r=e.element,i=e.attr,o=[],a=this.getMetadata(n,r),s=null,u=this.getAttributes(i,a,"properties"),c=0;c0?(this.compareStringIgnoreCase("false".substr(0,p),t)&&o.push({name:"false",type:"boolean",fullName:s.fullName}),this.compareStringIgnoreCase("true".substr(0,p),t)&&o.push({name:"true",type:"boolean",fullName:s.fullName})):(o.push({name:"false",type:"boolean",fullName:s.fullName}),o.push({name:"true",type:"boolean",fullName:s.fullName}));else if(this.mUI5XMLMetadata.enums[f]){var d=this.mUI5XMLMetadata.enums[f];if(d){var h=null;if(p>0)for(h in d)Object.prototype.hasOwnProperty.call(d,h)&&this.compareStringIgnoreCase(h.substr(0,p),t)&&o.push({name:h.toString(),type:"enum",description:d[h].description,helpDescription:d[h].helpDescription,fullName:f+"#"+h});else for(h in d)Object.prototype.hasOwnProperty.call(d,h)&&o.push({name:h.toString(),type:"enum",description:d[h].description,helpDescription:d[h].helpDescription,fullName:f+"#"+h})}}}return o},eventParamsAsList:function(e){if(!e)return"";var t="";if(Object.keys(e).length>0){t='

Parameters:

';var n=Object.keys(e).sort();for(var r in n)t+='";t+="
['+e[n[r]].replace(/(^(type:\s?))/g,"")+"]"+n[r]+"
"}return t},getAttributes:function(e,t,n){var r=[];if(t){var i=e.length,o=t[n],a=null;switch(n){case"properties":a="Property";break;case"aggregations":a="Aggregation";break;case"associations":a="Association";break;case"events":a="Event"}var s="",u=null;if(i>0)for(u in o)Object.prototype.hasOwnProperty.call(o,u)&&(s=u,this.compareStringIgnoreCase(s.substr(0,i),e)&&r.push({name:s,type:a,dataType:o[u].type,description:o[u].description+this.eventParamsAsList(o[u].eventParams),helpDescription:o[u].helpDescription,fullName:o[u].fullName,eventParams:o[u].eventParams}));else for(u in o)Object.prototype.hasOwnProperty.call(o,u)&&(s=u,r.push({name:s,type:a,dataType:o[u].type,description:o[u].description,helpDescription:o[u].helpDescription+this.eventParamsAsList(o[u].eventParams),fullName:o[u].fullName,eventParams:o[u].eventParams}));if(t.extend)for(var c=this.getMetadata("",t.extend),l=this.getAttributes(e,c,n),p=0;p0&&n){for(var p=0;p0)){if(c="",l="","Namespaces"===r&&this.mUI5XMLMetadata.enums.hasOwnProperty(s))continue;this.mUI5XMLMetadata.metadatas[s]&&(c=this.mUI5XMLMetadata.metadatas[s].description,l=this.mUI5XMLMetadata.metadatas[s].helpDescription),i.push({name:u,type:r,description:c,helpDescription:l,fullName:s})}return i},IsRootElement:function(e){if("core:View"===e)return!0;var t=e.indexOf(":");return t>0&&"View"===e.substr(t+1)},getRootNS:function(e){var t=[],n=Object.keys(e);return n.forEach(function(e){e.indexOf(".")===-1&&(t=t.concat(e))}),t},getLibrary:function(e,t,n){for(var r=null,i=e,o=this.mUI5XMLMetadata.metadatas;i.indexOf(".")>0;){if(o[i]&&"library"===o[i].filetype){r=o[i];break}i=i.slice(0,i.lastIndexOf("."))}return t&&(""===i&&""===n?(r={types:null},r.types=this.getRootNS(o)):r=o[i]),r||console.log("fail to get library ["+e+"]"),r},getObject:function(e,t){return t.indexOf(".")<0&&(t=e+"."+t),this.mUI5XMLMetadata.metadatas[t]},getMetadata:function(e,t){var n=null,r=this.getObject(e,t);return r?n=r:"sap.ui.core"===e&&"View"===t&&(r=this.getObject(e+".mvc",t),n=r),n},isEnumType:function(e){var t=!1;return t=!!this.mUI5XMLMetadata.enums[e]},compareStringIgnoreCase:function(e,t){return e.toLowerCase()===t.toLowerCase()}},e}),define("sap.watt.toolsets.xml/codecompletion/SchemaMetadata",[],function(){var e={},t=function(e,t,n){var r=e.attributes;return r.getNamedItemNS?r.getNamedItemNS(n||null,t):r.getQualifiedItem(t,n)||null},n=function(n,r,i,o,a){var s=null;return n?(e.xmlTraverse(n,a,function(e){if(1===e.nodeType&&r===e.tagName)if(i){var n=t(e,i,"");n&&n.value==o&&(s=e)}else s=e;return{proceed:null===s,downward:!0}}),s):s};return e.getNode=function(e,t,r){var i=null;if(!e)return i;var o=r.split("/");i=e;var a,s;for(a=0,s=o.length;a0&&(o.enumOptions=f)}return o},e.getAttributes=function(r,i,o){var a=[];if(!i)return a;var s=t(i,"type",""),u=null;u=s?e.xmlFindNodeFromAll(r,o,"xs:complexType","name",s.value,!0):n(i,"xs:complexType",null,null,!1);for(var c=e.getAttrNodesFromNodeOrGroup(r,o,u),l=0;l0);this.compareStringIgnoreCase(d.substr(0,t.length),t)&&i.push({name:d,type:h,dataType:m,description:f,fullName:d,isEnum:g})}return i},candidateAttributeValues:function(e){var t=e.prefix,n=(e.ns,e.element,e.attr),r=[],i=null,o=n.ns,a=n.name;if(i=this.getAttrNode(this.schemaList,o,a)){var s=this.getAttrInfo(this.schemaList,o,i);if(s){var u=t.length;if("xs:boolean"==s.dType)u>0?(this.compareStringIgnoreCase("false".substr(0,u),t)&&r.push({name:"false",type:"boolean",fullName:s.name}),this.compareStringIgnoreCase("true".substr(0,u),t)&&r.push({name:"true",type:"boolean",fullName:s.name})):(r.push({name:"false",type:"boolean",fullName:s.name}),r.push({name:"true",type:"boolean",fullName:s.name}));else if(s.enumOptions){var c=null;if(u>0)for(var l=0;l\n\t\n\n'}];return t.prototype=new e.TemplateContentAssist(null,n),t.prototype.resetTemplateAndKeywords=function(){this._templates=[],this._keywords=[],this.addTemplates(n)},t.prototype.isValid=function(e,t,n,r){return!0},{XMLTemplateContentAssistProvider:t}}),define("sap.watt.toolsets.xml/codecompletion/XMLContentAssist",["./XMLVisitor","./UI5XmlTypes","./XMLMetadataContentAssist","./SchemaMetadataContentAssist","./XMLTemplateContentAssist","sap/watt/lib/lodash/lodash"],function(e,t,n,r,i,o){var a=function(){this.xmlTypes=new t,this.xmlVisitor=new e,this.schemaMetadataAssist=new r,this.category={XML_NAMESPACE:0,XML_ELEMENT:1,XML_PROPERTY:2,XML_EVENT:3,XML_SYNTAX:5,XML_SNIPPET:6,XML_PROPERTY_DEFAULT:11,XML_PROPERTY_BOOL:12,XML_PROPERTY_ENUM:13,XML_ASSOCIATION:14,XML_PROP_OPTIONS:21},this.categoryDesc={6:"SNIPPET"},this.prefix,this._UI5ServiceName="sapui5"};return a.prototype={throwError:function(e){var t=new Error(e);throw t},candidateXMLSyntaxs:function(e){var t=[];return("attr"==e.type&&""===e.prefix||"intag"==e.type)&&(t.push({name:">",syntax:">",type:"syntax"}),t.push({name:"/>",syntax:"/>",type:"syntax"})),"attr"!=e.type||"View"!=e.element&&"FragmentDefinition"!=e.element||0!="xmlns".indexOf(e.prefix)||(t.push({name:"xmlns",syntax:"xmlns",type:"syntax"}),t.push({name:"xmlns:",syntax:"xmlns:",type:"syntax"})),t},candidateXMLSyntaxSnippets:function(e){var t=[];if("attr"==e.type&&""===e.prefix||"intag"==e.type){var n=e.element;e.namespace&&e.namespace.length>0&&(n=e.namespace+":"+n),n=">",t.push({name:">",proposal:n,type:"syntax"})}return t},candidateNameSpaces:function(e){for(var t=[],n=0;n0||""===n.ns&&"root"===n.prefix)&&(r=this.xmlTemplateAssistant.computeProposals(e,t,n)),r},getRefNS:function(e,t){var n=t,r=null;if(""==n){for(var i=0;in?1:-1:e.description.toLowerCase()0&&(d=a.parentTag.slice(0,t),h=a.parentTag.slice(t+1)),d=p.getRefNS(a,d);for(var m=o.candidateElements({ns:l,prefix:a.prefix,parent:{ns:d,name:h}}),g=0;g0&&(r=a.currentTag.slice(0,t),i=a.currentTag.slice(t+1)),r=p.getRefNS(a,r);for(var x=o.candidateAttributes({ns:l,prefix:a.prefix,element:{ns:r,name:i},attrs:a.currentAttrs}),g=0;g0&&(r=a.currentTag.slice(0,t),i=a.currentTag.slice(t+1)),r=p.getRefNS(a,r);var E="",S=a.currentAttr;t=a.currentAttr.indexOf(":"),t>0&&(E=a.currentAttr.slice(0,t),S=a.currentAttr.slice(t+1)),E=p.getRefNS(a,E);for(var C=o.candidateAttributeValues({ns:l,prefix:a.prefix,element:{ns:r,name:i},attr:{ns:E,name:S}}),g=0;g0&&c.lbracket?c.prefix:""===c.prefix&&c.prefix.indexOf(".")<0&&!c.lbracket?this.prefix:c.prefix;var y=this.getAllNS(c,s);for(a=0;a0&&(N=c.prefix.slice(0,R),j=c.prefix.slice(R+1,c.prefix.length));for(var b=u.candidateElements({ns:N,prefix:j,isNameSpace:!0}),a=0;a0&&(a!==s&&(a=a.replace(".","/"),c=o.indexOf(a)+a.length),o=0===o.slice(c).indexOf("/")?o.slice(c+a.length+1):o.slice(c),o=i+u+a+o,c=o.lastIndexOf("0&&(o=o.slice(0,c+2)+u+a+">"));var l=a+" in "+t.ns;return l&&(c=l.indexOf(","),c>0&&(l=l.slice(0,c))),r.sTerm=o,r.sDescription=l,r},calculateQuatesEnumarations:function(e,t){return t.stringValue||""===t.stringValue||'"'===t.buffer[t.offset-1]||t.prefix?e:'"'+e+'"'},calculateQuatesNameSpace:function(e,t){var n=t.prefix;return n||'"'===t.buffer[t.offset-1]||t.prefix?n&&""!==n&&"."!==t.buffer[t.offset-1]&&n.lastIndexOf(".")!==-1?n.substr(0,n.lastIndexOf(".")+1)+e:n+e:'"'+e+'"'},computeProposals:function(e,t,n,r){try{var i=this.xmlVisitor.getEnv(e,t),o=i.currentEnv;if(""===o.currentAttr&&"attr"===o.type&&(""===o.origText||""===o.prefix))for(var a=!0,s=o,u=i;a;)t-=1,i=this.xmlVisitor.getEnv(e,t),o=i.currentEnv,""!==o.currentAttr||"attr"!==o.type||""!==o.origText&&""!==o.prefix?"value"===o.type?a=!1:("attr"===o.type||""!==o.origText&&""!==o.prefix)&&""===o.origText&&""===o.prefix||(a=!1,o=s,i=u):a=!0;var c=!1,l=this;if("value"==o.type&&(c=!0),this.prefix=void 0!=n.prefix?n.prefix:o.prefix,i.root.documentElement&&""===o.parentTag)return Q({proposalsObj:[],isValue:c,prefix:o.prefix});n.text=o.origText;var p=[];return 0===o.currentAttr.indexOf("xmlns")&&(n.stringValue=null),p.push(this.computeCommonProposals(e,t,n,r,i)),0!=o.isUI5&&p.push(this.computeUI5Proposals.call(this,e,t,n,r,i)),Q.allSettled(p).then(function(e){var t=[],n=0;for(n=0;n1&&":"===n&&(t=e.aRowTokens[e.aRowTokens.length-2].value,n=t+n);var r=/[^a-z\:\.A-Z_0-9\$\u00A2-\uFFFF]+/;return n.split(r).slice(-1)[0]}},o}),define("sap/watt/lib/XMLDomParser/sax",[],function(){function e(){}function t(e,t,s,p,f){function d(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function h(e){var t=e.slice(1,-1);return t in s?s[t]:"#"===t.charAt(0)?d(parseInt(t.substr(1).replace("x","0x"))):(f.error("entity not found:"+e),e)}function m(t){var n=e.substring(E,t).replace(/&#?\w+;/g,h);b&&g(E),p.characters(n,0,t-E),E=t}function g(t,n){for(;t>=y&&(n=x.exec(e));)v=n.index,y=v+n[0].length,b.lineNumber++;b.columnNumber=t-v+1}for(var v=0,y=0,x=/.+(?:\r\n?|\n)|.*$/g,b=p.locator,_=[{currentNSMap:t}],w={},E=0;;){var S=e.indexOf("<",E);if(S<0){if(!e.substr(E).match(/^\s*$/)){var C=p.document,T=C.createTextNode(e.substr(E));C.appendChild(T),p.currentElement=T}return}switch(S>E&&m(S),e.charAt(S+1)){case"/":var D=new RegExp("\\s*>"),A=e.substr(S+2),P=A.search(D);P=P+S+2;var k,I=e.substring(S+2,P);if(!(_.length>1)){f.fatalError("end tag name not found for: "+I);break}k=_.pop();var F=k.localNSMap;if(k.tagName!=I&&f.fatalError("end tag name: "+I+" does not match the current start tagName: "+k.tagName),p.endElement(k.uri,k.localName,I),F)for(var O in F)p.endPrefixMapping(O);P++;break;case"?":b&&g(S),P=c(e,S,p);break;case"!":b&&g(S),P=u(e,S,p,f);break;default:try{b&&g(S);var N=new l,P=r(e,S,N,h,f),j=N.length;if(j&&b){for(var R=n(b,{}),S=0;S0))throw new Error("attribute value no end '"+c+"' match");a=e.slice(t,s).replace(/&#?\w+;/g,r),n.add(o,a,t-1),u=_}else{if(u!=b)throw new Error('attribute value must after "="');a=e.slice(t,s).replace(/&#?\w+;/g,r),n.add(o,a,t),i.warning('attribute "'+o+'" missed start quot('+c+")!!"),t=s+1,u=_}break;case"/":switch(u){case g:n.setTagName(e.slice(t,s));case _:case w:case E:u=E,n.closed=!0;case b:case v:case y:break;default:throw new Error("attribute invalid close char('/')")}break;case"":i.error("unexpected end of input");case">":switch(u){case g:n.setTagName(e.slice(t,s));case _:case w:case E:break;case b:case v:a=e.slice(t,s),"/"===a.slice(-1)&&(n.closed=!0,a=a.slice(0,-1));case y:u===y&&(a=o),u==b?(i.warning('attribute "'+a+'" missed quot(")!!'),n.add(o,a.replace(/&#?\w+;/g,r),t)):(i.warning('attribute "'+a+'" missed value!! "'+a+'" instead!!'),n.add(a,a,t));break;case x:throw new Error("attribute value missed!!")}return s;case"€":c=" ";default:if(c<=" ")switch(u){case g:n.setTagName(e.slice(t,s)),u=w;break;case v:o=e.slice(t,s),u=y;break;case b:var a=e.slice(t,s).replace(/&#?\w+;/g,r);i.warning('attribute "'+a+'" missed quot(")!!'),n.add(o,a,t);case _:u=w}else switch(u){case y:i.warning('attribute "'+o+'" missed value!! "'+o+'" instead!!'),n.add(o,o,t),t=s,u=v;break;case _:i.error('attribute space is required"'+o+'"!!');case w:u=v,t=s;break;case x:u=b,t=s;break;case E:throw new Error("elements closed character '/' and '>' must be connected to")}}s++}}function i(e,t,n,r){for(var i=e.tagName,o=null,a=n[n.length-1].currentNSMap,u=e.length;u--;){var c=e[u],l=c.qName,p=c.value,f=l.indexOf(":");if(f>0)var d=c.prefix=l.slice(0,f),h=l.slice(f+1),m="xmlns"===d&&h;else h=l,d=null,m="xmlns"===l&&"";c.localName=h,m!==!1&&(null==o&&(o={},s(a,a={})),a[m]=o[m]=p,c.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(m,p))}for(var u=e.length;u--;){c=e[u];var d=c.prefix;d&&("xml"===d&&(c.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==d&&(c.uri=a[d]))}var f=i.indexOf(":");f>0?(d=e.prefix=i.slice(0,f),h=e.localName=i.slice(f+1)):(d=null,h=e.localName=i);var g=e.uri=a[d||""];if(d&&!g&&r.error("unexpected namespace "+d),t.startElement(g,h,i,e),e.closed){if(t.endElement(g,h,i),o)for(d in o)t.endPrefixMapping(d)}else e.currentNSMap=a,e.localNSMap=o,n.push(e)}function o(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=e.indexOf("",t),a=e.substring(t+1,o);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),o)}return t+1}function a(e,t,n,r){var i=r[n];if(null==i){var o=new RegExp("","gi"),a=e.match(o);if(a&&a.length>=1){var s=e.lastIndexOf(a[a.length-1]);i=r[n]=s}else i=-1}return i",t+4);return o>t?(n.comment(e,t+4,o-t-4),o+3):(r.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,o-t-9),n.endCDATA(),o+3}var a=f(e,t),s=a.length;if(s>1&&/!doctype/i.test(a[0][0])){var u=a[1][0],c=s>3&&/^public$/i.test(a[2][0])&&a[3][0],l=s>4&&a[4][0],p=a[s-1];return n.startDTD(u,c&&c.replace(/^(['"])(.*?)\1$/,"$2"),l&&l.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),p.index+p[0].length}}return-1}function c(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function l(e){}function p(e,t){return e.__proto__=t,e}function f(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}var d=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,h=new RegExp("[\\-\\.0-9"+d.source.slice(1,-1)+"·̀-ͯ\\ux203F-⁀]"),m=new RegExp("^"+d.source+h.source+"*(?::"+d.source+h.source+"*)?$"),g=0,v=1,y=2,x=3,b=4,_=5,w=6,E=7;return e.prototype={parse:function(e,n,r){var i=this.domBuilder;i.startDocument(),s(n,n={}),t(e,n,r,i,this.errorHandler),i.endDocument()}},l.prototype={setTagName:function(e){if(!m.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!m.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getOffset:function(e){return this[e].offset},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},p({},p.prototype)instanceof p||(p=function(e,t){function n(){}n.prototype=t,n=new n;for(t in e)n[t]=e[t];return n}),e}),define("sap/watt/lib/XMLDomParser/dom",[],function(){function e(e,t){for(var n in e)t[n]=e[n]}function t(t,n){function r(){}var i=t.prototype;if(Object.create){var o=Object.create(n.prototype);i.__proto__=o}i instanceof n||(r.prototype=n.prototype,r=new r,e(i,r),t.prototype=i=r),i.constructor!=t&&("function"!=typeof t&&console.error("unknow Class:"+t),i.constructor=t)}function n(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,ee[e]),this.message=ee[e],Error.captureStackTrace&&Error.captureStackTrace(this,n);return r.code=e,t&&(this.message=this.message+": "+t),r}function r(){}function i(e,t){this._node=e,this._refresh=t,o(this)}function o(t){var n=t._node._inc||t._node.ownerDocument._inc;if(t._inc!=n){var r=t._refresh(t._node);L(t,"length",r.length),e(r,t),t._inc=n}}function a(){}function s(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function u(e,t,n,r){if(r?t[s(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&g(i,e,r),m(i,e,n))}}function c(e,t,r){var i=s(t,r);if(!(i>=0))throw n(te,new Error);for(var o=t.length-1;i"==e&&">"||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function d(e,t){if(t(e))return!0;if(e=e.firstChild)do if(d(e,t))return!0;while(e=e.nextSibling)}function h(){}function m(e,t,n){e&&e._inc++;var r=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==r&&(t._nsMap[n.prefix?n.localName:""]=n.value)}function g(e,t,n,r){e&&e._inc++;var i=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==i&&delete t._nsMap[n.prefix?n.localName:""]}function v(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function y(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,v(e.ownerDocument,e),t}function x(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===J){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do i.parentNode=e;while(i!==o&&(i=i.nextSibling));return v(e.ownerDocument||e,e),t.nodeType==J&&(t.firstChild=t.lastChild=null),t}function b(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);var r=e.lastChild}var r=e.lastChild;return t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,v(e.ownerDocument,e,t),t}function _(){this._nsMap={}}function w(){}function E(){}function S(){}function C(){}function T(){}function D(){}function A(){}function P(){}function k(){}function I(){}function F(){}function O(){}function N(e,t){switch(e.nodeType){case V:var n=e.attributes,r=n.length,i=e.firstChild,o=e.tagName,a=B===e.namespaceURI;t.push("<",o);for(var s=0;s"),a&&/^script$/i.test(o))i&&t.push(i.data);else for(;i;)N(i,t),i=i.nextSibling;t.push("")}else t.push("/>");return;case X:case J:for(var i=e.firstChild;i;)N(i,t),i=i.nextSibling;return;case G:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,f),'"');case W:return t.push(e.data.replace(/[<&]/g,f));case Q:return t.push("");case $:return t.push("");case K:var u=e.publicId,c=e.systemId;if(t.push("');else if(c&&"."!=c)t.push(' SYSTEM "',c,'">');else{var l=e.internalSubset;l&&t.push(" [",l,"]"),t.push(">")}return;case q:return t.push("");case H:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function j(e,t,n){var r;switch(t.nodeType){case V:r=t.cloneNode(!1),r.ownerDocument=e;case J:break;case G:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(j(e,i,n)),i=i.nextSibling;return r}function R(e,t,n){var i=new t.constructor;for(var o in t){var s=t[o];"object"!=typeof s&&s!=i[o]&&(i[o]=s)}switch(t.childNodes&&(i.childNodes=new r),i.ownerDocument=e,i.nodeType){case V:var u=t.attributes,c=i.attributes=new a,l=u.length;c._ownerElement=i;for(var p=0;p0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=2==t.nodeType?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=2==t.nodeType?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return null==t}},e(U,p),e(U,p.prototype),h.prototype={nodeName:"#document",nodeType:X,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==J){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&1==e.nodeType&&(this.documentElement=e),x(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),y(this,e)},importNode:function(e,t){return j(this,e,t)},getElementById:function(e){var t=null;return d(this.documentElement,function(n){if(1==n.nodeType&&n.getAttribute("id")==e)return t=n,!0}),t},createElement:function(e){var t=new _;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new r;var n=t.attributes=new a;return n._ownerElement=t,t},createDocumentFragment:function(){var e=new I;return e.ownerDocument=this,e.childNodes=new r,e},createTextNode:function(e){var t=new S;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new C;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new T;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new F;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new w;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new k;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new _,i=t.split(":"),o=n.attributes=new a;return n.childNodes=new r,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,o._ownerElement=n,n},createAttributeNS:function(e,t){var n=new w,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},t(h,p),_.prototype={nodeType:V,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===J?this.insertBefore(e,null):b(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new i(this,function(t){var n=[];return d(t,function(r){r===t||r.nodeType!=V||"*"!==e&&r.tagName!=e||n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new i(this,function(n){var r=[];return d(n,function(i){i===n||i.nodeType!==V||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)}),r})}},h.prototype.getElementsByTagName=_.prototype.getElementsByTagName,h.prototype.getElementsByTagNameNS=_.prototype.getElementsByTagNameNS,t(_,p),w.prototype.nodeType=G,t(w,p),E.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ee[3])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){var r=this.data.substring(0,e),i=this.data.substring(e+t);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}},t(E,p),S.prototype={nodeName:"#text",nodeType:W,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},t(S,E),C.prototype={nodeName:"#comment",nodeType:$},t(C,E),T.prototype={nodeName:"#cdata-section",nodeType:Q},t(T,E),D.prototype.nodeType=K,t(D,p),A.prototype.nodeType=Y,t(A,p),P.prototype.nodeType=z,t(P,p),k.prototype.nodeType=H,t(k,p),I.prototype.nodeName="#document-fragment",I.prototype.nodeType=J,t(I,p),F.prototype.nodeType=q, t(F,p),O.prototype.serializeToString=function(e){var t=[];return N(e,t),t.join("")},p.prototype.toString=function(){return O.prototype.serializeToString(this)};try{Object.defineProperty&&(Object.defineProperty(i.prototype,"length",{get:function(){return o(this),this.$$length}}),Object.defineProperty(p.prototype,"textContent",{get:function(){return M(this)},set:function(e){switch(this.nodeType){case 1:case 11:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=value,this.nodeValue=e}}}),L=function(e,t,n){e["$$"+t]=n})}catch(e){}return l}),define("sap/watt/lib/XMLDomParser/dom_parser",["./sax","./dom"],function(e,t){"use strict";function n(e){if(e)this.options=e;else{this.options={locator:{},domBuilder:new i,xmlns:{},errors:[]};var t=this.options.errors;this.options.errorHandler={fatalError:function(e,n,r){t.push({row:r.lineNumber,column:r.columnNumber,text:n,type:"error"})},error:function(e,n,r){t.push({row:r.lineNumber,column:r.columnNumber,text:n,type:"error"})},warning:function(e,n,r){t.push({row:r.lineNumber,column:r.columnNumber,text:n,type:"warning"})}}}}function r(e,t,n){function r(t){var r=e[t];if(!r)if(s)r=2==e.length?function(n){e(t,n)}:e;else for(var i=arguments.length;--i&&!(r=e[arguments[i]]););o[t]=r&&function(e){r(e+a(n),e,n)}||function(){}}if(!e){if(t instanceof i)return t;e=t}var o={},s=e instanceof Function;return n=n||{},r("warning","warn"),r("error","warn","warning"),r("fatalError","warn","warning","error"),o}function i(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function s(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function u(e,t){e.currentElement?e.currentElement.appendChild(t):e.document.appendChild(t)}return n.prototype.parseFromString=function(t,n){var o=this.options,a=new e,s=o.domBuilder||new i,u=o.errorHandler,c=o.locator,l=o.xmlns||{},p={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return c&&s.setDocumentLocator(c),a.errorHandler=r(u,s,c),a.domBuilder=o.domBuilder||s,/\/x?html?$/.test(n)&&(p.nbsp=" ",p.copy="©",l[""]="http://www.w3.org/1999/xhtml"),t?a.parse(t,l,p):a.errorHandler.error("invalid document source"),s.document},i.prototype={startDocument:function(){this.document=(new t).createDocument(null,null,null),this.locator&&(this.document.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.document,a=i.createElementNS(e,n||t),s=r.length;u(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var c=0;c0?(o.push(i[0]),u(i[0])):(n===!0&&s(),t=a)};u(e[0])},o=function(e){var t=0,i=e,a=e.length,s=function(){var e=0,t=i.length;for(e=0;ef||d>h?(f=i[r],p=[r]):i[r]===f&&p.push(r);for(c=p.length,o=c+t,r=t;r-1||"html"===e||"ejs"===e||"html_ruby"===e||"handlebars"===e||"swig"===e||"twig"===e||"php"===e||"dustjs"===e?"html":"markup"===e||"jsp"===e||"xml"===e||"xhtml"===e?"markup":"javascript"===e||"json"===e||"jsx"===e?"javascript":"text"===e?"text":"csv"===e?"csv":"tss"===e||"titanium"===e?"tss":"javascript"},m=function(e){return"javascript"===e?"JavaScript":"text"===e?"Plain Text":"jsx"===e?"React JSX":"scss"===e?"SCSS (Sass)":"ejs"===e?"EJS Template":"handlebars"===e?"Handlebars Template":"html_ruby"===e?"ERB (Ruby) Template":"tss"===e||"titanium"===e?"Titanium Stylesheets":"typescript"===e?"TypeScript (not supported yet)":"twig"===e?"HTML TWIG Template":"jsp"===e?"JSTL (JSP)":"java"===e?"Java (not supported yet)":e.toUpperCase()},g={accessibility:e.accessibility===!0||"true"===e.accessibility,api:void 0===e.api||0===e.api.length?"":e.api,braceline:e.braceline===!0||"true"===e.braceline,bracepadding:e.bracepadding===!0||"true"===e.bracepadding,braces:"allman"===e.braces?"allman":"knr",comments:"noindent"===e.comments?"noindent":"nocomment"===e.comments?"nocomment":"indent",conditional:e.conditional===!0||"true"===e.conditional,content:e.content===!0||"true"===e.content,context:""===e.context||/^(\s+)$/.test(e.context)||isNaN(e.context)?"":Number(e.context),correct:e.correct===!0||"true"===e.correct,cssinsertlines:e.cssinsertlines===!0||"true"===e.cssinsertlines,csvchar:"string"==typeof e.csvchar&&e.csvchar.length>0?e.csvchar:",",diff:"string"==typeof e.diff&&e.diff.length>0&&/^(\s+)$/.test(e.diff)===!1?e.diff:"",diffcli:e.diffcli===!0||"true"===e.diffcli,diffcomments:e.diffcomments===!0||"true"===e.diffcomments,difflabel:"string"==typeof e.difflabel&&e.difflabel.length>0?e.difflabel:"new",diffview:"inline"===e.diffview?"inline":"sidebyside",dustjs:e.dustjs===!0||"true"===e.dustjs,elseline:e.elseline===!0||"true"===e.elseline,force_indent:e.force_indent===!0||"true"===e.force_indent,html:e.html===!0||"true"===e.html||"string"==typeof e.html&&"html-yes"===e.html,inchar:"string"==typeof e.inchar&&e.inchar.length>0?e.inchar:" ",inlevel:isNaN(e.inlevel)||Number(e.inlevel)<1?0:Number(e.inlevel),insize:isNaN(e.insize)?4:Number(e.insize),jsscope:e.jsscope===!0||"true"===e.jsscope?"report":"html"!==e.jsscope&&"report"!==e.jsscope?"none":e.jsscope,lang:"string"==typeof e.lang&&"auto"!==e.lang?h(e.lang.toLowerCase()):"auto",langdefault:"string"==typeof e.langdefault?h(e.langdefault.toLowerCase()):"text",mode:"string"!=typeof e.mode||"minify"!==e.mode&&"beautify"!==e.mode&&"parse"!==e.mode?"diff":e.mode,obfuscate:e.obfuscate===!0||"true"===e.obfuscate,objsort:"all"===e.objsort,preserve:"all"===e.preserve,quote:e.quote===!0||"true"===e.quote,quoteConvert:"single"===e.quoteConvert||"double"===e.quoteConvert?e.quoteConvert:"none",semicolon:e.semicolon===!0||"true"===e.semicolon,source:"string"==typeof e.source&&e.source.length>0&&/^(\s+)$/.test(e.source)===!1?e.source:"",sourcelabel:"string"==typeof e.sourcelabel&&e.sourcelabel.length>0?e.sourcelabel:"base",space:e.space!==!1&&"false"!==e.space,style:"noindent"===e.style?"noindent":"indent",styleguide:"string"==typeof e.styleguide?e.styleguide:"",tagmerge:e.tagmerge===!0||"true"===e.tagmerge,textpreserve:e.textpreserve===!0||"true"===e.textpreserve,titanium:e.titanium===!0||"true"===e.titanium,topcoms:e.topcoms===!0||"true"===e.topcoms,varword:"each"===e.varword||"list"===e.varword?e.varword:"none",vertical:"all"===e.vertical,wrap:isNaN(e.wrap)===!0?80:Number(e.wrap)},v=[],y="",x=function(e){var t=[],n=0,r=0,i="",o=!1,a=!1,s=function(e){return"unknown"===e?[g.langdefault,h(g.langdefault),"unknown"]:"xhtml"===e?["xml","html","XHTML"]:"tss"===e?["tss","tss","Titanium Stylesheets"]:[e,h(e),m(e)]};if(null!==e){if(void 0===e||/^(\s*#(?!(!\/)))/.test(e)===!0||/\n\s*(\.|@)mixin\(?(\s*)/.test(e)===!0)return s(/\$[a-zA-Z]/.test(e)===!0||/\{\s*(\w|\.|\$|#)+\s*\{/.test(e)===!0?"scss":/@[a-zA-Z]/.test(e)===!0||/\{\s*(\w|\.|@|#)+\s*\{/.test(e)===!0?"less":"css");if(t=e.replace(/\[[a-zA-Z][\w\-]*\=("|')?[a-zA-Z][\w\-]*("|')?\]/g,"").split(""),n=t.length,/^([\s\w\-]*<)/.test(e)===!1&&/(>[\s\w\-]*)$/.test(e)===!1){for(r=1;r-1||e.indexOf("=")>-1||e.indexOf(";")>-1&&e.indexOf("{")>-1?/:\s*((number)|(string))/.test(e)===!0&&/((public)|(private))\s+/.test(e)===!0?"typescript":"javascript":"unknown")}return s((/(>[\w\s:]*)?<(\/|!)?[\w\s:\-\[]+/.test(e)===!0||/^(\s*<\?xml)/.test(e)===!0)&&(/^([\s\w]*<)/.test(e)===!0||/(>[\s\w]*)$/.test(e)===!0)||/^(\s*\s*)$/i.test(e)===!0?/\s*/i.test(e)===!0&&/\s*=60&&o<3600?u():o>=3600?(i=parseInt(o/3600,10),n=i.toString(),o-=3600*i,n=s(i," hour"),u()):a=s(a," second"),"

Execution time: "+n+e+a+"

"},_=function(){var e="",t=0,n=g.source.length,r=g.source.indexOf("/*prettydiff.com")+16,i=!1,o=[],a=-1,s=0,u=[],c="",l=g.source.indexOf("/*prettydiff.com"),p=g.diff.indexOf("/*prettydiff.com");if(!('"'===g.source.charAt(r-17)&&/var\s+prettydiff\s*\=\s*function/.test(g.source)===!1||l<0&&p<0||l>-1&&/^(\s*\{\s*"token"\s*:\s*\[)/.test(g.source)===!0&&/\],\s*"types"\s*:\s*\[/.test(g.source)===!0||l<0&&p>-1&&/^(\s*\{\s*"token"\s*:\s*\[)/.test(g.diff)===!0&&/\],\s*"types"\s*:\s*\[/.test(g.diff)===!0)){if(15===r&&"string"==typeof g.diff)r=g.diff.indexOf("/*prettydiff.com")+16,i=!0;else if(15===r)return;for(r=r;rCode type set to auto, but language could not be determined. Language defaulted to "+v[0]+".

":"

Code type set to auto. Presumed language is "+v[2]+".

"):"dom"===g.api?(v=[g.lang,g.lang,g.lang],y="

Code type is set to "+g.lang+".

"):(g.lang=h(g.lang),y="

Code type is set to "+g.lang+".

"),"dustjs"===v[0]&&(g.dustjs=!0),"html"===g.lang?(g.html=!0,g.lang="markup"):"tss"!==g.lang&&"titanium"!==g.lang||(g.titanium=!0,g.lang="javscript"),"css"===g.lang&&("css"!==e.objsort&&"cssonly"!==e.objsort||(g.objsort=!0),"css"!==e.preserve&&"cssonly"!==e.preserve||(g.preserve=!0),"css"!==e.vertical&&"cssonly"!==e.vertical||(g.vertical=!0)),"js"===g.lang&&("js"!==e.objsort&&"jsonly"!==e.objsort||(g.objsort=!0),"js"!==e.preserve&&"jsonly"!==e.preserve||(g.preserve=!0),"js"!==e.vertical&&"jsonly"!==e.vertical||(g.vertical=!0)),"minify"===g.mode?("css"===g.lang?p=o(g):"csv"===g.lang?p=s(g.source,g.csvchar):"markup"===g.lang?p=l(g):"text"===g.lang?(p=g.source,f=""):(g.wrap=-1,p=c(g)),function(){var e=function(){var e=0,t=0,n=g.source,i=n.length,o=0,a=p.length,s=i-a,u=0,c=s/i*100,l=c.toFixed(2)+"%",f="",d=[];for(e=0;e")?d.push(r):""!==r&&d.push("

Duplicate id attribute values detected: "+r+"

"),d.push("
Minification efficiency report
Output SizeNumber of Lines From Input
"),d.push(a),d.push(""),d.push(t+1),d.push("
Operating SystemInput SizeSize DifferencePercentage of Decrease
Unix/Linux"),d.push(i),d.push(""),d.push(s),d.push(""),d.push(l),d.push("
Windows"),d.push(o),d.push(""),d.push(u),d.push(""),d.push(f),d.push("
"),d.join("")};return n===!0&&(v=["jsx","javascript","React JSX"],y="

Code type set to auto. Presumed language is React JSX.

"),[p,y+b()+e()]}()):"parse"===g.mode?("css"===g.lang?p=o(g):"csv"===g.lang?(p="CSV not supported in parse mode",f=""):"markup"===g.lang?(p=l(g),y+=r):"text"===g.lang?(p=g.source,f=""):p=c(g),f===!1&&(f=""),n===!0&&(y="

Code type is presumed to be React JSX.

"),void 0!==p.token&&(y=y+"

Total tokens: "+p.token.length+"

"),[p,y+b()]):"beautify"===g.mode?("css"===g.lang?(p=o(g),f=r):"csv"===g.lang?(p=a(g.source,g.csvchar),f=""):"markup"===g.lang?("jsonly"===e.vertical&&(g.vertical="jsonly"),p=l(g),f=r,"\t"!==g.inchar&&(p=p.replace(/\n[\t]*\u0020\/>/g,""))):"text"===g.lang?(p=g.source,f=""):("jsonly"===e.vertical&&(g.vertical="jsonly"),p=c(g),f=r),f===!1&&(f=""),n===!0&&(y="

Code type is presumed to be React JSX.

"),""===g.api&&"none"!==g.jsscope&&"javascript"===g.lang?(d.head="Pretty Diff - The difference tool

Pretty Diff - The difference tool

",d.scriptOpen="",[d.head+d.cssCore+d.cssColor+d.cssExtra+d.body+d.bodyColor+d.title+x+b()+"
"+f+d.scriptOpen+d.scriptBody+d.scriptEnd+"",""]):[p,y+b()+f]):"diff"===g.mode?(r="diff",g.vertical=!1,g.jsscope=!1,g.preserve=!1,g.diffcomments===!1&&(g.comments="nocomment"),""===g.source||""===g.diff?["",""]:("css"===g.lang?(p=o(g),g.source=g.diff,f=o(g)):"csv"===g.lang?(p=a(g.source,g.csvchar),f=a(g.diff,g.csvchar)):"markup"===g.lang?(p=l(g).replace(/\n[\t]*\ \/>/g,""),g.source=g.diff,f=l(g).replace(/\n[\t]*\ \/>/g,"")):"text"===g.lang?(p=g.source,f=g.diff):(p=c(g),g.source=g.diff,f=c(g)),g.quote===!0&&(p=p.replace(/'/g,'"'),f=f.replace(/'/g,'"')),g.semicolon===!0&&(p=p.replace(/;\n/g,"\n"),f=f.replace(/;\n/g,"\n")),(""===g.sourcelabel||i.test(g.sourcelabel))&&(g.sourcelabel="Base Text"),(""===g.difflabel||i.test(g.difflabel))&&(g.difflabel="New Text"),function(){var e=[],t="s",r="s",i="";return g.diffcli===!0?u({baseTextLines:p,baseTextName:g.sourcelabel,contextSize:g.context,diffcli:g.diffcli,inline:g.diffview,newTextLines:f,newTextName:g.difflabel,tchar:g.inchar,tsize:g.insize}):("Error: This does not appear to be JavaScript."===p||"Error: This does not appear to be JavaScript."===f?e[1]=["

Error: Please try using the option labeled Plain Text (diff only). The input does not appear to be markup, CSS, or JavaScript.

",0,0]:("text"!==g.lang&&(i=g.inchar),e[1]=u({baseTextLines:p,baseTextName:g.sourcelabel,contextSize:g.context,inline:g.diffview,newTextLines:f,newTextName:g.difflabel,tchar:i,tsize:g.insize}),1===e[1][2]&&(r="",0===e[1][1]&&(t=""))),e[0]="

Number of differences: "+(e[1][1]+e[1][2])+" difference"+t+" from "+e[1][2]+" line"+r+" of code.

",n===!0&&(y="

Code type is presumed to be React JSX.

"),""===g.api?(d.head="Pretty Diff - The difference tool

Pretty Diff - The difference tool

",d.accessibility="

Accessibility note. <em> tags in the output represent character differences per lines compared.

",d.scriptOpen="",[d.head+d.cssCore+d.cssColor+d.cssExtra+d.body+d.bodyColor+d.title+x+b()+e[0]+d.accessibility+e[1][0]+d.scriptOpen+d.scriptBody+d.scriptEnd+"",""]):[e[1][0],y+b()+e[0]+"

Accessibility note. <em> tags in the output represent presentation for variable coloring and scope.

"])}())):void 0)};return i=function(e){var t=0,n=0,r=0,i=0,o=0,a=[],s=[],u=[],c=/u\+[0-9a-f]{4,5}\+/,l=/u![0-9a-f]{4,5}\+/,p=/&#[0-9]{1,6};/,f=/&![0-9]{1,6};/;if(void 0===pd||null===pd.o.report.beau||void 0===pd.o.report.beau||"string"!=typeof pd.o.report.beau.innerHTML||e.search(l)===-1&&e.search(c)===-1&&e.search(f)===-1&&e.search(p)===-1)return e;for(i=e.length,n=0;n1&&n===!0&&c===!0?void(y=!0):("comment"!==h[h.length-1]&&"comment-inline"!==h[h.length-1]&&(r>2||r>1&&t[e]+t[e+1]==="//")&&(m[m.length-1]=1),void(a=""))},b=function(){var e=0,t=0,n=0,r=d.length-1,i=r,o=[],a=0,s=0,u=0,c=function(e,t){var n=e[0],i=t[0];if("comment"===h[n]||"comment-inline"===h[n])do n+=1;while(n0&&("comment"===h[i]||"comment-inline"===h[i]));for(e=r;e>-1;e-=1)if("end"===h[e]&&(t+=1),"start"===h[e]&&(t-=1),0===t&&(";"!==d[e]&&"}"!==d[e]||(l=!0,u=e+1,"comment-inline"===h[u]&&(u+=1)),l!==!0||";"!==d[e]&&"}"!==d[e]||!(u0&&("comment"===h[u]||"selector"===h[u])&&(m[u-1]=0,m[u]=1),"comment-inline"===h[i+1]&&(i+=1),o.push([u,i+1,!1]),i=u-1)),t<0&&e0&&o[o.length-1][0]>e+1&&o.push([e+1,o[o.length-1][0]-1,o[o.length-1][2]]),o.length>1&&("selector"===h[e-1]||"="===d[e-1]||":"===d[e-1]||"["===d[e-1]||"{"===d[e-1]||","===d[e-1]||0===e)){for(o.sort(c),a=o.length,l=!1,t=0;t0?(g[g.length-1]=1,g.push(0)):g.push(m[n]),";"===d[n]||"}"===d[n]?l=!0:";"!==d[n]&&"}"!==d[n]&&"comment"!==h[n]&&"comment-inline"!==h[n]&&(l=!1);if(l===!1){if(n=f.length-1,"comment"===f[n]||"comment-inline"===f[n])do n-=1;while(n>0&&("comment"===f[n]||"comment-inline"===f[n]));n+=1,p.splice(n,0,";"),f.splice(n,0,"semi"),g[n-1]>0?(g[n-1]=0,g.splice(n,0,1)):g.splice(n,0,0)}}if(n=f.length-1,"comment"===f[n]||"comment-inline"===f[n])do n-=1;while(n>0&&("comment"===f[n]||"comment-inline"===f[n]));a=d.length-(e+1),d.splice(e+1,a),h.splice(e+1,a),m.splice(e+1,a),d=d.concat(p),h=h.concat(f),m=m.concat(g)}return}},_=function(e){var t=d.length,r=0,a=[],u=function(e){var t=e.split(""),n=t.length,r=0,i=0,o=[],a="",s=[];for(r=0;r0&&("comment"===i||"comment-inline"===i))}else t-=1;if("item"===i)if("start"===e)x.selectors.count+=1,x.selectors.chars+=o,"comment"!==h[t-1]&&"comment-inline"!==h[t-1]&&"end"!==h[t-1]&&"start"!==h[t-1]&&"semi"!==h[t-1]&&void 0!==h[t-1]?!function(){var e=[],n=t,r=0;do e.push(d[n]),n-=1;while(n>0&&"comment"!==h[n]&&"comment-inline"!==h[n]&&"end"!==h[n]&&"start"!==h[n]&&"semi"!==h[n]&&void 0!==h[n]);e.reverse(),n+=1,r=t-n,d.splice(n,r),h.splice(n,r),m.splice(n,r),t-=r,d[t]=e.join("").replace(/\s*,(\s*)/g,",")}():d[t]=d[t].replace(/\s*,(\s*)/g,","),h[t]="selector";else if("end"===e){if(h[t]="value","diff"!==s&&(d[t]=u(d[t])),"beautify"===s||"diff"===s&&n===!0)if("{"===d[d.length-2])h[h.length-1]="propvar",x.values.count-=1,x.values.chars-=o,x.variables.count+=1,x.variables.chars+=o;else if(a.length>0&&"semi"!==i&&"end"!==i&&"start"!==i){t=a.length-1;do d.pop(),h.pop(),m.pop(),t-=1;while(t>0);"diff"===s?d.push("x;"):d.push(";"),h.push("semi"),m.push(0),r=a.length-1;do d.push(a[t]),0===a[t].indexOf("//")&&0===m[m.length-1]?h.push("comment-inline"):h.push("comment"),m.push(0),t+=1;while(t0&&","===d[d.length-1].charAt(d[d.length-1].length-1)&&"comment"!==h[h.length-1]&&"comment-inline"!==h[h.length-1])f.push(d[d.length-1]),d.pop(),h.pop(),m.pop(),d.push(u.join("")),h.push(c),m.push(0),d.push(f[0]),h.push("selector"),m.push(0);else if("colon"===i||"property"===i||"value"===i||"propvar"===i){do f.push(d[d.length-1]),l.push(h[h.length-1]),g.push(m[m.length-1]),d.pop(),h.pop(),m.pop();while(h.length>1&&"semi"!==h[h.length-1]&&"start"!==h[h.length-1]);d.push(u.join("")),h.push(c),m.push(0);do d.push(f[f.length-1]),h.push(l[l.length-1]),m.push(g[g.length-1]),f.pop(),l.pop(),g.pop();while(f.length>0)}else i=c,h.push(c),d.push(u.join("")),m.push(0)},E=function(){var n=0,a=0,s=[],u="",c=d.length>0&&","===d[d.length-1].charAt(d[d.length-1].length-1);for(v(!1),n=e;n-1;e-=1){if("start"===h[e]&&(t-=1,0===t)){for(a=e,o.pop(),e=o.length-1;e>-1;e-=1)o[e].reverse();break}"end"===h[e]&&(t+=1),1===t&&"property"===h[e]&&"beautify"===s&&i.push(e),o[o.length-1].push(e),1!==t||"comment"!==h[e-1]&&"comment-inline"!==h[e-1]&&"semi"!==h[e-1]&&"end"!==h[e-1]&&"start"!==h[e-1]||"start"===h[e]||"end"===h[e]||o.push([])}if(o.reverse(),t=0,f===!0){for(e=i.length-1;e>-1;e-=1)d[i[e]].length>t&&"filter"!==d[i[e]]&&"progid"!==d[i[e]]&&(t=d[i[e]].length);for(e=i.length-1;e>-1;e-=1)if(n=t-d[i[e]].length,n>0&&"filter"!==d[i[e]]&&"progid"!==d[i[e]])do d[i[e]]=d[i[e]]+" ",n-=1;while(n>0)}for(function(){var t=o.length,n=function(e,n){var r=[!1,!1,!1,!1],a=["0","0","0","0"],u=/^(0+([a-z]+|%))/,c=-1,l=-1,p=0,h=[],m=function(e){l+=1,a[e]=d[o[p][2]],r[e]=!0,c<0&&(c=p)},g=function(){var e=0,t=0,r=0,o=i.length;for(e=0;et&&(t=d[i[e]].length);for(e=0;e0)}};for(p=e;p0)}else g();break}};for(t=o.length,e=0;e0&&a.push(e.substr(i)),u=a.length,0===u&&a.push(e),r.push(a[0].replace(/,(\s*)/g,", ").replace(/(,\ )$/,",")),t=1;t0){e=o;do e-=1,r.push(l);while(e>0)}for(e=0;e0&&"#"===d[e-1].charAt(d[e-1].length-1)?r.push(d[e]):("colon"===h[e-1]&&r.push(" "),r.push(d[e]),s+=1,p(s)):"end"===h[e]?(u===!0?(u=!1,r.push(d[e]),r.push(" ")):(s-=1,p(s),r.push(d[e]),"end"!==h[e+1]&&"semi"!==h[e+1]&&p(s)),t===!0&&"end"!==h[e+1]&&r.push("\n")):"semi"===h[e]?("x;"!==d[e]&&r.push(d[e]),"comment-inline"===h[e+1]?r.push(" "):"end"!==h[e+1]&&p(s)):"selector"===h[e]?(c===!0&&m[e-1]>0&&p(s),"#"===d[e].charAt(d[e].length-1)?(r.push(d[e]),u=!0):d[e].indexOf(",")>-1?f(d[e]):(":"===d[e].charAt(0)&&"}"===d[e-1]&&" "===r[r.length-1]&&r.pop(),r.push(d[e]),r.push(" "))):"comment"!==h[e]&&"comment-inline"!==h[e]||"colon"===h[e-1]||"property"===h[e-1]?("value"!==h[e]||"semi"===h[e-1]||u!==!1&&":"!==d[e-1]||"filter"===d[e-2]||"progid"===d[e-2]||r.push(" "),r.push(d[e])):(m[e-1]>0&&p(s),r.push(d[e]),"end"!==h[e+1]&&p(s));return c===!0&&(m[m.length-1]>0||y===!0)?r.join("").replace(/(\s+)$/,"\n"):r.join("").replace(/(\s+)$/,"")}():d.join("").replace(/;\}/g,"}"),"beautify"===s&&(r=function(){var e=[],t=l.length,n=v.length,r=g.length,i=0,o=0,a=0;for(e.push("

Number of HTTP requests: "),e.push(r),e.push("

Component counts and sizes
Type NameQuantityCharacter Size
curly braces"),e.push(x.braces),e.push(""),e.push(x.braces),e.push("
colon"),e.push(x.colon),e.push(""),e.push(x.colon),e.push("
comments"),e.push(x.comments.count),e.push(""),e.push(x.comments.chars),e.push("
properties"),e.push(x.properties.count),e.push(""),e.push(x.properties.chars),e.push("
selectors"),e.push(x.selectors.count),e.push(""),e.push(x.selectors.chars),e.push("
semicolons"),e.push(x.semi),e.push(""),e.push(x.semi),e.push("
white space"),e.push(x.space),e.push(""),e.push(x.space),e.push("
values"),e.push(x.values.count),e.push(""),e.push(x.values.chars),e.push("
variables"),e.push(x.variables.count),e.push(""),e.push(x.variables.chars),e.push("
CSS character size change
Input"),e.push(t),e.push("
Output"),e.push(n),e.push("
"),n>t?(e.push("Increase"),e.push(n-t),e.push("
Percent Change"),o=(n-t)/n*100,e.push(o.toFixed(2))):(e.push("Decrease"),e.push(t-n),e.push("
Percent Change"),o=(t-n)/t*100,e.push(o.toFixed(2))),e.push("%
"),o=0;o")}return e.push("
A List of HTTP Requests
QuantityURI
"),e.push(i),e.push(""),e.push(g[o].replace(/&/g,"&").replace(//g,">")),e.push("
"),e.join("")}()),v))},a=function(e,t){var n="",r=0,o=0,a=[],s="Error: Unterminated string begging at character number ";if(function(){var t=0,i=0,o=[];for(e=e.replace(/\{csv/g,"{prettydiffcsv").replace(/"{2}/g,"{csvquote}"),o=e.split(""),i=o.length,r=0;re.length)return e.replace(/\{prettydiffcsv/g,"{csv");if(e===s)return r!==e.length-1?e+r+", '"+n+"'.":e+r+".";e=e.replace(/\n/g,"\n\n{-}\n\n"),e.charAt(e.length-t.length)===t&&(e=e.slice(0,e.length+1-t.length)+"{|}");do e=e.replace(t,"\n");while(e.indexOf(t)!==-1);for(o=a.length,r=0;r2)for(a=o.length-1,i=1;i/g,">"):"Base Source",a="string"==typeof e.newTextName?e.newTextName.replace(/&/g,"&").replace(//g,">"):"New Source",s=e.diffcli===!0||"true"===e.diffcli,u=/^([0-9]+)$/.test(e.contextSize)?Number(e.contextSize):-1,c=/^([0-9]+)$/.test(e.tsize)?Number(e.tsize):4,l="string"==typeof e.tchar?e.tchar:" ",p=e.inline===!0||"true"===e.inline,f=function(){var e=0,t=[];if(""===l)return"";for(e=0;e-1&&n>-1||n<0?"\n":"\r",i="";return e="\n"===r?e.replace(/\r/g,""):e.replace(/\n/g,""),i=s===!0?e:e.replace(/&/g,"&").replace(/&#lt;/g,"$#lt;").replace(/&#gt;/g,"$#gt;").replace(//g,"$#gt;"),i.split(r)},h=d(r),m=d(i),g=function(){var e={},t=function(t){if(e.hasOwnProperty(t))return e[t]},n=[],o=[],a=[],s=!1,u=[],c=[],l=function(){for(var e=0,r=0,i=0,s=0,c=0,l=0,p=0,f=0,d=0,h=0,m=0,g=0,v=0,y=0,x=0,b=n.length,_=o.length,w=[],E=[],S=[],C=[[0,b,0,_]],T=function(e,t){var n=0,r=Math.max(e.length,t.length);for(n=0;nt[n])return 1}return e.length===t.length?0:e.length=i){if(p>=s)break;f=d[0]===p-1?d[1]+1:1,f>g&&(h=u-f+1,m=p-f+1,g=f)}d=[p,f]}}for(;h>e&&m>i&&void 0===t(o[m-1])&&n[h-1]===o[m-1];)h-=1,m-=1,g+=1;for(;h+ge&&m>i&&void 0!==t(o[m-1])&&n[h-1]===o[m-1];)h-=1,m-=1,g+=1;for(;h+g0;)E=C.pop(),i=E[0],s=E[1],c=E[2],l=E[3],w=D(i,s,c,l),p=w[0],f=w[1],d=w[2],d>0&&(u.push(w),i0&&S.push([h,g,y]),h=m,g=v,y=x);return y>0&&S.push([h,g,y]),S.push([b,_,0]),S};return""===r||""===i?"":(function(){!function(){h.length>m.length?(s=!0,n=m,o=h):(n=h,o=m)}(),function(){var e=0,t=0,n="",r=o.length;for(e=0;e-1&&a[t][1]!==n;t-=1);t>-1?r>=200&&100>r&&a.splice(t,1):a.push([e,n])}}(),function(){var e=0,t=0,r=0,i=0,a="",u=0,p=0,f=l(),d=f.length,h=function(e,t,n){var r=function(e,t){var n=0,r=e.replace(/^(\s+)/,"").split(""),i=Math.min(r.length,t.length);for(n=0;n0};for(e=0;ep-r?h(o[p],o[p+1],n[u])===!0?(c.push(["delete",p,p+1,u,u]),c.push(["replace",p+1,r,u,t])):c.push(["replace",p,r,u,t]):s===!1&&r-p>t-u?h(o[p],o[p+1],n[u])===!0?(c.push(["insert",u,u,p,p+1]),c.push(["replace",u,t,p+1,r])):c.push(["replace",u,t,p,r]):a="replace":a="replace":u0&&(s===!0?c.push(["equal",r,p,t,u]):c.push(["equal",t,u,r,p]))}()}(),c)}();return function(){var e=0,r=0,i=["
"],c=s===!0?[[],[],[],[],[],[]]:[[],[],[],[]],l=0,d=0,v=0,y=0,x=0,b=0,_=0,w=0,E=0,S="",C=""===f?"":new RegExp("^(("+f.replace(/\\/g,"\\")+")+)"),T=function(e){var t=0,n=e.length,r=[];for(t=0;t").replace(/\$#lt;/g,"<").replace(/\$#gt;/g,">").replace(/&/g,"&"),u=s===!0?n:n.replace(/ /g," ").replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/\$#lt;/g,"<").replace(/\$#gt;/g,">").replace(/&/g,"&"),c=0,l=[],p=/_pdiffdiff\u005f/g,f=/_epdiffdiff\u005f/g,d="_pdiffdiff_",h="_epdiffdiff_",m=function(){var e="",t="",n="",r="",i=[],o=a.match(C),s=u.match(C);return null===o||null===s||""===o[0]&&1===o.length||""===s[0]&&1===s.length?["","",a,u]:(e=o[0],t=s[0],n=a.split(e)[1],r=u.split(t)[1],e.length>t.length?(i=e.split(t),e=t+d+i[1]+h,t=t+d+h):(i=t.split(e),t=e+d+i[1]+h,e=e+d+h),[e,t,n,r])}(),g=function(e){var t=0,n=0,r=Math.max(i.length,o.length),a=[],s=function(e,t){return e[1]-e[0]t[0]+t[1]?1:-1};for(t=e;t").replace(f,""),m[1]=m[1]+m[3],m[1]=m[1].replace(p,"").replace(f,""),[m[0],m[1]]):(m[0]=m[0]+m[2],m[0]=m[0].replace(/&/g,"&").replace(//g,">").replace(p,"").replace(f,""),m[1]=m[1]+m[3],m[1]=m[1].replace(/&/g,"&").replace(//g,">").replace(p,"").replace(f,""),[m[0],m[1]]);for(i=a.split(""),o=u.split(""),c=Math.min(i.length,o.length),r=0;r0?(i[r-1]=i[r-1]+d,o[r-1]=o[r-1]+d):(i[r]=d+i[r],o[r]=d+o[r]),1===l[2]?(0===l[0]?i[0]=i[0].replace(p,d+h):l[0]===c?o.length===c?i[i.length-1]=i[i.length-1]+h:i[l[0]-1]=i[l[0]-1]+h:i[l[0]].indexOf(d)>-1?i[l[0]]=i[l[0]]+h:i[l[0]]=h+i[l[0]],l[1]>o.length-1||l[0]===c?o[o.length-1]=o[o.length-1]+h:o[l[1]]=h+o[l[1]]):(0===l[0]?o[0]=o[0].replace(p,d+h):l[0]===c?i.length===c?o[o.length-1]=o[o.length-1]+h:o[l[0]-1]=o[l[0]-1]+h:o[l[0]].indexOf(d)>-1?o[l[0]]=o[l[0]]+h:o[l[0]]=h+o[l[0]],l[1]>i.length-1||l[0]===c?i[i.length-1]=i[i.length-1]+h:i[l[1]]=h+i[l[1]]),l[1]>l[0]&&l[1]-l[0]<1e3)if(1===l[2]){do i.unshift(""),l[0]+=1;while(l[1]>l[0])}else do o.unshift(""),l[0]+=1;while(l[1]>l[0]);c=Math.min(i.length,o.length),r=l[1]}return i.length>o.length&&void 0!==o[o.length-1]&&o[o.length-1].indexOf(h)<0&&(o.push(d+h),i[o.length-1]=d+i[o.length-1],i[i.length-1]=i[i.length-1]+h,t+=1),o.length>i.length&&void 0!==i[i.length-1]&&i[i.length-1].indexOf(h)<0&&(i.push(d+h),o[i.length-1]=d+o[i.length-1],o[o.length-1]=o[o.length-1]+h,t+=1),s===!0?[i.join("").replace(p,"").replace(f,""),o.join("").replace(p,"").replace(f,"")]:[i.join("").replace(/&/g,"&").replace(//g,">").replace(p,"").replace(f,""),o.join("").replace(/&/g,"&").replace(//g,">").replace(p,"").replace(f,"")]};for(s===!1&&(p===!0?(i.push("

"),i.push(o),i.push(" vs. "),i.push(a),i.push("

    ")):(c[0].push("

    "),c[0].push(o),c[0].push("

      "),c[2].push("

      "),c[2].push(a),c[2].push("

        "))),e=0;e-1&&g.length>1&&(e>0&&r===u||0===e&&0===r)&&"equal"===k){if(N=!1,E=x-(0===e?1:2)*u,E>1&&(b+=1,l+=E,v+=E,r+=E-1,s===!0?c[5].push([l,v]):(c[0].push("
      1. ...
      2. "),p===!1&&c[1].push(""),c[2].push("
      3. ...
      4. "),c[3].push("")),e+1===g.length))break}else"equal"!==k&&(n+=1);h[l]===m[v]?k="equal":"equal"===k&&(k="replace"),""!==f&&(I!==!1||h[d]===m[y]||"string"!=typeof h[l+1]||"string"!=typeof m[v]||D[l+1]!==A[v]||D[l]===A[v]||"string"==typeof m[v-1]&&D[l]===A[v-1]?F!==!1||h[d]===m[y]||"string"!=typeof m[v+1]||"string"!=typeof h[l]||A[v+1]!==D[l]||A[v]===D[l]||"string"==typeof h[l-1]&&A[v]===D[l-1]||(F=!0):I=!0),s===!0?(F===!0||"insert"===k?(c[0].push(0),c[1].push(""),c[2].push(v+1),c[3].push(m[v]),c[4].push("insert"),t+=1):I===!0||"delete"===k?(c[0].push(l+1),c[1].push(h[l]),c[2].push(0),c[3].push(""),c[4].push("delete"),t+=1):"replace"===k?(h[l]!==m[v]&&(""===h[l]?R=["",m[v]]:""===m[v]?R=[h[l],""]:l0&&(c[0][w]=c[0][w].replace("xxx",b)),F===!0||"insert"===k?(c[0].push("
      5. "),c[2].push("
      6. "),c[2].push(v+1),c[2].push("
      7. "),c[3].push("
      8. "),c[3].push(m[v]),c[3].push("
      9. "),b+=1,t+=1):I===!0||"delete"===k?(c[0].push("
      10. "),c[0].push(l+1),c[0].push("
      11. "),c[2].push("
      12. "),c[3].push("
      13. "),c[3].push(h[l]),c[3].push("
      14. "),b+=1,t+=1):"replace"===k?(h[l]!==m[v]&&(""===h[l]?(R=["",m[v]],t+=1):""===m[v]?(R=[h[l],""],t+=1):l"),c[0].push(l+1),c[0].push(""),c[2].push("
      15. "),c[3].push("
      16. "),v"),b+=1),v
      17. "),c[2].push("
      18. "),c[2].push(v+1),c[2].push("
      19. "),c[3].push("
      20. "),l"),b+=1)):(l1||y-v>1)?(w=c[0].length,e===P-1?d>y?c[0].push("
      21. "):c[0].push("
      22. "):c[0].push("
      23. "),c[0].push("- "+(l+1))):(c[0].push("
      24. "),c[0].push(l+1)),c[0].push("
      25. "),c[2].push("
      26. "),c[2].push(v+1),c[2].push("
      27. "),c[3].push("
      28. "),c[3].push(h[l]),c[3].push("
      29. "),"equal"!==k&&(t+=1)),I===!0?(l+=1,I=!1):F===!0?(v+=1,F=!1):(l+=1,v+=1)):(u<0&&h[l]!==m[v]&&(c[0][w]=c[0][w].replace("xxx",b)),I===!1&&F===!1&&"string"==typeof h[l]&&"string"==typeof m[v]?(""===h[l]&&""!==m[v]&&(k="insert"),""===m[v]&&""!==h[l]&&(k="delete"),R="replace"===k&&l")+1,c[0][c[0].length-1].lastIndexOf("<")))-1&&v!==Number(c[2][c[2].length-1].substring(c[2][c[2].length-1].indexOf(">")+1,c[2][c[2].length-1].lastIndexOf("<")))-1||(O=!0),O===!1?(b+=1,l1&&"equal"!==g[e-1][0]&&l===g[e-1][2]||0===l&&0===v)&&h[l+1]===m[v+1]&&(d-l>1||y-v>1)?e===P-1?d>y?c[0].push("
      30. - "+(l+1)+"
      31. "):c[0].push("
      32. - "+(l+1)+"
      33. "):(w=c[0].length,c[0].push("
      34. - "+(l+1)+"
      35. ")):c[0].push("
      36. "+(l+1)+"
      37. "),c[1].push("
      38. "),c[1].push(R[0]),c[1].push("
      39. ")):N===!0&&(c[0].push("
      40. "),c[1].push("
      41. ")),v"+(v+1)+""),c[3].push("
      42. "),c[3].push(R[1]),c[3].push("
      43. ")):N===!0&&(c[2].push("
      44. "),c[3].push("
      45. "))):O=!1,l")+1,c[0][c[0].length-1].lastIndexOf("<")))-1&&(b+=1,c[0].push("
      46. "+(l+1)+"
      47. "), c[1].push("
      48. "),c[1].push(h[l]),c[1].push("
      49. "),c[2].push("
      50. "),c[3].push("
      51. ")),I=!1,l+=1):(F===!0||"string"!=typeof h[l]&&"string"==typeof m[v])&&(v!==Number(c[2][c[2].length-1].substring(c[2][c[2].length-1].indexOf(">")+1,c[2][c[2].length-1].lastIndexOf("<")))-1&&(b+=1,c[0].push("
      52. "),c[1].push("
      53. "),c[2].push("
      54. "+(v+1)+"
      55. "),c[3].push("
      56. "),c[3].push(m[v]),c[3].push("
      57. ")),F=!1,v+=1))}return"string"==typeof c[0][w]&&(c[0][w]=c[0][w].replace("xxx",b)),s===!0?(c.push(t),c):(i.push(c[0].join("")),i.push("
        "):(i.push("'data'>"),i.push(c[1].join("")),i.push("
      ")),i.push(c[2].join("")),i.push("
      "),i.push(c[3].join("")),p===!0?i.push("
    "):i.push("
"),i.push("

Diff view written by Pretty Diff.

"),S=i.join(""),[S.replace(/li\ class='equal'><\/li/g,"li class='equal'> 0?e.inchar:" ",s="noindent"===e.comments?"noindent":"nocomment"===e.comments?"nocomment":"indent",u=e.elseline===!0||"true"===e.elseline,c=e.inlevel>-1?e.inlevel:Number(e.inlevel)>-1?Number(e.inlevel):0,p="minify"===e.mode||"parse"===e.mode||"diff"===e.mode?e.mode:"beautify",f=e.obfuscate===!0||"true"===e.obfuscate,d=e.objsort===!0||"true"===e.objsort,h=e.preserve!==!1&&"false"!==e.preserve,m="double"===e.quoteConvert||"single"===e.quoteConvert?e.quoteConvert:"none",g=e.correct===!0||"true"===e.correct,v=isNaN(e.insize)===!1&&Number(e.insize)>=0?Number(e.insize):4,y="string"==typeof e.source&&e.source.length>0?e.source+" ":"Error: no source code supplied to jspretty!",x=e.space!==!1&&"false"!==e.space,b=e.jsscope===!0||"true"===e.jsscope?"report":"html"!==e.jsscope&&"report"!==e.jsscope?"none":e.jsscope,_="string"==typeof e.styleguide?e.styleguide.toLowerCase().replace(/\s/g,""):"",w=e.titanium===!0||"true"===e.titanium,E=e.topcoms===!0||"true"===e.topcoms,S="each"===e.varword||"list"===e.varword?e.varword:"none",C=e.vertical!==!1&&"false"!==e.vertical,T=isNaN(Number(e.wrap))===!0?0:Number(e.wrap),D=[0,""],A=[],P=[],k=[],I=[],F=[],O=[],N=[],j=[],R=[],L=0,M=0,B={comma:0,commentBlock:{chars:0,token:0},commentLine:{chars:0,token:0},container:0,number:{chars:0,token:0},operator:{chars:0,token:0},regex:{chars:0,token:0},semicolon:0,server:{chars:0,token:0},space:{newline:0,other:0,space:0,tab:0},string:{chars:0,quote:0,token:0},word:{chars:0,token:0}},U="";return"Error: no source code supplied to jspretty!"===y?y:("none"!==b&&(T=0),"airbnb"===_?(a=" ",h=!0,m="single",g=!0,v=2,S="each",T=80):"crockford"===_||"jslint"===_?(i=!1,u=!1,a=" ",g=!0,v=4,x=!0,S="list",C=!1):"google"===_?(a=" ",h=!0,m="single",g=!0,v=4,C=!1,T=-1):"grunt"===_?(a=" ",v=2,m="single",S="each"):"jquery"===_?(i=!0,a="\t",m="double",g=!0,v=1,S="each",T=80):"mrdoobs"===_?(t=!0,i=!0,a="\t",g=!0,v=1,C=!1):"mediawiki"===_?(i=!0,a="\t",h=!0,m="single",g=!0,v=1,x=!1,T=80):"meteor"===_?(a=" ",g=!0,v=2,T=80):"yandex"===_&&(i=!1,m="single",g=!0,S="each",C=!1),w===!0&&(g=!1,A.push("x{"),P.push("start"),I.push(0)),function(){var e=0,r=y.length,i=y.split(""),o="",a="",u=0,c=0,l=-1,h=[],v={count:[],index:0,len:-1,state:[]},w={count:[],len:-1,status:[]},E={consec:[],count:[],index:[],len:-1,priorreturn:[],semi:[],word:[]},C={count:[],index:[],len:-1},k=function(){var e=0,t=0,n=0,r=A.length-1,i=r,o=[],a=0,s=0,u=0,c=function(e,t){var n=e[0],i=t[0];if("comment"===P[n]||"comment-inline"===P[n])do n+=1;while(nA[i].toLowerCase()?1:-1},l=!0,p=[],f=[],d=[];if(","===A[i]||"comment"===P[i]||"comment-inline"===P[i])do i-=1;while(i>0&&(","===A[i]||"comment"===P[i]||"comment-inline"===P[i]));for(e=i;e>-1;e-=1)if("end"===P[e]&&(t+=1),"start"!==P[e]&&"method"!==P[e]||(t-=1),0===t&&(","===A[e]&&(l=!0,u=e+1),l===!0&&","===A[e]&&u0&&o[o.length-1][0]>e+1&&o.push([e+1,o[o.length-1][0]-1,o[o.length-1][2]]),o.length>1&&("="===A[e-1]||":"===A[e-1]||"("===A[e-1]||"["===A[e-1]||","===A[e-1]||0===e)){for(o.sort(c),a=o.length,l=!1,t=0;t0&&("comment"===f[n]||"comment-inline"===f[n]));n+=1,p.splice(n,0,","),f.splice(n,0,"separator"),2===d[n-1]?(d[n-1]=0,d.splice(n,0,2)):d.splice(n,0,0)}}if(n=f.length-1,"comment"===f[n]||"comment-inline"===f[n])do n-=1;while(n>0&&("comment"===f[n]||"comment-inline"===f[n]));p.splice(n,1),f.splice(n,1),d.splice(n,1),a=A.length-(e+1),A.splice(e+1,a),P.splice(e+1,a),I.splice(e+1,a),A=A.concat(p),P=P.concat(f),I=I.concat(d)}return}},F=function(){w.count.pop(),w.len-=1,w.status.pop(),d===!0&&k()},O=function(){E.consec.pop(),E.count.pop(),E.index.pop(),E.len-=1,E.priorreturn.pop(),E.semi.pop(),E.word.pop()},N=function(){C.count.pop(),C.index.pop(),C.len-=1},j=function(){var e=0,n=!1,r=I.length-1,i=I[r];if(!(E.len<0)){if(e=E.index[E.len],n=E.consec[E.len],"comment"===P[e]||"comment-inline"===P[e]){do e-=1;while(e>0&&("comment"===P[e]||"comment-inline"===P[e]));e+=1}"else"===E.word[E.len]&&A[e]===E.word[E.len]&&(e+=1),E.len>-1&&0===E.count[E.len]&&(A.splice(e,0,"x{"),P.splice(e,0,"start"),t===!0?(I.splice(e,0,2),I[r]=2,I.push(0)):(I[r]=0,I.splice(e,0,0),I.push(i)),A.push("x}"),P.push("end"),E.priorreturn[E.len]===!0&&(A.push("x;"),P.push("separator"),I.push(0)),O(),n===!0&&j())}},L=function(e){var t=e;do t-=1;while("\\"===i[t]&&t>0);return(e-t)%2===1},M=function(){var e=P.length;do e-=1;while(e>0&&("comment"===P[e-1]||"comment-inline"===P[e-1]));A.splice(e,0,","),P.splice(e,0,"separator")},U=function(){var e=[],t=!0,n="+=",r="",i="",o="";if(u=A.length,r=A[u-1],i=A[u-2],o=A[u-3],!(g!==!0||"++"!==r&&"--"!==r&&"++"!==i&&"--"!==i||"["!==o&&";"!==o&&"x;"!==o&&"}"!==o&&"{"!==o&&"("!==o&&")"!==o&&","!==o&&"return"!==o)){if("++"===r||"--"===r){if("["===o||"("===o||","===o||"return"===o)return;"--"===i&&(n="-="),t=!1}else"--"===i&&(n="-=");t===!0?(e.push(r),e.push(P[u-1]),e.push(I[u-1]),A.pop(),P.pop(),I.pop(),A.pop(),P.pop(),I.pop(),A.push(e[0]),P.push(e[1]),I.push(e[2]),A.push(n),P.push("operator"),A.push("1"),P.push("literal")):(A.pop(),P.pop(),I.pop(),A.push(n),P.push("operator"),I.push(0),A.push("1"),P.push("literal"),I.push(0))}},V=function(){var t=A.length-1,n=t,s=0,u=A[t],c=P[t],l=!1,p=!1,f=!1,d=!1;if("comment"===c||"comment-inline"===c){do t-=1;while(t>0&&("comment"===P[t]||"comment-inline"===P[t]));if(t<1)return;u=A[t],c=P[t]}if(void 0!==u&&"start"!==c&&"separator"!==c&&"operator"!==c&&"x}"!==u&&";"!==u&&"x;"!==u&&"var"!==u&&"else"!==u&&0!==u.indexOf("#!/")&&!(w.len>-1&&w.status[w.len]===!0&&0===w.count[w.len])){if("literal"===c&&"start"!==P[t-1]||"literal"!==c)for(n=n;n>-1;n-=1){if("end"===P[n]?s+=1:"start"!==P[n]&&"method"!==P[n]||(s-=1),s<0){if("do"===A[n-1]||"word"===c||"literal"===c||d===!0&&l===!1)break;return}if(0===s){if(0===n&&("{"===A[0]&&"}"===u||"["===A[0]&&"]"===u))return;if("("===A[n]&&("function"===A[n-1]||"function"===A[n-2]||")"===u&&A[n-1]===E.word[E.len]))return;if("do"===A[n]||A[n]===E.word[E.len])break;if("}"!==i[e]||"start"!==P[n]&&"method"!==P[n]||(n-=1),"else"===A[n-1]&&n!==t||"else"===A[n]||"try"===A[n]||"finally"===A[n]||l===!0&&","===A[n]||"catch"===A[n-1]){if("return"===A[n])break;return}if(")"===u){if("if"===A[n-1]||"for"===A[n-1]||"with"===A[n-1])return;break}if("if"===A[n-1]||"for"===A[n-1]||"else"===A[n-1]||"with"===A[n-1])break;if(":"===A[n]?l=!0:"operator"===P[n]&&(d=!0),"="===A[n]||"return"===A[n]||","===A[n]||";"===A[n]||"x;"===A[n]||"?"===A[n]&&l===!0)break;if(")"===A[n-1]&&("{"===A[n]||"x}"===A[n])||")"===A[n]&&("{"===A[n+1]||"x{"===A[n+1])){for(s=0,")"===A[n]&&(r+=1),l=!1,n-=1;n>-1;n-=1){if("end"===P[n]?s+=1:"start"!==P[n]&&"method"!==P[n]||(s-=1),s<0)return;if(0===s&&"("===A[n]&&(f=!0,"if"===A[n-1]||"for"===A[n-1]||"with"===A[n-1]))return;if(0===s&&f===!0){if(l===!0&&"?"===A[n]){p=!0;break}if(n-=1,"function"===A[n]&&("operator"===P[n-1]&&":"!==A[n-1]||"return"===A[n-1])||"function"===A[n-1]&&("operator"===P[n-2]||"return"===A[n-2])){p=!0;break}if("function"===A[n]&&":"===A[n-1])l=!0;else if(l===!1)return}}if(p===!1)return;break}}}"if"!==A[n]&&"for"!==A[n]&&"else"!==A[n]&&"with"!==A[n]&&(o=";",a="separator",A.splice(t+1,0,"x;"),P.splice(t+1,0,"separator"),I.splice(t+1,0,0),j())}},G=function(){var e=P.length;do e-=1;while(e>0&&("comment"===P[e]||"comment-inline"===P[e]));"x;"===A[e]&&(A.splice(e,1),P.splice(e,1),I.splice(e,1))},W=function(){var e=A.length;do e-=1;while(e>-1&&"x}"===A[e]);e+=1,A.splice(e,0,o),P.splice(e,0,a)},Q=function(e){var t="double"===m,n=t===!0?'"':"'";return e=e.slice(1,e.length-1),e=t===!0?e.replace(/"/g,"'"):e.replace(/'/g,'"'),n+e+n},H=function(e){var t=A[A.length-1],n=T,r=e.indexOf(" ")>0;if(0!==A.length)if(e=e.slice(2),r===!0){if(0===t.indexOf("//")&&t.length0){if(n=n-t.length-1," "!==e.charAt(n))do n-=1;while(n>0&&" "!==e.charAt(n));n>0&&(A[A.length-1]=t+" "+e.slice(0,n),e=e.slice(n+1))}n=T-2;do{if(" "!==e.charAt(n))do n-=1;while(n>0&&" "!==e.charAt(n));A.push("//"+e.slice(0,n)),P.push("comment"),I.push(0),e=e.slice(n+1),n=T-2}while(e.length>n);""!==e&&(A.push("//"+e.slice(0,n)),P.push("comment"),I.push(0))}else{0===t.indexOf("//")&&t.lengthn);""!==e&&(A.push("//"+e.slice(0,n)),P.push("comment"),I.push(0))}},z=function(e){var t=0,n=0,r=e.charAt(0);if(e.length>T+2){for(e=e.slice(1,e.length-1),n=parseInt(e.length/T,10)*T,t=0;t0&&(","===A[n]||"comment"===P[n]||"comment-inline"===P[n]));for(e=n;e>-1;e-=1){if("end"===P[e]&&(t+=1),"start"!==P[e]&&"method"!==P[e]||(t-=1),0===t&&")"===A[e-1]&&"{"===A[e]){for(e-=1;e>-1;e-=1)if("end"===P[e]&&(t+=1),"start"!==P[e]&&"method"!==P[e]||(t-=1),0===t&&"word"===P[e-1])return"function"===A[e-1]||"function"===A[e-2]?"method":"start";return"start"}if(t<0){if("start"===P[e]&&"start"===P[e+1]&&"function"!==A[e+2]){do e+=1;while(e-1&&("end"===P[e]&&(t+=1),"start"!==P[e]&&"method"!==P[e]||(t-=1),0!==t);e-=1);return"function"!==A[e+1]&&(e-=1,"function"===A[e+1])?"start":("word"===P[e]&&"function"!==A[e]&&(e-=1),"function"===A[e]||"function"===A[e-1]||"function"===A[e+1]?"method":"start")}}return"start"},X=function(){var e=A.length-1,t=0,n=e,r=0;for(e=e;e>-1&&("end"===P[e]&&(t+=1),"start"!==P[e]&&"method"!==P[e]||(t-=1),t!==-1&&(0!==t||";"!==A[e]));e-=1);if("method"===P[e]&&"Array"===A[e-1]&&"new"===A[e-2]){if(n-e===1&&/^([0-9])$/.test(A[n])===!0){r=A[n]-1,A.pop(),A.pop(),A.pop(),P.pop(),P.pop(),P.pop(),I.pop(),I.pop(),I.pop(),A[A.length-1]="[",P[P.length-1]="start",I[I.length-1]=0;do A.push(","),P.push("separator"),I.push(0),r-=1;while(r>0)}else A[e]="[",P[e]="start",A.splice(e-2,2),P.splice(e-2,2),I.splice(e-2,2);A.push("]")}else A.push(")");P.push("end"),I.push(0)},K=function(t,n){var r=e,o=P.length;if(!(R.length>0)){R.push(t);do r-=1;while("\n"!==i[r]&&"\r"!==i[r]&&r>0);if(R.push(i.slice(r,n).join("")),o>1)do o-=1;while(o>0&&"comment"!==P[o]);R=o>-1&&o/g,">")),f},Y=function(){var t=["=","<",">","+","*","?","|","^",":","&","%","~"],n=0,o=0,a=r,s=[i[e]],u=t.length,c="";if(e-1&&0===w.count[w.len]&&(w.status[w.len]=!0),":";if("-"===i[e]&&("-"===i[e+1]?c="--":"="===i[e+1]&&(c="-="),""===c))return"-"}if(""===c){for(n=e+1;n/g,">")),"?"===c&&w.len>-1&&0===w.count[w.len]&&w.status[w.len]===!1&&(w.count[w.len]+=1),c},Z=function(){var t=0,n=r,o=0,a=0,s=["/"],u="",c=!1;for(t=e+1;t0&&"\\"===i[o];o-=1)a+=1;if(a%2===0)break}return"g"===i[t+1]||"i"===i[t+1]||"m"===i[t+1]||"y"===i[t+1]?(s.push(i[t+1]),i[t+2]===i[t+1]||"g"!==i[t+2]&&"i"!==i[t+2]&&"m"!==i[t+2]&&"y"!==i[t+2]?e=t+1:(s.push(i[t+2]),i[t+3]===i[t+1]||i[t+3]===i[t+2]||"g"!==i[t+3]&&"i"!==i[t+3]&&"m"!==i[t+3]&&"y"!==i[t+3]?e=t+2:(s.push(i[t+3]),i[t+4]===i[t+1]||i[t+4]===i[t+2]||i[t+4]===i[t+3]||"g"!==i[t+4]&&"i"!==i[t+4]&&"m"!==i[t+4]&&"y"!==i[t+4]?e=t+3:(s.push(i[t+4]),e=t+4)))):e=t,u=s.join(""),"none"!==b&&(u=u.replace(/&/g,"&").replace(//g,">")),u},ee=function(){var t=[i[e]];for(e+=1;e-1&&0!==A[A.length-1].indexOf("#!/")&&(u.indexOf("\n")===u.lastIndexOf("\n")&&0!==A[A.length-1].indexOf("//")||(s=2),I[I.length-1]=s),p===!0&&";"!==o&&c1&&"function"===s&&"method"===P[P.length-1]&&("{"===A[A.length-2]||"x{"===A[A.length-2])&&(P[P.length-1]="start"),P.length>2&&"function"===s&&"method"===a&&("}"===A[A.length-2]||"x}"===A[A.length-2]))if("}"===A[A.length-2]){for(t=A.length-3;t>-1&&("end"===P[t]?n+=1:"start"!==P[t]&&"end"!==P[t]||(n-=1),0!==n);t-=1);if("{"===A[t]&&")"===A[t-1]){for(n=1,t-=2;t>-1&&("end"===P[t]?n+=1:"start"!==P[t]&&"end"!==P[t]||(n-=1),0!==n);t-=1);"function"!==A[t-1]&&"function"!==A[t-2]&&(P[P.length-1]="start")}}else P[P.length-1]="start";if(g!==!0||"Object"!==s&&"Array"!==s||"("!==i[e+1]||")"!==i[e+2]||"="!==A[u-2]||"new"!==A[u-1]){if(n=P.length-1,t=n,"none"!==S&&"var"===s){if("comment"===P[n]||"comment-inline"===P[n])do n-=1;while(n>0&&("comment"===P[n]||"comment-inline"===P[n]));if("list"===S&&C.len>-1&&C.index[C.len]===n)return B.word.token+=1,B.word.chars+=s.length,o=",",a="separator",A[n]=o,P[n]=a,C.count[C.len]=0,void(C.index[C.len]=n);C.len+=1,C.count.push(0),C.index.push(n),n=t}else C.len>-1&&"var"!==s&&A.length===C.index[C.len]+1&&";"===A[C.index[C.len]]&&"var"!==o&&"list"===S&&N();if("else"===s&&("comment"===P[n]||"comment-inline"===P[n])){do t-=1;while(t>-1&&("comment"===P[t]||"comment-inline"===P[t]));"x;"!==A[t]||"}"!==A[t-1]&&"x}"!==A[t-1]||(A.splice(t,1),P.splice(t,1),I.splice(t,1),n-=1,t-=1);do r=[A[n],P[n],I[n]],A.pop(),P.pop(),I.pop(),A.splice(n-3,0,r[0]),P.splice(n-3,0,r[1]),I.splice(n-3,0,r[2]),t+=1;while(t-1?E.count[E.len]+=1:"catch"===s&&E.len>-1&&(E.count[E.len]-=1),"do"===s&&(v.count.push(0),v.state.push(s),v.len+=1),"while"===s&&"do"===v.state[v.len]&&0===v.count[v.len]&&("while"===s&&(c=!0),"}"===o&&G(),v.count.pop(),v.state.pop(),v.len-=1,v.index=A.length-1,j()),"if"===s&&E.len>-1&&"else"===A[E.index[E.len]]&&O(),("if"===s||"for"===s||"with"===s||"while"===s&&c===!1||"else"===s||"do"===s)&&(E.len>-1&&E.index[E.len]===A.length?E.consec.push(!0):E.consec.push(!1),"return"===o?E.priorreturn.push(!0):E.priorreturn.push(!1),E.word.push(s),E.count.push(0),"do"===s?E.index.push(A.length+1):E.index.push(A.length),E.semi.push(!1),E.len+=1),A.push(s),P.push("word"),o=s,a="word",B.word.token+=1,B.word.chars+=s.length,u=A.length}else"Object"===s?(A[u-1]="{",A.push("}")):(A[u-1]="[",A.push("]")),P[u-1]="start",P.push("end"),i[e+1]="",i[e+2]="",B.container+=2,e+=2;I.push(0)},ie=function(){var t=[],s=!1,u=!1,c=0,l=0,p=0,f=0,d="=<>+*?|^:&.,;%(){}[]|~";if(d.indexOf(i[e+1])>-1||/\s/.test(i[e+1])===!0||/\d/.test(i[e+1])===!0&&("operator"===a||"literal"===a||"word"===a&&"return"!==o))return a="operator",Y();for(f=A.length-1;f>-1;f-=1){if("return"===A[f]||"operator"===P[f]||"method"===P[f]){a="markup",n=!0;break}if("("!==A[f])return a="operator",Y()}for(e=e;e"===i[e]&&s===!1){if(c-=1,u===!0?p-=1:"/"!==i[e-1]&&(p+=1),0===c&&0===l&&p<1)return t.join("");u=!1}return t.join("")};for(e=0;e-1&&re(),ne();else if("<"===i[e]&&"?"===i[e+1]&&"p"===i[e+2]&&"h"===i[e+3]&&"p"===i[e+4])l>-1&&re(),o=J(""),a="literal",B.server.token+=1,B.server.chars+=o.length,A.push(o),P.push(a),I.push(0);else if("<"===i[e]&&"%"===i[e+1])l>-1&&re(),o=J("<%","%>"),a="literal",B.server.token+=1,B.server.chars+=o.length,A.push(o),P.push(a),I.push(0);else if("<"===i[e]&&"!"===i[e+1]&&"-"===i[e+2]&&"-"===i[e+3]&&"#"===i[e+4])l>-1&&re(),o=J(""),a="literal",B.server.token+=1,B.server.chars+=o.length,A.push(o),P.push(a),I.push(0);else if("<"===i[e]&&"!"===i[e+1]&&"-"===i[e+2]&&"-"===i[e+3])l>-1&&re(),o=J(""),a="comment",B.server.token+=1,B.server.chars+=o.length,A.push(o),P.push(a),I.push(0);else if("<"===i[e])l>-1&&re(),o=ie(),B.server.token+=1,B.server.chars+=o.length,A.push(o),P.push(a),I.push(0);else if("/"!==i[e]||e!==r-1&&"*"!==i[e+1])if((0===I.length||I[I.length-1]>0)&&"#"===i[e]&&"!"===i[e+1]&&"/"===i[e+2])o=J("#!/","\r"),o=o.slice(0,o.length-1),a="literal",B.server.token+=1,B.server.chars+=o.length,A.push(o),P.push(a),I.push(2);else if("/"!==i[e]||e!==r-1&&"/"!==i[e+1])if("/"===i[e]&&u>0&&("word"!==P[u-1]||"typeof"===o||"return"===o)&&"literal"!==a&&"end"!==a)l>-1&&re(),"return"===o||"word"!==a?(o=Z(),a="regex",B.regex.token+=1,B.regex.chars+=o.length):(B.operator.token+=1,B.operator.chars+=1,o="/",a="operator"),A.push(o),P.push(a),I.push(0);else if("`"===i[e]||"}"===i[e]&&h[h.length-1]===!0)l>-1&&re(),"`"===i[e]?h.push(!1):h[h.length-1]=!1,o=ee(),a="literal",B.string.token+=1,"{"===o.charAt(o.length-1)?(B.string.quote+=3,B.string.chars+=o.length-3):(B.string.quote+=2,B.string.chars=o.length-2),A.push(o),P.push(a),I.push(0);else if('"'===i[e]||"'"===i[e])l>-1&&re(),o=J(i[e],i[e]),a="literal",('"'===o.charAt(0)&&"single"===m||"'"===o.charAt(0)&&"double"===m)&&(o=Q(o)),B.string.token+=1,o.length>1&&(B.string.chars+=o.length-2),B.string.quote+=2,"+"===A[u]&&T<0&&('"'===A[u-1].charAt(0)||"'"===A[u-1].charAt(0))?q(o,!1):T>0&&("operator"!==P[u]||"="===A[u]||":"===A[u]||"+"===A[u]&&"literal"===P[u-1])?"literal"===P[u-2]&&"+"===A[u-1]&&('"'===A[u-2].charAt(0)||"'"===A[u-2].charAt(0))&&A[u-2].length-1&&re(),"end"===a&&"-"===i[e]?(o="-",a="operator",B.operator.token+=1,B.operator.chars+=1):(o=te(),a="literal",B.number.token+=1,B.number.chars+=o.length),A.push(o),P.push(a),I.push(0);else if(","===i[e])l>-1&&re(),B.comma+=1,"comment"===a||"comment-inline"===a?M():C.len>-1&&0===C.count[C.len]&&"each"===S?(G(),o="var",a="word",A.push(";"),P.push("separator"),I.push(0),A.push(o),P.push(a),I.push(0),C.index[C.len]=A.length-1):(o=",",a="separator",G(),A.push(o),P.push(a),I.push(0));else if("."===i[e])l>-1&&re(),B.operator.token+=1,"."===i[e+1]&&"."===i[e+2]?(o="...",a="operator",B.operator.chars+=3,e+=2):(G(),o=".",a="separator",B.operator.chars+=1),A.push(o),P.push(a),I.push(0);else if(";"===i[e])l>-1&&re(),C.len>-1&&0===C.count[C.len]&&("each"===S?N():C.index[C.len]=A.length),B.semicolon+=1,U(),o=";",a="separator",v.index===A.length-1&&G(),"x}"===A[A.length-1]?W():(A.push(o),P.push(a)),I.push(0),j();else if("("===i[e])l>-1&&re(),E.len>-1&&(E.count[E.len]+=1),C.len>-1&&(C.count[C.len]+=1),v.len>-1&&(v.count[v.len]+=1),B.container+=1,a=")"===o||"x;"===A[A.length-1]?"method":"comment"===a||"comment-inline"===a||"start"===a?"start":"function"===A[u-1]&&x===!1||"function"===A[A.length-2]?"method":0===u||"return"===o||"function"===o||"for"===o||"if"===o||"with"===o||"while"===o||"switch"===o||"catch"===o||"separator"===a||"operator"===a||e>0&&/\s/.test(i[e-1])===!0?"start":"end"===a?$():"method",G(),o="(",A.push(o),P.push(a),I.push(0);else if("["===i[e])l>-1&&re(),E.len>-1&&(E.count[E.len]+=1),C.len>-1&&(C.count[C.len]+=1),v.len>-1&&(v.count[v.len]+=1),B.container+=1,o="[",a="start",A.push(o),P.push(a),I.push(0);else if("{"===i[e])l>-1&&re(),C.len>-1&&(C.count[C.len]+=1),v.len>-1&&(v.count[v.len]+=1),")"!==o&&"else"!==o&&"do"!==o?(w.count.push(0),w.status.push(!1),w.len+=1):w.len>-1&&(w.count[w.len]+=1),("else"===o||"do"===o||")"===o&&E.len>-1&&0===E.count[E.len]&&"catch"!==A[A.length-4]&&("if"===E.word[E.len]||"for"===E.word[E.len]||"while"===E.word[E.len]||"with"===E.word[E.len]))&&O(),E.len>-1&&(E.count[E.len]+=1),")"===o&&G(),B.container+=1,"comment"!==a&&"comment-inline"!==a||")"!==A[u-2]?(o="{",a="start"):(o=A[u-1],A[u-1]="{",a=P[u-1],P[u-1]="start"),A.push(o),P.push(a),t===!0?I.push(2):I.push(0);else if(")"===i[e])l>-1&&re(),E.len>-1&&(E.count[E.len]-=1),C.len>-1&&(C.count[C.len]-=1,C.count[C.len]<0&&N()),G(),B.container+=1,U(),o=")",a="end",g===!0?X():(A.push(o),P.push(a),I.push(0)),v.len>-1&&(v.count[v.len]-=1,0===v.count[v.len]&&"while"===v.state[v.len]&&(V(),v.count.pop(),v.state.pop(),v.len-=1,v.index=A.length-1));else if("]"===i[e])l>-1&&re(),E.len>-1&&(E.count[E.len]-=1),C.len>-1&&(C.count[C.len]-=1,C.count[C.len]<0&&N()),v.len>-1&&(v.count[v.len]-=1),G(),B.container+=1,U(),o="]",a="end",A.push(o),P.push(a),I.push(0);else if("}"===i[e]){if(l>-1&&re(),","===o&&(A.pop(),P.pop(),I.pop()),v.len>-1&&(v.count[v.len]-=1),V(),C.len>-1&&(("list"===S&&0===C.count[C.len]||"x;"===A[A.length-1]&&"each"===S)&&N(),C.count[C.len]-=1,C.count[C.len]<0&&N()),w.len>-1&&(0===w.count[w.len]?F():w.count[w.len]-=1),"comment"===a||"comment-inline"===a){do u-=1;while(u>0&&("comment"===P[u]||"comment-inline"===a));o=A[u],u=A.length}t===!0&&(I[I.length-1]=2),","===o?(B.container+=1,o="}",a="end",A.push(o),P.push(a),I.push(0)):(";"===o&&"minify"===p&&f===!0&&(A[A.length-1]="x;"),U(),B.container+=1,o="}",a="end",A.push(o),P.push(a),I.push(0)),E.len>-1&&E.count[E.len]>0&&(E.count[E.len]-=1,0===E.count[E.len]&&j())}else"="===i[e]||"&"===i[e]||"<"===i[e]||">"===i[e]||"+"===i[e]||"-"===i[e]||"*"===i[e]||"/"===i[e]||"!"===i[e]||"?"===i[e]||"|"===i[e]||"^"===i[e]||":"===i[e]||"%"===i[e]||"~"===i[e]?(l>-1&&re(),o=Y(),a="operator",B.operator.token+=1,B.operator.chars+=o.length,"!"!==o&&"++"!==o&&"--"!==o&&G(),A.push(o),P.push(a),I.push(0)):l<0&&""!==i[e]&&(l=e);else l>-1&&re(),B.operator.token+=1,B.operator.chars+=1,o="-",a="operator",A.push(o),P.push(a),I.push(0);else l>-1&&re(),V(),o=J("//","\r"),B.commentLine.token+=1,B.commentLine.chars+=o.length,2===o.indexOf("# sourceMappingURL=")&&(D[0]=A.length,D[1]=o),"nocomment"!==s&&(a=0===I[I.length-1]&&"comment"!==a&&"comment-inline"!==a&&"mrdoobs"!==_?"comment-inline":"comment","comment"===a&&T>0&&o.length>T?H(o):(A.push(o),P.push(a),I.push(0)));else l>-1&&re(),o=J("/*","*/"),B.commentBlock.token+=1,B.commentBlock.chars+=o.length,2===o.indexOf("# sourceMappingURL=")&&(D[0]=A.length,D[1]=o),"nocomment"!==s&&(a="comment",A.push(o),P.push(a),I.push(0));E.len>-1&&(0!==E.count[E.len]||")"!==A[A.length-1]||A[E.index[E.len]]!==E.word[E.len]||"if"!==E.word[E.len]&&"for"!==E.word[E.len]&&"while"!==E.word[E.len]&&"with"!==E.word[E.len]||(E.index[E.len]=A.length)),C.len>-1&&A.length===C.index[C.len]+2&&";"===A[C.index[C.len]]&&"var"!==o&&"list"===S&&N()}("}"!==A[A.length-1]&&"{"===A[0]||"{"!==A[0])&&("]"!==A[A.length-1]&&"["===A[0]||"["!==A[0])&&V(),E.len>-1&&j(),D[0]===A.length-1&&(A.push("\n"+D[1]),P.push("literal"),I.push(0))}(),g===!0&&!function(){var e=0,t=A.length;for(e=0;e-1;t-=1){if("end"===P[t])r+=1;else if(("start"===P[t]||"method"===P[t])&&(r-=1,r<0))return;if(0===r&&"?"===A[t]&&(n-=1,f.pop(),0===f.length))return}},B=function(){var t=0,r=1,i="}"===A[e-1];for(t=e-2;t>-1;t-=1){if(i===!0?("}"===A[t]&&(r+=1),"{"===A[t]&&(r-=1)):(")"===A[t]&&(r+=1),"("===A[t]&&(r-=1)),r<0)return k[e-1]=n,!1;if(0===r){if(")"===A[t-1]&&i===!1){for(r=1,t-=2;t>-1;t-=1)if(")"===A[t]&&(r+=1),"("===A[t]&&(r-=1),0===r)return"function"===A[t-1]||"function"===A[t-2];return!1}return i===!1&&"function"===A[t+1]}}return!1},U=function(){if(f.length>0&&"."!==v&&R(),"comment-inline"===P[e-1]&&e>1)return function(){var n=0,r=t,i=A[e-1];for(k[e-2]="x",k[e-1]="x",n=e;n0)return A[n]=i,P[n]="comment-inline",void(e-=1);A[n-1]=i,P[n-1]="comment-inline",e-=1}();if("."===v)return k[e-1]="x",k.push("x");if(","===v){if(k[e-1]="x",s[s.length-1]===!1&&(s[s.length-1]=!0,function(){var t=0,n=0,i=!1,o=!1,s=!1;if(C[C.length-1]===!0)return void(a[a.length-1]=!0);for(t=e-1;t>-1;t-=1){if("end"===P[t]&&(n+=1),"start"!==P[t]&&"method"!==P[t]||(n-=1,"["===A[t]&&n===-1&&(r[r.length-1]=!1)),0===n){if(s===!1&&"return"===A[t])return void(a[a.length-1]=!0);i!==!1||"="!==A[t]&&";"!==A[t]&&"x;"!==A[t]||(i=!0),o!==!1||"&&"!==A[t]&&"||"!==A[t]||(o=!0),s!==!1||";"!==A[t]&&"x;"!==A[t]||(s=!0)}if(n===-1){if("method"===P[t])a[a.length-1]=!0;else if("{"===A[t]||"x{"===A[t]){if(")"!==A[t-1])r[r.length-1]=!0;else if(o===!1&&s===!1)for(t-=1;t>-1;t-=1)if("end"===P[t]&&(n+=1),"start"!==P[t]&&"method"!==P[t]||(n-=1),n===-1&&"("===A[t]){if("function"===A[t-1]||"function"===A[t-2]||"if"===A[t-1]||"for"===A[t-1]||"with"===A[t-1])return;break}}else if(o===!1&&s===!1&&("("===A[t]&&"for"===A[t-1]||"["===A[t]))return void(a[a.length-1]=!0);return void(o!==!1||s!==!1||d[d.length-1]!==!1||i!==!1&&"("!==A[t]||(a[a.length-1]=!0))}}}()),(r[r.length-1]===!0||"+"===A[e-2]&&"literal"===y&&k[e-2]>0&&('"'===_.charAt(0)||"'"===_.charAt(0)))&&(k.push(n),r[r.length-1]===!0))return;return a[a.length-1]===!0?function(){var t=0,r=0;for(t=e-1;t>-1;t-=1)if("end"===P[t]&&(r+=1),"start"!==P[t]&&"method"!==P[t]||(r-=1),r===-1){if("["===A[t]&&"]"!==A[t+1]&&"]"!==A[t+2]&&(k[t]=n,"+"===A[e-2]&&"literal"===y&&k[e-2]>0&&('"'===_.charAt(0)||"'"===_.charAt(0)))){for(r=e-2;r>t;r-=2){if("+"!==A[r])return;'"'!==A[r-1].charAt(0)&&"'"!==A[r-1].charAt(0)&&(k[r]="s")}return}return k.push("s")}return k.push("s")}():d[d.length-1]===!0&&0===m?("]"!==_&&!function(){var t=0,r=!1;for(t=e-1;t>-1;t-=1)if("]"===A[t]&&(r=!0),"method"===P[t]||"start"===P[t])return void("["===A[t]&&"]"!==A[t+1]&&r===!1&&(k[t]=n))}(),"literal"!==y||"+"!==A[e-2]||'"'!==_.charAt(0)&&"'"!==_.charAt(0)?k.push(n):void(k[e]=n)):k.push(n)}return";"===v||"x;"===v?("x;"===v&&(M+=1),k[e-1]="x",0===m?(d[d.length-1]===!0&&(d[d.length-1]=!1,(0===C.length||C[C.length-1]===!1)&&S.length>0&&S[S.length-1].length>1&&N.push(S[S.length-1]),S.pop(),function(){var t=0,r=0;for(t=e-1;t>-1;t-=1){if("start"!==P[t]&&"method"!==P[t]||(r+=1),"end"===P[t]&&(r-=1),r>0)return;if(0===r){if("var"===A[t]||"let"===A[t]||"const"===A[t])return;if(","===A[t])return void(n-=1)}}}()),k.push(n)):m>0?(d[d.length-1]===!0&&(d[d.length-1]=!1),k.push("s")):k.push("s")):void 0},V=function(){"*"===_&&"function"===A[e-2]?(k[e-2]="x",k[e-1]="s",k.push("x")):(k[e-1]="x",i===!0?k.push("s"):k.push("x")),a.push(!1),s.push(!1),C.push(!0),r.push(!1),D.push(!1),m>0&&(m+=1)},G=function(){return a.push(!1),s.push(!1),C.push(!1),D.push(!1),"("!==v&&(n+=1),"for"===_&&(m=1),"{"===v||"x{"===v?(h.push(!1),S.push([]),"{"===v&&d.push(!1),"="===_||";"===_||"x;"===_||","===_||":"===_||"?"===_||"return"===_||"in"===_||"start"===y||"method"===y?r.push(!0):r.push(!1),o===!0&&"operator"!==y&&"return"!==_?k[e-1]=n-1:")"===_?k[e-1]="s":"{"!==_&&"x{"!==_&&"["!==_&&"}"!==_&&"x}"!==_||(k[e-1]=n-1),k.push(n)):(r.push(!1),"("===v?("-"===_&&"("===A[e-2]&&(k[e-2]="x"),"function"!==_&&"switch"!==_&&"for"!==_&&"while"!==_||(C[C.length-1]=!0),"none"===b&&"minify"!==p||"function"!==_&&"function"!==A[e-2]||(O[O.length-1]=0),m>0&&"for"!==_&&(m+=1),"}"!==_&&")"!==_||("comment"!==P[e-1]&&"comment-inline"!==P[e-1]&&B()===!0?k[e-1]="x":k[e-1]=n),"}"===_||"x}"===_?k.push("x"):(("-"===_&&(e<2||")"!==A[e-2]&&"]"!==A[e-2]&&"word"!==P[e-2]&&"literal"!==P[e-2])||x===!1&&"function"===_)&&(k[e-1]="x"),i===!0?k.push("s"):k.push("x"))):"["===v?("["===_&&(a[a.length-2]=!0),"return"===_?k[e-1]="s":"]"===_||"word"===y||")"===_?k[e-1]="x":"["!==_&&"{"!==_&&"x{"!==_||(k[e-1]=n-1),function(){var r=0;for(r=e+1;r0&&"?"!==A[e+1]&&":"!==A[e+1]&&R(),1===m&&")"===v&&d[d.length-1]===!0&&(d[d.length-1]=!1),")"!==v&&("markup"!==y||"markup"===y&&"return"!==A[e-2])?n-=1:m>0&&")"===v&&(m-=1), "}"!==v&&"x}"!==v||("comment"!==P[e-1]&&"comment-inline"!==P[e-1]&&"{"!==_&&"x{"!==_&&"end"!==y&&"literal"!==y&&"separator"!==y&&"++"!==_&&"--"!==_&&d[d.length-1]===!1&&(e<2||";"!==A[e-2]||"x;"!==A[e-2]||"break"===_||"return"===_)&&!function(){var i=0,o=1,s=!1,u=a.length;for(i=e-1;i>-1;i-=1)if("end"===P[i]&&(o+=1),"start"!==P[i]&&"method"!==P[i]||(o-=1),1===o){if("="!==A[i]&&";"!==A[i]&&"x;"!==A[i]||(s=!0),i>0&&"return"===A[i]&&(")"===A[i-1]||"{"===A[i-1]||"x{"===A[i-1]||"}"===A[i-1]||"x}"===A[i-1]||";"===A[i-1]||"x;"===A[i-1]))return n-=1,void(k[e-1]=n);if(":"===A[i]&&0===f.length||","===A[i]&&s===!1&&d[d.length-1]===!1)return;if(0===i||"{"===A[i-1]||"x{"===A[i-1]||"for"===A[i]||"if"===A[i]||"do"===A[i]||"function"===A[i]||"while"===A[i]||"var"===A[i]||"let"===A[i]||"const"===A[i]||"with"===A[i])return a[u-1]===!1&&u>1&&(e===t-1||")"!==A[e+1])&&r[r.length-1]===!1&&(n-=1),void(d[d.length-1]===!0&&(n-=1))}}(),"none"===b&&"minify"!==p||!function(){var t=0,n=1,r=[],i=!1;for(t=e-1;t>-1;t-=1){if("end"===P[t]?n+=1:"start"!==P[t]&&"method"!==P[t]||(n-=1),n<0)return;if(1===n&&("v"===O[t]&&A[t]!==r[r.length-1]?r.push(A[t]):")"===A[t]?i=!0:i===!0&&"word"===P[t]&&A[t]!==r[r.length-1]&&r.push(A[t]),t===E&&(O[t]=e-1,"let"!==A[t]&&"const"!==A[t]||(O[O.length-2]=[r,!0]),r=[],E=-1)),t>0&&"function"===A[t-1]&&"word"===P[t]&&A[t]!==r[r.length-1]&&r.push(A[t]),0===n){if("separator"===P[t]||"operator"===P[t]||"literal"===P[t]||"if"===A[t]||"else"===A[t]||"for"===A[t]||"switch"===A[t]||"do"===A[t]||"return"===A[t]||"while"===A[t]||"catch"===A[t]||"try"===A[t]||"with"===A[t])return;if("function"===A[t])return"word"===P[t+1]?O[t+2]=e:O[t+1]=e,void(O[O.length-1]=[r,!1])}}}(),h.pop()),"comment"===P[e-1]&&"//"===A[e-1].substr(0,2)||"comment-inline"===P[e-1]?("x}"===A[e-2]&&(k[e-3]=n+1),k[e-1]=n,k.push("x")):"{"===_&&"}"===v||"["===_&&"]"===v?(k[e-1]="x","}"===v&&w===!0?k.push(n):k.push("x")):"]"===v?(a[a.length-1]===!0||"]"===_&&k[e-2]===n+1?k[e-1]=n:"s"===k[e-1]&&(k[e-1]="x"),a[a.length-1]===!1&&("}"!==_&&"x}"!==_||(k[e-1]=n),function(){var t=0,r=1;for(t=e-1;t>-1;t-=1){if("]"===A[t]&&(r+=1),"["===A[t]&&(r-=1,0===r)){if(t>0&&("{"===A[t+1]||"x{"===A[t+1]||"["===A[t+1]))return void(k[t]=n+1);if("["!==A[t+1]||l===!1)return void(k[t]="x");return}1===r&&"+"===A[t]&&k[t]>0&&(k[t]-=1)}}()),k.push("x")):")"===v&&"markup"!==y?(i===!0&&"end"!==y&&"start"!==y&&"method"!==y?k[e-1]="s":k[e-1]="x",k.push("s")):"}"!==v&&"x}"!==v||r[r.length-1]!==!1||"word"!==y||a[a.length-1]!==!1||h[h.length-1]!==!1?"}"===v||"x}"===v||a[a.length-1]===!0?("}"===v&&"x}"===_&&"else"===A[e+1]?(k[e-2]=n+2,k.push("x")):k.push(n),k[e-1]=n):k.push("x"):(n+=1,k[e-1]=n,k.push(n)),l=a[a.length-1],a.pop(),s.pop(),C.pop(),"}"===v&&((d[d.length-1]===!0||r[r.length-1]===!0&&"{"!==_)&&S.length>0&&D[D.length-1]===!1&&S[S.length-1].length>1&&N.push(S[S.length-1]),S.pop(),d.pop()),D.pop(),r.pop()},Q=function(){if("!"===v||"..."===v)return"("===_&&(k[e-1]="x"),"}"!==_&&"x}"!==_||(k[e-1]=n),k.push("x");if(";"===_||"x;"===_)return 0===m&&(k[e-1]=n),k.push("x");if("?"===v&&(f.push(e),n+=1,k[e-1]=n),":"===v)return r[r.length-1]===!0?f.length>0?!function(){var t=0,r=0,i=f[f.length-1];for(t=e-1;t>i;t-=1)if("end"===P[t]?r+=1:"start"!==P[t]&&"method"!==P[t]||(r-=1),r<0)return;0===r&&(k[e-1]=n)}():k[e-1]="x":f.length>0?k[e-1]=n:k[e-1]="s",function(){var t=0,i=0,o=S.length>0?S[S.length-1][S[S.length-1].length-1]+1:0,a=A[o],s=void 0!==a&&a.indexOf("=")<0;if(0!==o){if(r[r.length-1]===!0&&S.length>0&&(void 0===a||s===!0&&"operator"===P[o])){if(t=e-1,"comment"===P[t]||"comment-inline"===P[t])do t-=1;while(t>0&&("comment"===P[t]||"comment-inline"===P[t]));0===f.length&&S[S.length-1].push(t)}for(t=e-1;t>-1&&("start"!==P[t]&&"method"!==P[t]||(i+=1),"end"===P[t]&&(i-=1),0!==i||"="!==A[t]);t-=1){if(i>0){1===i&&"{"===A[t]&&0===f.length&&(r[r.length-1]=!0);break}if(0===i){if(0===f.length&&("case"===A[t]||"default"===A[t]))return"case"!==A[e+1]&&(n+=1),k.push(n);if(","===A[t]&&0===f.length){r[r.length-1]=!0;break}}}return k.push("s")}}();if("++"===v||"--"===v)return void("literal"===y||"word"===y?(k[e-1]="x",k.push("s")):e-1||"start"===P[e-2])?k.push(n+2):k.push(n+1);if(('"'===_.charAt(0)||"'"===_.charAt(0))&&void 0!==A[e+1]&&('"'===A[e+1].charAt(0)||"'"===A[e+1].charAt(0))&&("="===A[e-2]||"("===A[e-2]||"+"===A[e-2]&&k[e-2]>0))return void(_.length+3+A[e+1].length-1&&"=="!==v&&"==="!==v&&"!="!==v&&"!=="!==v&&">="!==v&&"<="!==v&&S.length>0&&C[C.length-1]===!1&&r[r.length-1]===!1&&(D[D.length-1]===!0&&!function(){var t=0,n="";for(t=e-1;t>-1;t-=1){if(n=A[t],";"===n||"x;"===n||","===n)return S[S.length-1].push(e-1);if(n.indexOf("=")>-1&&"=="!==n&&"==="!==n&&"!="!==n&&"!=="!==n&&">="!==n&&"<="!==n)return}}(),function(){var n=0,r=0,i=!1,o="";for(n=e+1;n1&&N.push(S[S.length-1]),S.pop());break}r+=1}if("end"===P[n]&&(r-=1),r<0){D[D.length-1]===!0&&(D[D.length-1]=!1,S[S.length-1].length>1&&N.push(S[S.length-1]),S.pop());break}if(0===r){if(o=A[n],i===!0){if("operator"===P[n]||";"===A[n]||"x;"===A[n]||"var"===A[n]||"let"===A[n]||"const"===A[n])return void 0!==o&&o.indexOf("=")>-1&&"=="!==o&&"==="!==o&&"!="!==o&&"!=="!==o&&">="!==o&&"<="!==o&&D[D.length-1]===!1&&(S.push([e-1]),D[D.length-1]=!0),void(";"!==o&&"x;"!==o&&"var"!==o&&"let"!==o&&"const"!==o||D[D.length-1]!==!0||(D[D.length-1]=!1,S.length>0&&(S[S.length-1].length>1&&N.push(S[S.length-1]),S.pop())));D[D.length-1]!==!0||"return"!==o&&"break"!==o&&"continue"!==o&&"throw"!==o||(D[D.length-1]=!1,S[S.length-1].length>1&&N.push(S[S.length-1]),S.pop())}";"!==o&&"x;"!==o&&","!==o||(i=!0)}}}()),"-"===v&&"return"===_||"="===_?k.push("x"):void k.push("s")},H=function(){var r=A[e+1],o=void 0!==r&&"=="!==r&&"==="!==r&&"!="!==r&&"!=="!==r&&">="===r&&"<="!==r&&r.indexOf("=")>-1;if(d[d.length-1]!==!0||","!==_&&"var"!==_&&"let"!==_&&"const"!==_?"none"===b&&"minify"!==p||"function"!==_||(O[O.length-1]="v"):(0!==m||C[C.length-1]!==!1&&0!==C.length||"operator"===P[e+1]&&o===!0&&S.length>0&&":"!==A[S[S.length-1][S[S.length-1].length-1]+1]&&S[S.length-1].push(e),"none"===b&&"minify"!==p||(O[O.length-1]="v")),"}"!==_&&"x}"!==_||(k[e-1]=n),"else"===v&&"}"===_&&"x}"===A[e-2]&&(k[e-3]-=1),1===d.length&&d[0]===!0&&("var"===_||"let"===_||"const"===_||","===_||"function"===_&&"method"===P[e+1])&&F.push(v),("let"===v||"const"===v)&&E<0&&(E=e),"new"===v&&!function(){var t=0,n="string"==typeof r?r:"",i=""===n?[]:["ActiveXObject","ArrayBuffer","AudioContext","Canvas","CustomAnimation","DOMParser","DataView","Date","Error","EvalError","FadeAnimation","FileReader","Flash","Float32Array","Float64Array","FormField","Frame","Generator","HotKey","Image","Iterator","Intl","Int16Array","Int32Array","Int8Array","InternalError","Loader","Map","MenuItem","MoveAnimation","Notification","ParallelArray","Point","Promise","Proxy","RangeError","Rectangle","ReferenceError","Reflect","RegExp","ResizeAnimation","RotateAnimation","Set","SQLite","ScrollBar","Set","Shadow","StopIteration","Symbol","SyntaxError","Text","TextArea","Timer","TypeError","URL","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError","WeakMap","WeakSet","Web","Window","XMLHttpRequest"],o=i.length;for(t=0;tnew")}(),"from"===v&&"}"===_&&(k[e-1]="s"),"this"===v&&"none"!==b&&(A[e]="this"),"function"===v&&x===!1&&e1)"operator"===P[e-2]||","===A[e-2]?k[e-1]="x":"start"!==P[e-2]&&"method"!==P[e-2]||(k[e-2]="x",k[e-1]="x");else if("while"!==v||"}"!==_&&"x}"!==_)if("in"===v||("else"===v&&u===!1||"catch"===v)&&("}"===_||"x}"===_))k[e-1]="s";else if("var"===v||"let"===v||"const"===v)0!==C.length&&C[C.length-1]!==!1||S.push([]),"end"===y&&(k[e-1]=n),0===d.length?d.push(!0):d[d.length-1]=!0,0===m&&!function(){var r=0,i=0;for(r=e+1;r-1;t-=1)if("}"!==A[t]&&"x}"!==A[t]||(r+=1),"{"!==A[t]&&"x{"!==A[t]||(r-=1),0===r)return"do"===A[t-1]?void(k[e-1]="s"):void(k[e-1]=n)}();return i===!1&&e0)for(o=n-1;o>e;o-=1)if("word"===P[o])for(a=0;a-1;a-=1)o[a]=65;o.push(65)}else if(123===o[o.length-1]){a=o.length-1,o[a]=65;do a-=1,o[a]+=1,91===o[a]&&(o[a]=97),123===o[a]&&(o[a]=65);while(65===o[a]&&a>1)}},u=function(){var e=o.length-1,t=[];for(e=e;e>-1;e-=1)t.push(String.fromCharCode(o[e]));return"a"+t.join("")};for(t=0;t-1;t-=1)if("end"===P[t]?n+=1:"start"!==P[t]&&"method"!==P[t]||(n-=1),n<0)return void("for"===A[t-1]&&i.push(";"))};if(f===!0){for(e=0;e-1;e-=1)"number"==typeof O[e]&&c(e)}for(e=0;e0&&(u.push("

Error: "),u.push(R[0].replace(/&/g,"&").replace(//g,">").replace(/\u0000|\u0001|\u0002|\u0003|\u0004|\u0005|\u0006|\u0007|\u0008|\u000b|\u000c|\u000e|\u000f|\u0010|\u0011|\u0012|\u0013|\u0014|\u0015|\u0016|\u0017|\u0018|\u0019|\u001a|\u001b|\u001c|\u001d|\u001e|\u001f|\u007f|\u0080|\u0081|\u0082|\u0083|\u0084|\u0085|\u0086|\u0087|\u0088|\u0089|\u008a|\u008b|\u008c|\u008d|\u008e|\u008f|\u0090|\u0091|\u0092|\u0093|\u0094|\u0095|\u0096|\u0097|\u0098|\u0099|\u009a|\u009b|\u009c|\u009d|\u009e|\u009f/g,"")),u.push(" "),R[1]=R[1].replace(/&/g,"&").replace(//g,">").replace(/\u0000|\u0001|\u0002|\u0003|\u0004|\u0005|\u0006|\u0007|\u0008|\u000b|\u000c|\u000e|\u000f|\u0010|\u0011|\u0012|\u0013|\u0014|\u0015|\u0016|\u0017|\u0018|\u0019|\u001a|\u001b|\u001c|\u001d|\u001e|\u001f|\u007f|\u0080|\u0081|\u0082|\u0083|\u0084|\u0085|\u0086|\u0087|\u0088|\u0089|\u008a|\u008b|\u008c|\u008d|\u008e|\u008f|\u0090|\u0091|\u0092|\u0093|\u0094|\u0095|\u0096|\u0097|\u0098|\u0099|\u009a|\u009b|\u009c|\u009d|\u009e|\u009f/g,"").replace(/^(\s+)/,""),R.indexOf("\n")>0?u.push(R[1].replace("\n","")):(u.push(R[1]),u.push("")),u.push("

"),r=u.join("")),i.join("")}():(U="none"!==b?function(){var e=0,t=A.length,n=[],i=2,o="",u=1,p=0,f=function(){var e=1,n=1;if("comment"!==P[0]||0===A[0].indexOf("//")&&I[0]>0||"comment"!==P[1])return 1;do 0===A[e].indexOf("/*")&&(n+=1),e+=1;while("comment"===P[e]&&e
    ","
  1. ",1,"
  2. "],y=function(){var t=g.length-3*f>0?g.length-3*f:1,n=e,r=g[t+1]||1,i=!0,o=n;if("comment"===P[e]&&m===-1)m=e;else if("comment"!==P[e]){n=O[e];do o-=1;while("function"!==A[o]&&o>-1);if(o-=1,"("===A[o]&&"start"===P[o])do o-=1;while(o>-1&&"start"===P[o]&&"("===A[o]);("="===A[o]||":"===A[o]||","===A[o]||"("===A[o+1]&&"start"===P[o+1])&&(i=!1)}"comment"===P[e]&&2===I[e]&&(t-=3,r-=1),g[t]="
  3. ",g[t+1]="- "+r,d.push([t,n,i])},x=function(){var r=function(){return m>-1||d[d.length-1][2]===!0?i-f-1:i-f}(),o=/(>;<\/em>)$/.test(A[e]),a=0,s=!1;if(o===!0)for(r-=1,a=n.length-1;a>0&&("let"!==n[a]&&"const"!==n[a]||(s=!0),!(n[a].indexOf(">0&&(n[a]=n[a].replace(/class\='l\d+'/,"class='l"+(u+1)+"'"),s===!0)));a-=1)n[a].indexOf(""+S)>-1&&(n[a]=n[a].replace(""+S,""+S));if(e>1&&A[e].indexOf("}")===A[e].length-6&&A[e-1].indexOf("{")===A[e-1].length-6)for(a=g.length-1;a>0;a-=1)if("string"==typeof g[a]&&"-"===g[a].charAt(0))return g[a-1]="
  4. ",g[a]=Number(g[a].substr(1)),void d.pop();d[d.length-1][1]===t-1&&0===A[e].indexOf("0&&(g.push("
  5. "),g.push(i),g.push("
  6. "),i+=1),r=0;r"),g.push(i),g.push(""),i+=1,n[r]=n[r]+"
  7. ";return n.join("").replace(/\r/g,"")},w=function(t){var n=O[t],r=O[n][0],i=O[n][1],o=0,a=0,s=r.length,c=1,l=!0,p=[],f=0,d=function(){var t=0,n=0;for(t=e;t>-1;t-=1){if("end"===P[t]&&(n-=1),"start"!==P[t]&&"method"!==P[t]||(n+=1),n>0)return;if(0===n){if("var"===A[t]||";"===A[t]||"x;"===A[t])return;"let"!==A[t]&&"const"!==A[t]||(A[o]=""+p[0]+"")}}};if("word"===P[e-1]&&"function"!==A[e-1]&&i===!1&&(p=A[e-1].split(" "),A[e-1]=""+p[0]+"",f=p.length,f>1))do A[o]=A[o]+" ",f-=1;while(f>1);if(s>0)for(o=n-1,i===!0&&(o-=1),o=o;o>e;o-=1){if("word"===P[o])for(p=A[o].split(" "),a=0;a"+p[0]+"",f=p.length,f>1)do A[o]=A[o]+" ",f-=1;while(f>1)}else if(("case"===A[o-1]||":"!==A[o+1]||":"===A[o+1]&&"x"!==k[o])&&(i===!0?"let"===A[o-1]||"const"===A[o-1]?A[o]=""+p[0]+"":","===A[o-1]?d():A[o]=""+p[0]+"":A[o]=""+p[0]+"",f=p.length,f>1))do A[o]=A[o]+" ",f-=1;while(f>1);break}l===!0&&("end"===P[o]?c+=1:"start"!==P[o]&&"method"!==P[o]||(c-=1),0===c&&"{"===A[o]&&(A[o]="{",l=!1))}else for(o=e+1,i===!0&&(o-=1),o=o;o{")},E=c,S=function(){var e=a,t=v,n=[];for(t=t;t>0;t-=1)n.push(e);return n.join("")}(),D=[""+S+"",""+S+""+S+"",""+S+""+S+""+S+"",""+S+""+S+""+S+""+S+"",""+S+""+S+""+S+""+S+""+S+"",""+S+""+S+""+S+""+S+""+S+""+S+"",""+S+""+S+""+S+""+S+""+S+""+S+""+S+"",""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+"",""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+"",""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+"",""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+"",""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+"",""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+"",""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+"",""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+"",""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+"",""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""+S+""],R=function(r,o){var a=0;for("x}"!==A[e]||"x}"===A[e]&&"}"!==A[e+1]?(g.push("
  8. "),g.push(i),g.push("
  9. "),i+=1,e
  10. "):(n.push("
  11. "),r>0?(a=u,u>0&&(u===r+1&&r>0&&o!==!0&&(a-=1),n.push(D[a-1]))):o===!0&&n.push(D[0]))):r>0&&(a=u,u>0&&(u===r+1&&r>0&&o!==!0&&(a-=1),n.push(D[a-1]))),a=a;a-1;t-=1)if("("!==A[t])return"="===A[t]?1:0;return 0}(),r=function(){var n=l({inchar:a,inlevel:t,insize:v,jsscope:!0,jsx:!0,mode:"beautify",source:A[e]}).replace(/return\s+"},i="",o="",s=0,u=0,c=O.length,p=0,f=[];if(n.indexOf("[pdjsxscope]")<0)return n.replace(/&/g,"&").replace(//g,">").split("\n");do{for(o="",f=[],i=n.substring(n.indexOf("[pdjsxscope]")+12,n.indexOf("[/pdjsxscope]")),s=0;s-1);return n.replace(/&/g,"&").replace(//g,">").replace(/\[pdjsxem\d+\]/g,r).replace(/\[\/pdjsxem\]/g,"").split("\n")}(),i=0,o=0,s=0,u="\\"+S.charAt(0),c={};for(i=S.length,o=1;o0){s=r[o-1].split(S).length-1;do s-=1,r[o]=S+r[o];while(s>0)}n.push(r[o]),R(t-1)}n.push(r[r.length-1])},V=function(e){var t=e.split("\n"),r=0,i=t.length;for(n.push(t[0]),r=1;r1&&"."===A[t-1]);")"!==A[t]&&"]"!==A[t]||(t+=1,r-=2,i=!0,s())},s=function(){var e=0;for(t-=1;t>-1;t-=1){if(r+=A[t].length,("start"===P[t]||"method"===P[t])&&(e+=1,1===e)){if(i===!0)return;break}if("end"===P[t]&&(e-=1),"operator"!==P[t]&&"separator"!==P[t]||("s"===k[t]&&(r+=1),"s"===k[t-1]&&(r+=1)),";"===A[t]||"x;"===A[t]||"}"===A[t]||"x}"===A[t])return}"word"!==P[t-1]&&"literal"!==P[t-1]||(t-=1,r+=A[t].length),"word"===P[t]&&"."===A[t-1]&&a(),"{"!==A[t]&&(")"!==A[t-1]&&"]"!==A[t-1]||(r-=1,s()))},"word"===P[t]&&"."===A[t-1]?a():")"===A[t]||"]"===A[t]?(s(),o===!1&&(r+=1)):r+=1,","===A[t-1]&&":"!==A[N[e][n]+1]&&"var"!==A[N[e][0]-1]&&"let"!==A[N[e][0]-1]&&"const"!==A[N[e][0]-1]&&(r+=v),r};for(e=N.length-1;e>-1;e-=1)if(void 0!==N[e]){for(t=N[e].length,i=0,c=[],n=0;ni&&(i=o),c.push(o);if(s="",i>v?a=i-v:i0)do s+=" ",a-=1;while(a>-1);for(n=0;n
  12. "):n.push("
    1. "),e=0;e-1;e-=1)"number"==typeof O[e]?(u-=1,w(e)):void 0!==O[e]&&"string"!=typeof O[e]&&"number"!=typeof O[e]&&e>0&&"x;"!==A[e]&&"x}"!==A[e]&&"x{"!==A[e]&&(A[e]=""+A[e]+"",u+=1,u>16&&(u=16));for(function(){var e=0,t=A.length,n=F,r=n.length,i=0,o=[],a=0;for(e=t-1;e>0;e-=1)if("word"===P[e]&&(":"!==A[e+1]||":"===A[e+1]&&"x"===k[e+1])&&A[e].indexOf("-1;i-=1)if(o[0]===n[i]&&"."!==A[e-1]){if("function"===A[e-1]&&"method"===P[e+1]){if(A[e]=""+o[0]+"",a=o.length,a>1)do A[e]=A[e]+" ",a-=1;while(a>1)}else if(A[e]=""+o[0]+"",a=o.length,a>1)do A[e]=A[e]+" ",a-=1;while(a>1);break}}(),u=0,e=0;e0||"comment"===P[e+1]||2===I[e])&&(y(),m=e),m>-1&&"comment"!==P[e]&&(x(),m=-1),"comment"===P[e]&&0===A[e].indexOf("/*"))n.push(_(A[e]));else if("x;"!==A[e]&&"x}"!==A[e]&&"x{"!==A[e])if("number"==typeof O[e])u+=1,u>16&&(u=16),n.push(A[e]);else if("string"!=typeof O[e]&&"number"!=typeof O[e]){n.push(A[e]),u-=1,p=n.length-1;do p-=1;while(p>0&&n[p].indexOf("
    2. ";else{if(p=n.length-1,n[p].indexOf("/g,"").replace(/<\/em>/g,""),p-=1,p>0&&void 0===n[p]&&(p-=1);while(p>0&&void 0!==n[p-1]&&n[p].indexOf(" <\/em><\/li>)$/.test(n[p-1])===!0&&(n[p-1]=n[p-1].replace(/class\='l\d+'/,"class='c0'")),n[p]=n[p].replace(/class\='l\d+'/,"class='c0'")}n.push(A[e])}else"literal"===P[e]&&A[e].indexOf("\n")>0?V(A[e]):n.push(A[e]);h===!0&&I[e]>0&&"x"!==k[e]&&"s"!==k[e]&&"+"!==A[e]&&("+"===A[e]||"-"===A[e]||"*"===A[e]||"/"===A[e]?e"),g.push(i),g.push("
    3. "),i+=1,"comment"===P[e]?n.push("
    4. "):(f+=1,R(k[e],!0)))),";"!==A[e]&&"x;"!==A[e]||"x}"!==A[e+1]||/\}<\/em>/.test(A[e+2])!==!0&&"x}"!==A[e+2]?"x{"===A[e]&&"s"===k[e]&&"s"===k[e-1]?n.push(""):e0&&e===d[d.length-1][1]&&m===-1&&x()}for(e=n.length-1;e>-1&&n[e]===S;e-=1)n.pop();if(o=n[n.length-1],o.indexOf("0?n[n.length-1]="
    5. ":o.indexOf("")<0&&n.push(" "),n.push("
    "),o=n.join(""),null!==o.match(/
  13. u)){i-=1;do g.pop(),g.pop(),g.pop(),i-=1;while(i>u)}return g.push("
"),"html"===b?(g.push(o),g.join("")):(n=["

Scope analysis does not provide support for undeclared variables.

","

",M," instances of missing semicolons counted.

","

",L," unnecessary instances of the keyword new counted.

",g.join(""),o],r=n.join(""),g=[],n=[],"")}().replace(/(\s+)$/,"").replace(/\u0000|\u0001|\u0002|\u0003|\u0004|\u0005|\u0006|\u0007|\u0008|\u000b|\u000c|\u000e|\u000f|\u0010|\u0011|\u0012|\u0013|\u0014|\u0015|\u0016|\u0017|\u0018|\u0019|\u001a|\u001b|\u001c|\u001d|\u001e|\u001f|\u007f|\u0080|\u0081|\u0082|\u0083|\u0084|\u0085|\u0086|\u0087|\u0088|\u0089|\u008a|\u008b|\u008c|\u008d|\u008e|\u008f|\u0090|\u0091|\u0092|\u0093|\u0094|\u0095|\u0096|\u0097|\u0098|\u0099|\u009a|\u009b|\u009c|\u009d|\u009e|\u009f/g,""):function(){var t=0,n=A.length,r=[],i=c,o=function(){var e=a,t=v,n=[];for(t=t;t>0;t-=1)n.push(e);return n.join("")}(),u=function(e){var t=0;for(r.push("\n"),t=0;t1&&"."===A[t-1]);")"!==A[t]&&"]"!==A[t]||(t+=1,r-=2,i=!0,s())},s=function(){var e=0;for(t-=1;t>-1;t-=1){if(r+=A[t].length,("start"===P[t]||"method"===P[t])&&(e+=1,1===e)){if(i===!0)return;break}if("end"===P[t]&&(e-=1),"operator"!==P[t]&&"separator"!==P[t]||("s"===k[t]&&(r+=1),"s"===k[t-1]&&(r+=1)),";"===A[t]||"x;"===A[t]||"}"===A[t]||"x}"===A[t])return}"word"!==P[t-1]&&"literal"!==P[t-1]||(t-=1,r+=A[t].length),"word"===P[t]&&"."===A[t-1]&&a(),"{"!==A[t]&&(")"!==A[t-1]&&"]"!==A[t-1]||(r-=1,s()))},"word"===P[t]&&"."===A[t-1]?a():")"===A[t]||"]"===A[t]?(s(),o===!1&&(r+=1)):r+=1,","===A[t-1]&&"["!==A[N[e][0]-1]&&":"!==A[N[e][n]+1]&&"var"!==A[N[e][0]-1]&&"let"!==A[N[e][0]-1]&&"const"!==A[N[e][0]-1]&&(r+=v),r};for(e=N.length-1;e>-1;e-=1)if(void 0!==N[e]){for(t=N[e].length,i=0,c=[],n=0;ni&&(i=o),c.push(o);if(s="",i>v?a=i-v:i0)do s+=" ",a-=1;while(a>-1);for(n=0;n0&&"x"!==k[t]&&"s"!==k[t]&&"+"!==A[t]&&("+"===A[t]||"-"===A[t]||"*"===A[t]||"/"===A[t]?t-1&&r[t]===o;t-=1)r.pop();return h===!0&&I[I.length-1]>0?r.join("").replace(/(\s+)$/,"\n"):r.join("").replace(/(\s+)$/,"")}(),"diff"!==r&&"report"!==b&&(B.space.space-=1,function(){var e=y.length-1,t=U.split("\n").length,n=B.space.newline,i=0,o={chars:0,comment:{chars:B.commentBlock.chars+B.commentLine.chars,token:B.commentBlock.token+B.commentLine.token},literal:{chars:B.number.chars+B.regex.chars+B.string.chars,token:B.number.token+B.regex.token+B.string.token},space:B.space.newline+B.space.other+B.space.space+B.space.tab,syntax:{chars:0,token:B.string.quote+B.comma+B.semicolon+B.container},token:0},a=[],s=function(e,t){var n=0;return 0===t?"0.00%":(n=e/t*100,n.toFixed(2)+"%")};o.syntax.chars=o.syntax.token+B.operator.chars,o.syntax.token+=B.operator.token, o.token=B.server.token+B.word.token+o.comment.token+o.literal.token+o.space+o.syntax.token,o.chars=B.server.chars+B.word.chars+o.comment.chars+o.literal.chars+o.space+o.syntax.chars,0===n&&(n=1),a.push("
"),R.length>0&&(a.push("

Error: "),a.push(R[0].replace(/&/g,"&").replace(//g,">").replace(/\u0000|\u0001|\u0002|\u0003|\u0004|\u0005|\u0006|\u0007|\u0008|\u000b|\u000c|\u000e|\u000f|\u0010|\u0011|\u0012|\u0013|\u0014|\u0015|\u0016|\u0017|\u0018|\u0019|\u001a|\u001b|\u001c|\u001d|\u001e|\u001f|\u007f|\u0080|\u0081|\u0082|\u0083|\u0084|\u0085|\u0086|\u0087|\u0088|\u0089|\u008a|\u008b|\u008c|\u008d|\u008e|\u008f|\u0090|\u0091|\u0092|\u0093|\u0094|\u0095|\u0096|\u0097|\u0098|\u0099|\u009a|\u009b|\u009c|\u009d|\u009e|\u009f/g,"")),a.push(" "),R[1]=R[1].replace(/&/g,"&").replace(//g,">").replace(/\u0000|\u0001|\u0002|\u0003|\u0004|\u0005|\u0006|\u0007|\u0008|\u000b|\u000c|\u000e|\u000f|\u0010|\u0011|\u0012|\u0013|\u0014|\u0015|\u0016|\u0017|\u0018|\u0019|\u001a|\u001b|\u001c|\u001d|\u001e|\u001f|\u007f|\u0080|\u0081|\u0082|\u0083|\u0084|\u0085|\u0086|\u0087|\u0088|\u0089|\u008a|\u008b|\u008c|\u008d|\u008e|\u008f|\u0090|\u0091|\u0092|\u0093|\u0094|\u0095|\u0096|\u0097|\u0098|\u0099|\u009a|\u009b|\u009c|\u009d|\u009e|\u009f/g,"").replace(/^(\s+)/,""),R.indexOf("\n")>0?a.push(R[1].replace("\n","")):(a.push(R[1]),a.push("")),a.push("

")),a.push("

"),a.push(M),a.push(" instance"),1!==M&&a.push("s"),a.push(" of missing semicolons counted.

"),a.push("

"),a.push(L),a.push(" unnessary instance"),1!==L&&a.push("s"),a.push(" of the keyword new counted.

"),a.push(""),a.push("
JavaScript data report
Data LabelInputOutputLiteral IncreasePercentage Increase
Total Character Size"),a.push(e),a.push(""),a.push(U.length),a.push(""),a.push(U.length-e),a.push(""),i=(U.length-e)/e*100,a.push(i.toFixed(2)),a.push("%
Total Lines of Code"),a.push(n),a.push(""),a.push(t),a.push(""),a.push(t-n),a.push(""),i=(t-n)/n*100,a.push(i.toFixed(2)),a.push("%
"),a.push(""),a.push(""),a.push(""),a.push(""),a.push("
JavaScript component analysis
JavaScript ComponentComponent QuantityPercentage Quantity from SectionPercentage Qauntity from TotalCharacter LengthPercentage Length from SectionPercentage Length from Total
Total Accounted"),a.push(o.token),a.push("100.00%100.00%"),a.push(o.chars),a.push("100.00%100.00%
Comments
Block Comments"),a.push(B.commentBlock.token),a.push(""),a.push(s(B.commentBlock.token,o.comment.token)),a.push(""),a.push(s(B.commentBlock.token,o.token)),a.push(""),a.push(B.commentBlock.chars),a.push(""),a.push(s(B.commentBlock.chars,o.comment.chars)),a.push(""),a.push(s(B.commentBlock.chars,o.chars)),a.push("
Inline Comments"),a.push(B.commentLine.token),a.push(""),a.push(s(B.commentLine.token,o.comment.token)),a.push(""),a.push(s(B.commentLine.token,o.token)),a.push(""),a.push(B.commentLine.chars),a.push(""),a.push(s(B.commentLine.chars,o.comment.chars)),a.push(""),a.push(s(B.commentLine.chars,o.chars)),a.push("
Comment Total"),a.push(o.comment.token),a.push("100.00%"),a.push(s(o.comment.token,o.token)),a.push(""),a.push(o.comment.chars),a.push("100.00%"),a.push(s(o.comment.chars,o.chars)),a.push("
Whitespace Outside of Strings and Comments
New Lines"),a.push(B.space.newline),a.push(""),a.push(s(B.space.newline,o.space)),a.push(""),a.push(s(B.space.newline,o.token)),a.push(""),a.push(B.space.newline),a.push(""),a.push(s(B.space.newline,o.space)),a.push(""),a.push(s(B.space.newline,o.chars)),a.push("
Spaces"),a.push(B.space.space),a.push(""),a.push(s(B.space.space,o.space)),a.push(""),a.push(s(B.space.space,o.token)),a.push(""),a.push(B.space.space),a.push(""),a.push(s(B.space.space,o.space)),a.push(""),a.push(s(B.space.space,o.chars)),a.push("
Tabs"),a.push(B.space.tab),a.push(""),a.push(s(B.space.tab,o.space)),a.push(""),a.push(s(B.space.tab,o.token)),a.push(""),a.push(B.space.tab),a.push(""),a.push(s(B.space.tab,o.space)),a.push(""),a.push(s(B.space.tab,o.chars)),a.push("
Other Whitespace"),a.push(B.space.other),a.push(""),a.push(s(B.space.other,o.space)),a.push(""),a.push(s(B.space.other,o.token)),a.push(""),a.push(B.space.other),a.push(""),a.push(s(B.space.other,o.space)),a.push(""),a.push(s(B.space.other,o.chars)),a.push("
Total Whitespace"),a.push(o.space),a.push("100.00%"),a.push(s(o.space,o.token)),a.push(""),a.push(o.space),a.push("100.00%"),a.push(s(o.space,o.chars)),a.push("
Literals
Strings"),a.push(B.string.token),a.push(""),a.push(s(B.string.token,o.literal.token)),a.push(""),a.push(s(B.string.token,o.token)),a.push(""),a.push(B.string.chars),a.push(""),a.push(s(B.string.chars,o.literal.chars)),a.push(""),a.push(s(B.string.chars,o.chars)),a.push("
Numbers"),a.push(B.number.token),a.push(""),a.push(s(B.number.token,o.literal.token)),a.push(""),a.push(s(B.number.token,o.token)),a.push(""),a.push(B.number.chars),a.push(""),a.push(s(B.number.chars,o.literal.chars)),a.push(""),a.push(s(B.number.chars,o.chars)),a.push("
Regular Expressions"),a.push(B.regex.token),a.push(""),a.push(s(B.regex.token,o.literal.token)),a.push(""),a.push(s(B.regex.token,o.token)),a.push(""),a.push(B.regex.chars),a.push(""),a.push(s(B.regex.chars,o.literal.chars)),a.push(""),a.push(s(B.regex.chars,o.chars)),a.push("
Total Literals"),a.push(o.literal.token),a.push("100.00%"),a.push(s(o.literal.token,o.token)),a.push(""),a.push(o.literal.chars),a.push("100.00%"),a.push(s(o.literal.chars,o.chars)),a.push("
Syntax Characters
Quote Characters"),a.push(B.string.quote),a.push(""),a.push(s(B.string.quote,o.syntax.token)),a.push(""),a.push(s(B.string.quote,o.token)),a.push(""),a.push(B.string.quote),a.push(""),a.push(s(B.string.quote,o.syntax.chars)),a.push(""),a.push(s(B.string.quote,o.chars)),a.push("
Commas"),a.push(B.comma),a.push(""),a.push(s(B.comma,o.syntax.token)),a.push(""),a.push(s(B.comma,o.token)),a.push(""),a.push(B.comma),a.push(""),a.push(s(B.comma,o.syntax.chars)),a.push(""),a.push(s(B.comma,o.chars)),a.push("
Containment Characters");a.push(B.container);a.push(""),a.push(s(B.container,o.syntax.token)),a.push(""),a.push(s(B.container,o.token)),a.push(""),a.push(B.container),a.push(""),a.push(s(B.container,o.syntax.chars)),a.push(""),a.push(s(B.container,o.chars)),a.push("
Semicolons"),a.push(B.semicolon),a.push(""),a.push(s(B.semicolon,o.syntax.token)),a.push(""),a.push(s(B.semicolon,o.token)),a.push(""),a.push(B.semicolon),a.push(""),a.push(s(B.semicolon,o.syntax.chars)),a.push(""),a.push(s(B.semicolon,o.chars)),a.push("
Operators"),a.push(B.operator.token),a.push(""),a.push(s(B.operator.token,o.syntax.token)),a.push(""),a.push(s(B.operator.token,o.token)),a.push(""),a.push(B.operator.chars),a.push(""),a.push(s(B.operator.chars,o.syntax.chars)),a.push(""),a.push(s(B.operator.chars,o.chars)),a.push("
Total Syntax Characters"),a.push(o.syntax.token),a.push("100.00%"),a.push(s(o.syntax.token,o.token)),a.push(""),a.push(o.syntax.chars),a.push("100.00%"),a.push(s(o.syntax.chars,o.chars)),a.push("
Keywords and Variables
Words"),a.push(B.word.token),a.push("100.00%"),a.push(s(B.word.token,o.token)),a.push(""),a.push(B.word.chars),a.push("100.00%"),a.push(s(B.word.chars,o.chars)),a.push("
Server-side Tags
Server Tags"),a.push(B.server.token),a.push("100.00%"),a.push(s(B.server.token,o.token)),a.push(""),a.push(B.server.chars),a.push("100.00%"),a.push(s(B.server.chars,o.chars)),a.push("
"),r=a.join("")}())),U))},l=function(e){var t=e.accessibility===!0||"true"===e.accessibility,n=e.braceline===!0||"true"===e.braceline,i=e.bracepadding===!0||"true"===e.bracepadding,a="allman"===e.braces?"allman":"knr",s="string"==typeof e.inchar&&e.inchar.length>0?e.inchar:" ",u="string"==typeof e.comments&&"noindent"===e.comments?"noindent":"nocomment"===e.comments?"nocomment":"indent",l=e.html===!0||e.conditional===!0||"true"===e.conditional,f="true"===e.content||e.content===!0,d=e.correct===!0||"true"===e.correct,h=e.cssinsertlines===!0||"true"===e.cssinsertlines,m=e.dustjs===!0||"true"===e.dustjs,g=e.force_indent===!0||"true"===e.force_indent,v="true"===e.html||e.html===!0,y=isNaN(e.inlevel)===!0?0:Number(e.inlevel),x=e.jsx===!0||"true"===e.jsx,b="parse"===e.mode||"diff"===e.mode||"minify"===e.mode?e.mode:"beautify",_=e.obfuscate===!0||"true"===e.obfuscate,w="true"===e.objsort||e.objsort===!0,E=e.preserve!==!1&&"false"!==e.preserve,S="single"===e.quoteConvert||"double"===e.quoteConvert?e.quoteConvert:"none",C=isNaN(e.insize)===!0?4:Number(e.insize),T="string"==typeof e.source&&e.source.length>0?e.source:"Error: no source code supplied to markuppretty!",D=e.space!==!1&&"false"!==e.space,A="string"==typeof e.style&&"noindent"===e.style?"noindent":"indent",P="string"==typeof e.styleguide?e.styleguide:"none",k=e.tagmerge===!0||"true"===e.tagmerge,I=e.tagsort===!0||"true"===e.tagsort,F=e.textpreserve===!0||"true"===e.textpreserve,O=e.top_comments===!0||"true"===e.top_comments,N=isNaN(e.wrap)===!0||x===!0?0:Number(e.wrap),j="each"===e.varword||"list"===e.varword?e.varword:"none",R="jsonly"===e.vertical?"jsonly":e.vertical===!0||"true"===e.vertical,L={cdata:[0,0],comment:[0,0],conditional:[0,0],content:[0,0],end:[0,0],ignore:[0,0],script:[0,0],sgml:[0,0],singleton:[0,0],space:0,start:[0,0],style:[0,0],template:[0,0],text:[0,0],xml:[0,0]},M=[],B=[],U=[],V=[],G=[],W=[],Q=[],H=[],z=[],q=[],$=1,X=function(e){var t=e.replace(/\s+/," ").indexOf(" "),n=t<0?e.slice(1,e.length-1):e.slice(1,t).toLowerCase();return n},K=function(e){var t=e.indexOf("="),n="",r="";return t<0?[e,""]:(n=e.slice(0,t),r=e.slice(t+1),('"'===r.charAt(0)&&'"'===r.charAt(r.length-1)||"'"===r.charAt(0)&&"'"===r.charAt(r.length-1))&&(r=r.slice(1,r.length-1)),v===!0?[n.toLowerCase(),r.toLowerCase()]:[n,r])};return"diff"===b?N=0:f=!1,x===!0&&(m=!1),F===!0&&(N=0),function(){var e=0,t=T.split(""),n=t.length,r="",i="",a=0,s=0,d=!1,h=function(){i.length>0?(L.space+=i.length,E===!0&&i.split("\n").length>2?G.push(2):G.push(1)):G.push(0),r=i,i=""},g=function(o){var c=[],f=0,g=0,y=0,_=0,E=0,C="",T="",D="",A="",P="",F=!1,O=!1,N=!1,j=!1,R=!1,L=!1,U=!1,J=!1,Y=!1,Z=!1,ee=!1,te=!1,ne=[];if(h(),B.push(!1),M.push([]),V.push($),d=!1,"<"===t[e])"!"===t[e+1]?"-"===t[e+2]&&"-"===t[e+3]?"#"===t[e+4]?(o="-->",Q.push("template")):"["===t[e+4]&&"i"===t[e+5]&&"f"===t[e+6]&&l===!0?(o="-->",Q.push("conditional")):(o="-->","minify"===b||"nocomment"===u?j=!0:(L=!0,F=!0,Q.push("comment"))):"["===t[e+2]&&"C"===t[e+3]&&"D"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"A"===t[e+7]&&"["===t[e+8]?(o="]]>",L=!0,Q.push("cdata")):(o=">",Q.push("sgml")):"?"===t[e+1]?(o="?>","x"===t[e+2]&&"m"===t[e+3]&&"l"===t[e+4]?Q.push("xml"):(L=!0,Q.push("template"))):"%"===t[e+1]?(L=!0,"-"===t[e+2]&&"-"===t[e+3]?(o="--%>",F=!0,Q.push("comment")):(o="%>",Q.push("template"))):void 0===t[e+4]||"p"!==t[e+1].toLowerCase()||"r"!==t[e+2].toLowerCase()||"e"!==t[e+3].toLowerCase()||">"!==t[e+4]&&/\s/.test(t[e+4])!==!0?"<"===t[e+1]?(o="<"===t[e+2]?">>>":">>",Q.push("template")):("/"===t[e+1]?Q.push("end"):R=!0,o=">"):(o="",L=!0,Q.push("ignore"));else if("{"===t[e])if(L=!0,x===!0)o="}",Q.push("script");else if(m===!0){if(":"===t[e+1]&&"e"===t[e+2]&&"l"===t[e+3]&&"s"===t[e+4]&&"e"===t[e+5]&&"}"===t[e+6])return e+=6,W.push("{:else}"),Q.push("template_else");"!"===t[e+1]?(o="!}",F=!0,Q.push("comment")):"/"===t[e+1]?(o="}",Q.push("template_end")):"~"===t[e+1]?(o="}",Q.push("singleton")):">"===t[e+1]?(o="/}",Q.push("singleton")):"#"===t[e+1]||"?"===t[e+1]||"^"===t[e+1]||"@"===t[e+1]||"<"===t[e+1]||"+"===t[e+1]?(o="}",Q.push("template_start")):(o="}",Q.push("template"))}else"{"===t[e+1]?"{"===t[e+2]?(o="}}}",Q.push("template")):"#"===t[e+2]?(o="}}",Q.push("template_start")):"/"===t[e+2]?(o="}}",Q.push("template_end")):(o="}}",Q.push("template")):(o=t[e+1]+"}",Q.push("template"));else"["===t[e]&&"%"===t[e+1]&&(o="%]",Q.push("template"));for(D=o.charAt(o.length-1),e=e;e1&&">>"!==o&&">>>"!==o&&R===!0&&(q.push("Parse error on line "+$+" on element: "),ee=!0),U===!0&&/\s/.test(t[e])===!1&&t[e]!==D)for(U=!1,C=P,c.pop(),e=e;e-1&&t[e-y]===C.charAt(g);g-=1)y+=1;if(g<0&&(C='"'===C&&"single"===S?ne.slice(0,ne.length-1).join("").replace(/'/g,'"').replace(/"/,"'")+"'":"'"===C&&"double"===S?ne.slice(0,ne.length-1).join("").replace(/"/g,"'").replace(/'/,'"')+'"':ne.join(""),A=K(C)[0],"data-prettydiff-ignore"===A?Y=!0:"id"===A?z.push(C.slice(A.length+2,C.length-1)):"schemaLocation"===A&&H.push(C.slice(A.length+2,C.length-1)),"="===C.charAt(0)&&M[M.length-1][M[M.length-1].length-1].indexOf("=")<0?M[M.length-1][M[M.length-1].length-1]=M[M.length-1][M[M.length-1].length-1]+C.replace(/\s+/g," "):M[M.length-1].push(C.replace(/\s+/g," ")),C="",ne=[],t[e+1]===D))break}else if('"'===t[e]||"'"===t[e])C=t[e];else if("{"===c[0]||"{"!==t[e]||m!==!0&&"{"!==t[e+1]&&"%"!==t[e+1]&&"@"!==t[e+1]&&"#"!==t[e+1])if(R===!0&&/\s/.test(t[e])===!0&&"<"!==t[e-1])U=!0;else if(R!==!0||x!==!0||"/"!==t[e]||"*"!==t[e+1]&&"/"!==t[e+1]){if(t[e]===D&&(x===!1||0===E)){for(y=c.length,g=o.length-1;g>-1&&(y-=1,c[y]===o.charAt(g));g-=1);if(g<0)break}}else U=!0,c[c.length-1]=" ",ne.push(t[e]),P="*"===t[e+1]?"*/":"\n";else C="{"===t[e+1]?"{"===t[e+2]?"}}}":"}}":m===!0?"}":t[e+1]+"}",C===o&&(C="");else if(t[e]===C.charAt(C.length-1)){for(y=0,g=C.length-1;g>-1&&t[e-y]===C.charAt(g);g-=1)y+=1;g<0&&(C="")}if(j===!0)return M.pop(),B.pop(),V.pop(),G.pop(),void(i=r);if(M[M.length-1].length>0&&(g=M.length-1,"/"===M[g][M[g].length-1]&&(M[M.length-1].pop(),c.splice(c.length-1,0,"/")),B[B.length-1]===!1&&w===!0&&(M[M.length-1]=p(M[M.length-1]))),T=c.join(""),ee===!0)if(0===T.indexOf("\s*)$/,O="",N=function(){var e=C,t=[];for(e=e;e>-1;e-=1)t.push(s);return new RegExp("^("+t.join("")+"+)")}(),M=function(){var t=0;if(p-=1,"start"===r||x===!0&&/^\s+\{/.test(W[e-1])===!0&&0===G[e])return U.push("x");if(g===!1){if(0===G[e]&&("singleton"===r||"content"===r||"template"===r))return U.push("x");if("comment"===r)for(t=e-1;t>-1;t-=1)if("comment"!==Q[t]){if(0===G[t+1]&&("singleton"===Q[t]||"content"===Q[t]||"template"===r)){for(t+=1;t-1;t-=1){if("comment"!==Q[t-1]&&"comment"===Q[t]){if(0===G[t]){for(t=t;t0)return U.push(p)}return U.push(p)}U.push("x")}else U.push(p)},V=function(){var t=[],r=W[e],o=!1,l=function(e){return e+"{"};L.script[0]+=1,L.script[1]+=W[e].replace(/\s+/g," ").length,_.test(W[e])===!0?(f=_.exec(W[e])[0].replace(/^\s+/,"")+"\n",W[e]=W[e].replace(_,"")):k.test(W[e])===!0&&(v=k.exec(W[e])[0].replace(/^\s+/,"")+"\n",W[e]=W[e].replace(k,"")),T.test(W[e])===!0?(m=T.exec(W[e])[0],W[e]=W[e].replace(T,"")):I.test(W[e])===!0&&(b=I.exec(W[e])[0],W[e]=W[e].replace(I,"")),x===!0&&"{"===r.charAt(0)&&(r=r.slice(1,r.length-1),o=!0),W[e]=c({braceline:n,bracepadding:i,braces:a,comments:u,correct:d,inchar:s,inlevel:"noindent"===A||0===G[e]?0:p,insize:C,mode:"beautify",objsort:w,preserve:E,quoteConvert:S,source:r,space:D,styleguide:P,varword:j,vertical:"jsonly"===R||R===!0||"true"===R}),o===!0&&(0===G[e]?W[e]="{"+W[e]+"}":W[e]=W[e].replace(/^(\s+)/,l)+"}"),t=N.exec(W[e]),null!==t&&(O=t[0]),""!==f?(W[e]=O+f+W[e],f=""):""!==v&&(W[e]=O+v+W[e],v=""),""!==m?(W[e]=W[e]+O+m,m=""):""!==b&&(W[e]=W[e]+O+b,b=""),o===!0&&0===G[e]?(U.push("x"),Q[e]="singleton"):U.push(0)},H=function(){var t=[];L.style[0]+=1,L.style[1]+=W[e].replace(/\s+/g," ").length,_.test(W[e])===!0?(f=_.exec(W[e])[0].replace(/^\s+/,"")+"\n",W[e]=W[e].replace(_,"")):k.test(W[e])===!0&&(v=k.exec(W[e])[0].replace(/^\s+/,"")+"\n",W[e]=W[e].replace(k,"")),T.test(W[e])===!0?(m=T.exec(W[e])[0],W[e]=W[e].replace(T,"")):I.test(W[e])===!0&&(b=I.exec(W[e])[0],W[e]=W[e].replace(I,"")),W[e]=o({comm:u,cssinsertlines:h,inchar:s,inlevel:"noindent"===A?0:p,insize:C,mode:"beautify",objsort:w,source:W[e],vertical:R===!0||"true"===R}),t=N.exec(W[e]),null!==t&&(O=t[0]),""!==f?(W[e]=O+f+W[e],f=""):""!==v&&(W[e]=O+v+W[e],v=""),""!==m?(W[e]=W[e]+O+m,m=""):""!==b&&(W[e]=W[e]+O+b,b=""),U.push(0)};for(e=0;e-1);"x"===o&&(o=1)}if(i.length>0){if(a=i.join(" "),s=X(W[e]),n=s.length+3+a.length,"/"===W[e].charAt(W[e].length-2)&&(n+=1),0===N||n<=N)return void(W[e]=W[e].replace(" "," "+a).replace(/(\ \/>)$/,"/>"));for(u.push(W[e].slice(0,W[e].indexOf(" "))),c=u[0].length,n=i.length,t=0;tN?(m(o+1,u),c=0):(u.push(" "),c+=1),u.push(i[t]),c+=i[t].length;u.push(W[e].slice(W[e].indexOf(" ")+1)),W[e]=u.join("").replace(/(\ \/>)$/,"/>")}else{if(i=W[e].split(" "),n=i.length,"x"===U[e]&&"end"===Q[e-1]){t=e-1,o=1;do t-=1,"start"===Q[t]?o-=1:"end"===Q[t]&&(o+=1);while(o>0&&t>0);o=U[t]}for(t=0;tN-r?(u.push(s),r=0,"x"===U[e]&&"end"!==Q[e-1]?m(o+1,u):m(o,u),s=""):s+=" ";u.push(s.replace(/\s$/,"")),u.length>0&&"\n"===u[u.length-1].charAt(0)&&u.pop(),W[e]=u.join("").replace(/(\ \/>)$/,"/>")}},v=function(){var t=W[e].split(" "),n=M[e],r=n.length,i=0,o=[t[0]],a=[],s=[],u=0,c=0,p=0,f=0;for(m(U[e],l),c=0;c0&&u!==n[c].length-1&&0===n[c].indexOf("/*")){for(a=n[c].split("\n"),s.push(a[0]),f=a.length,p=0;p0&&"\n"===n[c-1].charAt(n[c-1].length-1)?(m(U[e]+1,o),i=o.length-1,o[i]=o[i].slice(1)):o.push(" "),o.push(n[c])}"\n"===n[r-1].charAt(n[r-1].length-1)&&(m(U[e],o),i=o.length-1,o[i]=o[i].slice(1)),o.push(t[1]),l.push(o.join(""))},_=function(){var t=M[e],r=0,o=t.length,l=[],p=y+U[e];for("x"===U[e]?p=y:U[e]>0&&(p=U[e]),r=0;r0&&_(),B[e]===!0?v():("content"===Q[e]&&N>0&&W[e].length>N||M[e].length>0)&&"beautify"===b?g():M[e].length>0?W[e]=W[e].replace(" "," "+M[e].join(" ")).replace(/(\ \/>)$/,"/>"):"singleton"===Q[e]&&(W[e]=W[e].replace(/(\ \/>)$/,"/>")),""===W[e]&&d===!0&&(W[e]=""),""!==W[e]&&(isNaN(U[e])===!1?"minify"===b?l.push(" "):m(U[e],l):"s"===U[e]&&l.push(" "),l.push(W[e]));return"\n"===l[0]&&(l[0]=""),f=l.join(""),"beautify"===b&&(r=function(){var e=W.length,n=[],r=L.start[0]-L.end[0],i=0,a=/\u0000|\u0001|\u0002|\u0003|\u0004|\u0005|\u0006|\u0007|\u0008|\u000b|\u000c|\u000e|\u000f|\u0010|\u0011|\u0012|\u0013|\u0014|\u0015|\u0016|\u0017|\u0018|\u0019|\u001a|\u001b|\u001c|\u001d|\u001e|\u001f|\u007f|\u0080|\u0081|\u0082|\u0083|\u0084|\u0085|\u0086|\u0087|\u0088|\u0089|\u008a|\u008b|\u008c|\u008d|\u008e|\u008f|\u0090|\u0091|\u0092|\u0093|\u0094|\u0095|\u0096|\u0097|\u0098|\u0099|\u009a|\u009b|\u009c|\u009d|\u009e|\u009f|\ufffd/g,s=function(e){var t=String(e).split(""),n=0,r=t.length,i=0;for(r%3===2?i=2:r%3===1&&(i=1),n=r-1;n>0;n-=1)n%3-i===0&&(t[n]=","+t[n]);return t.join("")},u=function(e){var t=e.length,n=e===z,r=0,o=[],a=[];if(t>0){for(e=p(e),r=0;r0&&(o[o.length-1][0]+=1)):n===!1&&o.push([1,e[r]]);if(t=o.length,n===!0){if(0===t)return"";a.push("

Duplicate id attribute values

")}else a.push("

HTTP requests:

");for(a.push("
    "),r=0;r1&&(i+=o[r][0]-1),a.push("
  • "),a.push(o[r][0]),a.push("x - "),a.push(o[r][1].replace(/&/g,"&").replace(//g,">")),a.push("
  • ");return a.push("
"),a.join("")}return""},c=function(){var e=[],n=function(){var e=0,t=0,n=0,r=0,a="",s=!1,u=!1,c=!1,l=[],p=[],f=[],d=[],h=/^(h\d)$/,m=[],g=[],v=[],y=[],x=[],b=[],_=[];for(e=0;e0&&r-d[d.length-1][1]>1?(i+=1,d.push([e,r,!0])):d.push([e,r,!1])),n=M[e].length,t=0;t0?v.push([e,!0]):v.push([e,!1]));c===!0?c=!1:"label"===a&&_.push(e),u===!0?u=!1:"select"!==a&&"input"!==a&&"textarea"!==a||y.push(e),s===!0?s=!1:"img"===a&&p.push(e)}else m.push(e);if(l=[],e=m.length,i+=e,e>0){for(l.push("

"),l.push(e),l.push(" obsolete HTML tag"),e>1&&l.push("s"),l.push("

Obsolete elements do not appropriately describe content.

    "),t=0;t"),l.push(W[m[t]].replace(/&/g,"&").replace(//g,">")),l.push(" on input line number "),l.push(V[m[t]]),l.push("");l.push("
")}else l.push("

0 obsolete HTML tags

");if(e=g.length,e>0){for(r=0,l.push("

"),n=l.length,l.push(" HTML tag"),e>1&&l.push("s"),l.push(" containing obsolete or inappropriate attributes

Obsolete elements do not appropriately describe content.

    "),t=0;t/g,">").replace(M[g[t][0]][g[t][1]],""+M[g[t][0]][g[t][1]]+""),t"+M[g[t][0]][g[t+1][1]]+""),t+=1;while(t"),l.push(a),l.push(" on input line number "),l.push(V[g[t][0]]),l.push("")}l.splice(n,0,r),i+=r,l.push("
")}else l.push("

0 HTML tags containing obsolete or inappropriate attributes

");if(e=y.length,i+=e,e>0){for(l.push("

"),l.push(e),l.push(" form control element"),e>1&&l.push("s"),l.push(" missing a required id attribute

The id attribute is required to bind a point of interaction to an HTML label.

    "),t=0;t"),l.push(W[y[t]].replace(/&/g,"&").replace(//g,">")),l.push(" on input line number "),l.push(V[y[t]]),l.push("");l.push("
")}else l.push("

0 form control elements missing a required id attribute

The id attribute is required to bind a point of interaction to an HTML label.

");for(e=x.length,y=[],t=0;t-1&&K(M[x[t][0]][x[t][1]])[1]!==b[n];n-=1);n<0&&y.push(x[t])}if(e=y.length,i+=e,e>0){for(l.push("

"),l.push(e),l.push(" form control element"),e>1&&l.push("s"),l.push(" not bound to a label

The id of a form control must match the for of a label.

    "),t=0;t"),l.push(W[y[t][0]].replace(/&/g,"&").replace(//g,">")),l.push(" on input line number "),l.push(V[y[t][0]]),l.push("");l.push("
")}else l.push("

0 form control elements not bound to a label

The id of a form control must match the for of a label.

");if(e=v.length,i+=e,e>0){for(l.push("

"),l.push(e),l.push(" element"),e>1&&l.push("s"),l.push(" with a tabindex attribute

The tabindex attribute should have a 0 or -1 value and should not be over used.

    "),t=0;t"),v[t][1]===!0&&l.push(""),l.push(W[v[t][0]].replace(/&/g,"&").replace(//g,">")),v[t][1]===!0&&l.push(""),l.push(" on input line number "),l.push(V[v[t][0]]),l.push("");l.push("
")}else l.push("

0 elements with a tabindex attribute

The tabindex attribute should have a 0 or -1 value and should not be over used.

");if(e=d.length,e>0){for(l.push("

"),l.push(e),l.push(" HTML heading tag"),e>1&&l.push("s"),l.push(" and their order

Poorly ordered tags are described with a strong tag (color red).

    "),t=0;t"),d[t][2]===!0&&l.push(""),l.push(W[d[t][0]].replace(/&/g,"&").replace(//g,">")),d[t][2]===!0&&l.push(""),l.push(" on input line number "),l.push(V[d[t][0]]),l.push("");l.push("
")}else l.push("

0 HTML heading elements

");if(e=p.length,i+=e,e>0){for(l.push("

"),l.push(e),l.push(" image"),e>1&&l.push("s"),l.push(" missing a required alt attribute

The alt attribute is required even if it contains no value.

    "),t=0;t"),l.push(W[p[t]].replace(/&/g,"&").replace(//g,">")),l.push(" on input line number "),l.push(V[p[t]]),l.push("");l.push("
")}else l.push("

0 images missing a required alt attribute

The alt attribute is required even if it contains no value.

");if(e=f.length,i+=e,e>0){for(l.push("

"),l.push(e),l.push(" image"),e>1&&l.push("s"),l.push(" have an empty alt attribute value

Empty alt text is not necessarily a violation, such as the case of tracking pixels. If an image has embedded"),t=0;t"),l.push(W[f[t]].replace(/&/g,"&").replace(//g,">")),l.push(" on input line number "),l.push(V[f[t]]),l.push("");l.push("")}else l.push("

0 images have an empty alt attribute value

");return l.join("")};return t===!1?"":(e.push(n()),e.join(""))}(),l=function(){var e=q.length,t=0,n=[];if(i+=e,0===e)return"";for(n.push("

"),n.push(e),n.push(" errors interpreting markup

    "),t=0;t"),n.push(q[t].replace(a,"").replace(/&/g,"&").replace(//g,">").replace("element: ","element: ")),n.push("");return n.push("
"),n.join("")}(),d=function(){var e=[],t=T.length,n=f.split("\n").length,r=f.length,i=n/$*100,o=r/t*100;return e.push("

Data sizes

"),e.push(""),e.push(""),e.push(""),e.push(""),e.push("
This table shows changes in sizes of the data due to beautification.
Data figureInputOutputPercent change
Lines of code"),e.push(s($)),e.push(""),e.push(s(n)),e.push(""),e.push(i.toFixed(2)),e.push("%
Character size"),e.push(s(t)),e.push(""),e.push(s(r)),e.push(""),e.push(o.toFixed(2)),e.push("%
"),e.join("")}(),h=function(){var e=[],t=L.cdata[0]+L.comment[0]+L.content[0]+L.end[0]+L.ignore[0]+L.script[0]+L.sgml[0]+L.singleton[0]+L.start[0]+L.style[0]+L.template[0]+L.text[0]+L.xml[0],n=L.cdata[1]+L.comment[1]+L.content[1]+L.end[1]+L.ignore[1]+L.script[1]+L.sgml[1]+L.singleton[1]+L.start[1]+L.style[1]+L.template[1]+L.text[1]+L.xml[1],i=function(i){var o="Total*"===i?t:L[i][0],a="Total*"===i?n:L[i][1],s=0;e.push(""),e.push(i),o>0&&("script"===i||"style"===i)&&e.push("**"),e.push(""),e.push(o),e.push(""),s=o/t*100,e.push(s.toFixed(2)),e.push("%"),e.push(a),e.push("0&&("script"===i||"style"===i)&&e.push(" class='bad'"),e.push(">"),s=a/n*100,e.push(s.toFixed(2)),e.push("%")};return e.push("

Statistics and analysis of parsed code

"),e.push(""),e.push(""),e.push(""),i("Total*"),i("cdata"),i("comment"),i("content"),i("end"),i("ignore"),i("script"),i("sgml"),i("singleton"),i("start"),i("style"),i("template"),i("text"),i("xml"),e.push(""),e.push("
This table provides basic statistics about the parsed components of the given code sample after beautification.
Item typeNumber of instancesPercentage of total itemsCharacter sizePercentage of total size
space between tags***"),e.push(L.space),e.push("
"),e.push("

* Totals are accounted for parsed code/content tokens only and not extraneous space for beautification.

"),e.push("

** Script and Style code is measured with minimal white space.

"),e.push("

*** This is space that is not associated with text, tags, script, or css.

"),e.join("")}(),m=function(){var t=0,n=0,r=0,i=0,o="",s=[],u=[],c=[],l=[],f=!0,d=function(e,t){return t[0]-e[0]};for(t=t;t/g,">").replace(/2&&o.length<30&&/&#?\w+;/.test(o)===!1&&"the"!==o&&"and"!==o&&"for"!==o&&"are"!==o&&"this"!==o&&"from"!==o&&"with"!==o&&"that"!==o&&"to"!==o&&(0===c.length||o!==c[c.length-1][1]?c.push([1,o]):c[c.length-1][0]+=1),o!==s[t-1]?u.push([1,o]):u[u.length-1][0]+=1;for(u=u.sort(d).slice(0,11),c=c.sort(d).slice(0,11),r=c.length>10?11:c.length,t=0;t10?10:u.length,r>1){for(i=s.length,l.push("

Zipf's Law analysis of content

"),l.push(""),l.push(""),f===!1&&l.push(""),t=0;t");if(r=c.length>10?10:c.length,r>1&&f===!1)for(l.push(""),t=0;t");l.push("
This table demonstrates Zipf's Law by listing the 10 most occuring words in the content and the number of times they occurred.
Word RankMost Occurring Word by RankNumber of InstancesRatio Increased Over Next Most Frequence OccurancePercentage from "),l.push(i),l.push(" total words
Unfiltered Word Set
"),l.push(t+1),l.push(""),l.push(u[t][1]),l.push(""),l.push(u[t][0]),l.push(""),l.push(n.toFixed(2)),l.push(""),n=u[t][0]/i*100,l.push(n.toFixed(2)),l.push("%
Filtered Word Set
"),l.push(t+1),l.push(""),l.push(c[t][1]),l.push(""),l.push(c[t][0]),l.push(""),l.push(n.toFixed(2)),l.push(""),n=c[t][0]/i*100,l.push(n.toFixed(2)),l.push("%
")}return l.join("")}();return r>0?(n.push("

"),n.push(r),n.push(" more start tag"),r>1&&n.push("s"),n.push(" than end tags!

")):r<0&&(r*=-1,n.push("

"),n.push(r),n.push(" more end tag"),r>1&&n.push("s"),n.push(" than start tags!

")),n.push("

Total number of HTTP requests (presuming HTML or XML Schema): "),n.push(H.length),n.push("

"),n.push("
"),n.push(u(z)),n.push(d),n.push(l),n.push(c),n.push(h),n.push(u(H)),n.push(m),n.push("
"),t===!0?n.join("").replace("
","

Total potential accessibility violations: "+i+"

"):n.join("")}()),f}())},f(e)},edition={addon:{ace:150519},api:{dom:150805,nodeLocal:150719,wsh:150713},charDecoder:141025,css:150525,csspretty:150708,csvbeauty:140114,csvmin:131224,diffview:150708,documentation:150713,jspretty:150717,latest:0,markuppretty:150805,prettydiff:150805,version:"1.12.18",webtool:150713};edition.latest=function(){"use strict";return Math.max(edition.charDecoder,edition.css,edition.csspretty,edition.csvbeauty,edition.csvmin,edition.diffview,edition.documentation,edition.jspretty,edition.markuppretty,edition.prettydiff,edition.webtool,edition.api.dom,edition.api.nodeLocal,edition.api.wsh)}(),"object"==typeof exports||"function"==typeof exports?(exports.edition=edition,exports.api=function(e){"use strict";return prettydiff(e)}):"object"!=typeof define&&"function"!=typeof define||define("sap/watt/lib/prettydiff/prettydiff",["require","exports","module"],function(e,t){"use strict";return t.edition=edition,t.api=function(e){return prettydiff(e)},"number"==typeof e?e:t.api}),define("sap.watt.toolsets.xml/service/XMLBeautifierImpl",["sap/watt/lib/prettydiff/prettydiff"],function(e){"use strict";var t=function(){};return t.prototype._oDefaultSettings={mode:"beautify",lang:"markup",inchar:"\t",insize:1,wrap:140,style:"indent",html:!1,force_indent:!1},t.prototype.beautify=function(t,n){var r=this.getSettings(n);r.source=t;var i=e(r);return Array.isArray(i)?i[0]:(this.context.service.log.error("xmlforamtter-prettydiff","failed to get proper response from beautify utility").done(),t)},t.prototype.getSettings=function(e){return e?this._updateSetting(e):this._oDefaultSettings},t.prototype._updateSetting=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&("insize"==n?t.insize=e[n]:"wrap"==n?t.wrap=e[n]:t[n]=e[n]);return t},new t}),define("sap.watt.toolsets.javascript/util/editorUtil",[],function(){"use strict";var e={markerId:-1,markerRange:null};return{getCurrentEditor:function(e){return e.getOwner().then(function(e){return e&&e.instanceOf("sap.watt.common.plugin.aceeditor.service.Editor")?e:null})},getCurrentUI5Editor:function(e){return this.getCurrentEditor(e).then(function(e){return e?e.getUI5Editor():Q()})},setEditorSelection:function(e,t,n,r){e&&t&&n&&(this.selectionContext={editor:e,start:t,end:n},r?(e.detachEvent("rendered",this.onEditorRendered,this),e.attachEvent("rendered",this.onEditorRendered,this)):this.onEditorRendered())},onEditorRendered:function(){if(this.selectionContext){var e=this,t=this.selectionContext.start,n=this.selectionContext.end;this.selectionContext.editor&&this.selectionContext.editor.getUI5Editor().then(function(r){if(r){var i=e.getPositionFromOffset(r,t),o=e.getPositionFromOffset(r,n);if(i&&o)var a=r.getRange(i.row,i.column,o.row,o.column);var s=r.getSelection();if(s&&a){var u=r.indexToPosition(t).row+1;r.gotoLine(u),s.setSelectionRange(a)}}}).done(),this.selectionContext=null}},getPositionFromOffset:function(e,t){if(e&&t>=0)for(var n=e.getSession().getDocument().getAllLines(),r=0,i=0,o=e.oEditor.getSession().getDocument().getNewLineCharacter().length,a=0;a0&&(r+=n[a-1].length+o,i+=1),i+=n[a].length,i>=t)return{row:a,column:t-r}},attachEditorEvent:function(e,t,n){if(e){var r=e.getContainer();r&&(r.removeEventListener(t,n),r.addEventListener(t,n))}},detachEditorEvent:function(e,t,n){if(e){var r=e.getContainer();r&&r.removeEventListener(t,n)}},addDefinitionMarker:function(t,n){if(t&&n&&2===n.length){var r=this.getPositionFromOffset(t,n[0]),i=this.getPositionFromOffset(t,n[1]),o=t.getRange(r.row,r.column,i.row,i.column);(!e.markerRange||e.markerRange&&o&&0!=e.markerRange.compareRange(o))&&(e.markerId>=0&&t.removeMarker(e.markerId),e.markerId=t.addMarker(o,"jsdefinition","line",!0),e.markerRange=o)}},clearDefinitionMarker:function(t){t&&e.markerId>=0&&(t.removeMarker(e.markerId),e.markerId=-1,e.markerRange=null)},getDocumentPosition:function(e,t,n){if(e){var r=e.oEditor;if(r&&r.renderer)return r.renderer.screenToTextCoordinates(t,n)}return{row:0,column:0}}}}),define("sap.watt.toolsets.javascript/command/GotoDefinition",["./../util/editorUtil"],function(e){"use strict";return{execute:function(){var t=this.context.service;return t.usagemonitoring.startPerf("editor","navigate_definition").done(),e.getCurrentEditor(t.selection).then(function(e){if(e)return e.getContentStatus(!0).then(function(n){return t.jsdefinition.gotoDefinition(n).then(function(){return e.getSelection().then(function(e){e.document.getProject().then(function(e){return t.usagemonitoring.report("editor","navigate_definition",e.getName())}).done()})})})})},_isSupported:function(){var t=this.context.service;return e.getCurrentEditor(t.selection).then(function(e){return!!e&&e.getSelection().then(function(e){var n=e.document.getExtInfo();if(n&&n.external)return!1;var r=e&&e.document&&e.document.getEntity().getFileExtension();return t.jsdefinition.isFileExtensionSupported(r)})})},isAvailable:function(){return this._isSupported()},isEnabled:function(){return e.getCurrentEditor(this.context.service.selection).then(function(e){return!!e&&e.getContentStatus(!0).then(function(e){return!(!e||!e.token)&&("identifier"===e.token.type||"entity.name.function"===e.token.type||"variable.parameter"===e.token.type)})})}}}),define("sap.watt.toolsets.javascript/command/JSDocCommentGenerator",["./../util/editorUtil"],function(e){"use strict";return{nodeInfo:null,editor:null,contentStatus:null,execute:function(){var e=this.context.service,t=this;return Q.all([this._getCurrentDocumentInContent(),t._setCursorInEditor(t.editor,t.nodeInfo.commentLoc.start.line,t.nodeInfo.commentLoc.start.column)]).spread(function(n){return e.jsdocgen.generateComment(t.nodeInfo,n,t.contentStatus.delimiter).then(function(e){return t.editor.addString(e,null,!0)})})},_getCurrentDocumentInContent:function(){return this.context.service.content.getCurrentDocument()},_setCursorInEditor:function(e,t,n){return e?e.gotoLine(t,n):Q()},_getContentStatus:function(e){if(e)return e.getContentStatus(!0)},_isSupportedFileType:function(e){return e&&null!==e.match(/\.js$/)},_isSupported:function(){var t=this.context.service,n=this;return e.getCurrentEditor(t.selection).then(function(e){return!!e&&e.getVisible().then(function(r){return!!r&&e.getCurrentFilePath().then(function(r){return!!n._isSupportedFileType(r)&&n._getContentStatus(e).then(function(r){return!!r&&t.jsdocgen.findDefinition(r).then(function(t){return n.nodeInfo=t,n.editor=e,n.contentStatus=r,n.nodeInfo&&!(null==n.nodeInfo.node)})})})})})},isAvailable:function(){var e=this;return this._isReadOnly(this.context.service.selection).then(function(t){return e._isSupported()&&!t})},isEnabled:function(){return this._isSupported()},_isReadOnly:function(e){return e.getSelection().then(function(e){return!e[0]||!e[0].document||e[0].document.isReadOnly()})}}}),define("sap.watt.toolsets.javascript/util/codeHelper",["./editorUtil"],function(e){return{providerType:"jsfindreferences",isSupported:function(t){return e.getCurrentEditor(t.selection).then(function(e){return!!e&&e.getSelection().then(function(e){var n=e.document;if(n){var r=n.getExtInfo();if(r&&r.external)return!1;var i=n.getEntity().getFileExtension();return t.jsfindreferences.isFileExtensionSupported(i)}return!1})})},isEnabled:function(t){return e.getCurrentEditor(t.selection).then(function(e){return e?e.getContentStatus(!0).then(function(e){if(!e||!e.token)return Q(!1);if("identifier"===e.token.type||"entity.name.function"===e.token.type||"variable.parameter"===e.token.type)return Q(!0);if("string"===e.token.type&&e.token.index>3&&Array.isArray(e.aRowTokens)){for(var t=e.token.index,n="";--t>=0;){var r=e.aRowTokens[t];if(r.value.trim().length>0&&(n=r.value+n),".extend("===n)return Q(!0)}return Q(!1)}return Q(!1)}):Q(!1)})}}}),define("sap.watt.toolsets.javascript/command/FindReferences",["./../util/editorUtil","./../util/codeHelper"],function(e,t){"use strict";return{execute:function(){var n=this.context.service;return n.usagemonitoring.startPerf("editor","where_used").done(),e.getCurrentEditor(n.selection).then(function(e){if(e)return e.getContentStatus(!0).then(function(r){return r.providerType=t.providerType,e.getSelection().then(function(e){return e.document.getProject()}).then(function(e){n.usagemonitoring.report("where_used","function",e.getName()).done()}).done(),n.filesearch.triggerFindReferences(r)})})},isAvailable:function(){return t.isSupported(this.context.service)},isEnabled:function(){return t.isEnabled(this.context.service)}}}),define("sap.watt.toolsets.javascript/command/Refactor",["./../util/editorUtil","./../util/codeHelper"],function(e,t){"use strict";return{execute:function(){var t=this;return e.getCurrentEditor(this.context.service.selection).then(function(e){return e.getContentStatus(!0).then(function(n){return t.context.service.refactorUI.openRefactorUI(n.token.value,e).then(function(n){t.context.service.usernotification.liteNotificationInfo(t.context.i18n.getText("i18n","command_refactorstart")).done(),t.context.service.progress.startTask().then(function(r){return t.context.service.jsRefactor.rename(n,e).then(function(e){t.context.service.usernotification.liteNotificationInfo(t.context.i18n.getText("i18n","command_refactorend",[e])).done()}).fail(function(e){e.message===t.context.i18n.getText("i18n","command_referencesfound")&&t.context.service.usernotification.liteNotificationInfo(t.context.i18n.getText("i18n","command_referencesfound")).done()}).finally(function(){t.context.service.progress.stopTask(r).done()}).done()})})})})},isAvailable:function(){return t.isSupported(this.context.service)},isEnabled:function(){var e=this.context.service;return this._isDocumentReadOnly(e).then(function(n){return!n&&t.isEnabled(e)})},_isDocumentReadOnly:function(e){return e.selection.getSelection().then(function(e){return!(!e[0]||!e[0].document)&&e[0].document.isReadOnly()})}}}),define("sap.watt.toolsets.javascript/service/JSOutline",["sap/watt/platform/plugin/platform/service/ui/AbstractPart"],function(e){"use strict";var t=e.extend("sap.watt.common.plugin.javascript.service.JSOutline",{_oView:null,_oController:null,_oEditor:null,_sEditorTitle:null,_aSupportedFileExtensions:null,init:function(){},configure:function(e){this._aStyles=e.styles,this._aSupportedFileExtensions=e.supportedFileExtensions},_isFileExtensionSupported:function(e){return this._aSupportedFileExtensions.indexOf(e)>-1},getContent:function(){var t=this;return this._oView?this._oView:(this._oView=sap.ui.view({viewName:"sap.watt.toolsets.plugin.javascript.view.JSOutlineTree",type:sap.ui.core.mvc.ViewType.JS}),this._oController=this._oView.getController(),this.context.self.attachEvent("visibilityChanged",this._onVisibilityChanged,this),e.prototype.getContent.apply(this,arguments).then(function(){return t.context.service.selection.attachEvent("changed",t.onSelectionChanged,t),t.context.service.document.attachEvent("saved",t.onDocumentSaved,t),t.context.service.outlinePane.attachEvent("visibilityChanged",t.onPaneVisibilityChange,t),t._oView}))},_updateTree:function(e,t,n){var r=this;r._oController.initOutline(t,n)},_updateOutline:function(e,t){var n=this;if(t){n._oEditor!==t&&(n._oEditor=t,n._detachAll(),n._oEditor.attachEvent("viewHasChanged",this._onEditorChange,this),n._oEditor.attachEvent("closed",this._onEditorClose,this));var r=n.context.service.jsASTManager;n._oEditor.getContentStatus().then(function(i){var o={objHierarchyStack:[],outlineJSON:[],child2ParentMapping:{}};return r.parseAndVisit(i.targetFile,i.buffer,{range:!0,loc:!0,tolerant:!0},o,n.visitor,n.cleanStack).then(function(r){var o=i.targetFile;return t.getUI5Editor().then(function(t){return r.contentOwner===o&&(n._updateTree(e,r.context.outlineJSON,t),n.context.service.usagemonitoring.report("editor","get_outline_content").done()),Q()})})}).done(),t.getTitle().then(function(e){n._sEditorTitle=e}).done()}},_detachAll:function(){this._oEditor.detachEvent("viewHasChanged",this._onEditorChange,this),this._oEditor.detachEvent("closed",this._onEditorClose,this)},canHandle:function(e){var t=this,n=e.params.owner;if(t.context.self===n)return!1;if(!n.instanceOf("sap.watt.common.plugin.aceeditor.service.Editor"))return!1;var r=e.params.selection;if(r&&r.length>0){var i=r[0].document,o=i&&i.getEntity&&i.getEntity().getFileExtension();return!!this._isFileExtensionSupported(o)||(t._oController&&(t._oController.cleanOutline(),t._oDocument=null),!1)}},onSelectionChanged:function(e){var t=this,n=e.params.owner,r=this.canHandle(e);if(r){var i=t._getSelectedDocument(e.params.selection);if(!t._oDocument||t._oDocument!==i)return t._oDocument=i,t.context.service.perspective.getAreaForService("outlinePane").then(function(r){if(r)return t.context.service.perspective.isAreaVisible(r).then(function(r){return r&&t._updateOutline(e,n),Q()})})}},onDocumentSaved:function(e){var t=this;return t.context.service.selection.getOwner().then(function(n){if(n&&n.instanceOf("sap.watt.common.plugin.aceeditor.service.Editor")){var r=e.params.document;return t.context.service.perspective.getAreaForService("outlinePane").then(function(i){if(i)return t.context.service.perspective.isAreaVisible(i).then(function(i){if(i)return r&&r.getEntity()&&t._isFileExtensionSupported(r.getEntity().getFileExtension())&&t._updateOutline(e,n),Q()})})}}).fail(function(){return Q()})},onPaneVisibilityChange:function(e){var t=this;return t.context.service.content.getCurrentEditor().then(function(n){if(n){if("function"==typeof n.getName)return n.getName().then(function(r){if("aceeditor"===r){var i=e.params.visible;if(i)return n.getSelection().then(function(r){var i=r&&r.document&&r.document.getEntity().getFileExtension();if(t._isFileExtensionSupported(i))return t._updateOutline(e,n)})}});throw new Error("Not aceeditor")}}).fail(function(e){return Q()})},_onEditorChange:function(e){return this._updateOutline(e,e.params.owner)},_getSelectedDocument:function(e){var t=null;return e.map(function(e){e&&e.document&&(t=e.document)}),t},_onVisibilityChanged:function(e){e.params.visible||(this._oDocument=null)},getSelection:function(){return[{document:this._oDocument,control:this._oControl}]},_onEditorClose:function(){this._detachAll(),this._oDocument=null,this._oEditor=null},cleanStack:function(e,t){"FunctionDeclaration"!==e.type&&"FunctionExpression"!==e.type&&"ObjectExpression"!==e.type||t.objHierarchyStack.pop()},visitor:function(e,t){function n(e,t){e.errors&&e.errors.length>0&&(t.errorLine=e.errors[0].lineNumber)}function r(e,t){e.declarations&&e.declarations.forEach(function(e){if(e.init)switch(e.init.type){case"ObjectExpression":var n=p(f.OBJECT,e.id.name,e.loc),r=c(e.init.loc);t.child2ParentMapping[r]={JSONElement:n};break;case"FunctionExpression":var n=p(f.FUNCTION,u(e.init,e.id.name),e.loc),r=c(e.init.loc);t.child2ParentMapping[r]={JSONElement:n};break;default:var n=p(f.OBJECT,e.id.name,e.loc);l(e,t,n)}else{var n=p(f.OBJECT,e.id.name,e.loc);l(e,t,n)}})}function i(e,t){var n,r=c(e.loc),i=t.child2ParentMapping[r];n=i?i.JSONElement:p(f.OBJECT,"object{}",e.loc),l(e,t,n),t.objHierarchyStack.push(n),e.properties&&e.properties.forEach(function(e){if(e.value){var n=e.key.name?e.key.name:e.key.value;switch(e.value.type){case"FunctionExpression":case"ObjectExpression":var r=p("FunctionExpression"===e.value.type?f.FUNCTION:f.OBJECT,"FunctionExpression"===e.value.type?u(e.value,n):n,e.key.loc),i=c(e.value.loc);t.child2ParentMapping[i]={JSONElement:r};break;default:var r=p(f.OBJECT,n,e.key.loc);l(e.value,t,r)}}})}function o(e,t){var n,r=c(e.loc),i=t.child2ParentMapping[r];if(i)n=i.JSONElement;else{var o=u(e);n=p(f.FUNCTION,o,e.loc)}l(e,t,n),t.objHierarchyStack.push(n)}function a(e,t){var n;if("AssignmentExpression"===e.expression.type&&"FunctionExpression"===e.expression.right.type){var r,i=c(e.expression.right.loc);r="MemberExpression"===e.expression.left.type?u(e.expression.right,s(e.expression.left)):u(e.expression.right,e.expression.left.name),n=p(f.FUNCTION,r,e.loc),t.child2ParentMapping[i]={JSONElement:n}}}function s(e){if(!e.object)return"";var t=s(e.object);return e.object.name?t+e.object.name+"."+e.property.name:t+"."+e.property.name}function u(e,t){var n;if(n=e.id?e.id.name:e.name?e.name:t?t:"function",n+="(",e.params)for(var r=e.params.length,i=0;it.errorLine)return!1;var f={VAR:"var",OBJECT:"object",FUNCTION:"function"};switch(e.type){case"Program":return n(e,t),!0;case"VariableDeclaration":return r(e,t),!0;case"ExpressionStatement":return a(e,t),!0;case"FunctionDeclaration":case"FunctionExpression":return o(e,t),!0;case"ObjectExpression":return i(e,t),!0;case"Literal":case"Callee":case"ArrayExpression":case"NewExpression":case"UnaryExpression":case"BinaryExpression":case"UpdateExpression":case"YieldExpression":case"ComprehensionExpression":case"GeneratorExpression":case"GraphExpression":case"GraphIndexExpression":case"AssigmentExpression":case"LetExpression":case"CondinitionalExpression":case"EmptyStatement":return!1;default:return!0}}});return t}),define("sap.watt.toolsets.javascript/util/WorkerHelper",[],function(){"use strict";var e,t,n,r=new Q.sap.Queue,i={init:function(i,o,a){var s=this;return r.next(function(){return t?new Q:(e=Q.defer(),t=new Worker(i),n=o,t.onmessage=s._onMessage,t.onerror=a,e.promise)})},_onMessage:function(t){return"ready"!==t.data.action?n(t):void e.resolve()},doOperation:function(e,n){if(!t)throw new Error("make sure the worker is not terminated");var r={action:e,context:n},i=JSON.stringify(r,function(e,t){return t instanceof Function||"function"==typeof t?t.toString():t});t.postMessage(i)},terminateWorker:function(){t&&(t.terminate(),t=void 0)}};return function(e,t,n){return this.init(e,t,n).then(function(){return{doOperation:this.doOperation,terminateWorker:this.terminateWorker}}.bind(this))}.bind(i)}),define("sap.watt.toolsets.javascript/service/JSAstManager",["sap/watt/lib/orion/javascript/esprima/esprimaVisitor","../util/WorkerHelper","sap/watt/lib/orion/ui/esprima/esprima"],function(e,t){"use strict";var n;return{parse:function(e,t){t||(t={});var n=null;try{n=esprima.parse(e,t)}catch(t){n=this.emptyAST(e)}return n},visit:function(t,n,r,i){e.visit(t,n,r,i)},_visitContext:function(e,t,n,r,i,o){var a={contentOwner:e,content:t,parseOptions:n,visitorContext:r,visitorOperation:i,visitorPostOperation:o};return a},parseAndVisit:function(e,r,i,o,a,s){if(this.oDefered=Q.defer(),n){var u=this._visitContext(e,r,i,o,a,s);n.doOperation("visit",u)}else{var c=this,l=require.toUrl("sap.watt.toolsets.javascript/util/VisitorWorker.js");t(l,function(e){c.oDefered.resolve({context:e.data.result,contentOwner:e.data.contentOwner})},function(e){c.context.service.log.error("JSAstManager",e.message,["user"]).done(),c.oDefered.resolve({})}).then(function(t){n=t;var u=c._visitContext(e,r,i,o,a,s);n.doOperation("visit",u)}).done()}return this.oDefered.promise},parseAndVisitForFunctions:function(e){function t(e,t,n){function r(e,t){e.properties&&e.properties.forEach(function(e){if(e.value){var n=e.key.name?e.key.name:e.key.value;switch(e.value.type){case"FunctionExpression":var r=i(o.FUNCTION,n,e.loc);t.functionElements.push(r)}}})}function i(e,t,n){return{type:e,name:t,startRow:n.start.line,startColumn:n.start.column,endRow:n.end.line,endColumn:n.end.column}}var o={FUNCTION:"function"};switch(e.type){case"ObjectExpression":return r(e,t,n),!0;default:return!0}}var n={range:!0,loc:!0,tolerant:!0},r={functionElements:[] },i=t;return this.parseAndVisit("",e,n,r,i)},emptyAST:function(e){var t=e&&"number"==typeof e.length?e.length:0;return{type:"Program",body:[],comments:[],tokens:[],range:[0,t]}}}}),define("sap.watt.toolsets.javascript/service/JSRefactor",["./../util/codeHelper"],function(e){"use strict";return{rename:function(t,n){var r={nStart:0,nRows:10},i=this,o=[],a=1;if(n)return n.getSelection().then(function(s){var u=s.document;return n.getContentStatus(!0).then(function(n){var s=n.targetFile;return i._changeCurrentReference(u,n,t).then(function(){return n.providerType=e.providerType,i.context.service.jsfindreferences.findByContext(n,r).then(function(e){if(e.aFileEntries.length>0){for(var r=0;rn){var a=i[1],s=a-o,u=t.length,c=u-s,l=e[r];if(l){var i=l.range;i[0]=i[0]+c,i[1]=i[1]+c}}}}}}),define("sap.watt.toolsets.javascript/service/RefactorUI",[],function(){"use strict";return{_oModel:null,_oRefactorDialog:null,_deferred:null,_currentEditor:null,configure:function(e){e&&e.styles&&this.context.service.resource.includeStyles(e.styles).done()},onOk:function(e){var t=this,n=t._oRefactorDialog.getModel();this._currentEditor.getSelection().then(function(e){var r=e.document;return r.getProject().then(function(e){t.context.service.usagemonitoring.report("editor","jsRefactor","from_command",e.getTitle()).done(),t.onClose(),t._deferred.resolve(n.getProperty("/name"))})}).done()},onClose:function(){this._oRefactorDialog.removeEventDelegate({onsapenter:function(){}},this),this._oRefactorDialog.destroy()},onCancel:function(){this.onClose()},onNameLiveChange:function(e){var t=e.getSource().getModel(),n="";e.mParameters&&(n=e.getParameters().newValue,this.oldName===n?t.setProperty("/okEnabled",!1):n&&n.length>0&&this._isValidFunctionName(n)?t.setProperty("/okEnabled",!0):t.setProperty("/okEnabled",!1))},openRefactorUI:function(e,t){this.oldName=e,this._currentEditor=t;var n=this;this._deferred=Q.defer();var r=sap.ui.xmlfragment("sap.watt.toolsets.plugin.javascript.fragment.Refactor",n);n._oRefactorDialog=sap.ui.getCore().byId(r.getId()),n.context.i18n.applyTo(n._oRefactorDialog);var i=new sap.ui.model.json.JSONModel;n._oRefactorDialog.addEventDelegate({onsapenter:function(e){var t=i.getProperty("/okEnabled");t&&n.onOk(e)}},this);var o={};return o.name=e,o.okEnabled=!1,o.functionname=this.context.i18n.getText("i18n","command_refactor_function_name",[e]),i.setData(o),n._oModel=i,n._oRefactorDialog.setModel(n._oModel),n._oRefactorDialog.open(),this._deferred.promise},_isValidFunctionName:function(e){var t=/^[$A-Z_][0-9A-Z_$]*$/i,n={do:!0,if:!0,in:!0,for:!0,new:!0,try:!0,var:!0,case:!0,else:!0,enum:!0,null:!0,this:!0,true:!0,void:!0,with:!0,break:!0,catch:!0,class:!0,const:!0,false:!0,super:!0,throw:!0,while:!0,delete:!0,export:!0,import:!0,return:!0,switch:!0,typeof:!0,default:!0,extends:!0,finally:!0,continue:!0,debugger:!0,function:!0};return t.test(e)&&!n[e]}}}),define("sap/watt/lib/orion/javascript/esprima/indexer",[],function(){"use strict";function e(){return this.globalSummaries&&Object.keys(this.globalSummaries).length>0}function t(e,t){this.globalSummaries&&(this.globalSummaries[e]=t)}function n(){return this.summaries?this.summaries.global:null}function r(e){return this.summaries&&this.summaries.global&&this.summaries.global.hasOwnProperty(e)?this.summaries.global[e]:null}function i(e){var t=e;if("."===e.charAt(0)&&URI){var n=new URI(e);t=n.absoluteTo(this.targetFile).toString()+".js"}else if(this.projectInfo){var r=this.projectInfo.namespace;e.slice(0,r.length)===r&&(t=e.replace(r,this.projectInfo.rootPath)+".js")}if(this.summaries&&this.summaries.module){var i=this.summaries.module[t];return i&&(i.$$originModule=t),i}}function o(e,t,n,r){this.summaries=e,this.targetFile=t,this.projectInfo=n,this.libTemplateProvider=r}return o.prototype={hasDependency:e,performIndex:t,retrieveGlobalSummaries:n,retrieveSummary:i,retrieveGlobalSummary:r},{OrionIndexer:o}}),define("sap/watt/lib/orion/javascript/esprima/proposalUtils",[],function(){function e(e,t,n){return t[0]<=e&&(n?t[1]>=e:t[1]>e)}return{looselyMatches:function(e,t,n){if(null===t||null===e)return!1;if(0===e.length)return!0;if(e.charAt(0).toLowerCase()!==t.charAt(0).toLowerCase())return!1;if(this.startsWith(t,e))return!0;if(n)return!1;var r=t.toLowerCase();if(this.startsWith(r,e.toLowerCase()))return!0;if(e===e.toLowerCase())return!1;var i=this.toCamelCaseParts(e),o=this.toCamelCaseParts(t);if(i.length>o.length)return!1;for(var a=0;a=0;--n)this.isUpperCase(e.charAt(n))&&(t.push(e.substring(n)),e=e.substring(0,n));return 0!==e.length&&t.push(e),t.reverse()},startsWith:function(e,t){return e.substr(0,t.length)===t},isUpperCase:function(e){return e>="A"&&e<="Z"},repeatChar:function(e,t){for(var n="",r=0;ri)return!1;for(var o=n.object.range[1];"."!==r.charAt(o)&&o=5760&&" ᠎              \ufeff".indexOf(e)>=0}function o(e){return"0123456789".indexOf(e)>=0}function a(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function s(e){return"01234567".indexOf(e)>=0}function u(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"}function c(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&e<="z"||e>="A"&&e<="Z"||e.charCodeAt(0)>=128&&g.NonAsciiIdentifierStart.test(e)}function l(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e.charCodeAt(0)>=128&&g.NonAsciiIdentifierPart.test(e)}function p(e){return"><(){}[],:*|?!=".indexOf(e)===-1&&!i(e)&&!r(e)}function f(e,t){}function d(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")}function h(e){var t,n,o,a,s,u=0,c=1,l=2;for(e=e.replace(/^\/\*\*?/,"").replace(/\*\/$/,""),t=0,n=e.length,o=u,a="";t=0&&B=G)return W=M.EOF;switch(e=V[B]){case'"':return W=u();case":":return t(),W=M.COLON;case",":return t(),W=M.COMMA;case"(":return t(),W=M.LPAREN;case")":return t(),W=M.RPAREN;case"[":return t(),W=M.LBRACK;case"]":return t(),W=M.RBRACK;case"{":return t(),W=M.LBRACE;case"}":return t(),W=M.RBRACE;case".":if(t(),B":return t(),W=M.GT;case"*":return t(),W=M.STAR;case"|":return t(),W=M.PIPE;case"?":return t(),W=M.QUESTION;case"!":return t(),W=M.BANG;case"=":return t(),W=M.EQUAL;default:return W=o(e)?l():p(e)?d():M.ILLEGAL}}function m(e,t){f(W===e,t||"consumed token not matched"),h()}function g(e){if(W!==e)throw"unexpected token";h()}function y(){var e;if(m(M.LPAREN,"UnionType should start with ("),e=[],W!==M.RPAREN)for(;;){if(e.push(k()),W===M.RPAREN)break;g(M.PIPE)}return m(M.RPAREN,"UnionType should end with )"),{type:L.UnionType,elements:e}}function x(){var e;for(m(M.LBRACK,"ArrayType should start with ["),e=[];W!==M.RBRACK;){if(W===M.REST){m(M.REST),e.push({type:L.RestType,expression:k()});break}e.push(k()),W!==M.RBRACK&&g(M.COMMA)}return g(M.RBRACK),{type:L.ArrayType,elements:e}}function b(){var e=Q;if(W===M.NAME||W===M.STRING)return h(),e;if(W===M.NUMBER)return m(M.NUMBER),String(e);throw"unexpected token"}function _(){var e;return e=b(),W===M.COLON?(m(M.COLON),{type:L.FieldType,key:e,value:k()}):{type:L.FieldType,key:e,value:null}}function w(){var e;if(m(M.LBRACE,"RecordType should start with {"),e=[],W===M.COMMA)m(M.COMMA);else for(;W!==M.RBRACE;)e.push(_()),W!==M.RBRACE&&g(M.COMMA);return g(M.RBRACE),{type:L.RecordType,fields:e}}function E(){var e=Q;return g(M.NAME),{type:L.NameExpression,name:e}}function S(){var e=[];for(e.push(I());W===M.COMMA;)m(M.COMMA),e.push(I());return e}function C(){var e,t;return e=E(),W===M.DOT_LT||W===M.LT?(h(),t=S(),g(M.GT),{type:L.TypeApplication,expression:e,applications:t}):e}function T(){return m(M.COLON,"ResultType should start with :"),W===M.NAME&&"void"===Q?(m(M.NAME),{type:L.VoidLiteral}):k()}function D(){for(var e,t=[],n=!0,r=!1;W!==M.RPAREN;){if(W===M.REST&&(m(M.REST),r=!0),e=k(),e.type===L.NameExpression&&W===M.COLON&&(m(M.COLON),e={type:L.ParameterType,name:e.name,expression:k()}),W===M.EQUAL)m(M.EQUAL),e={type:L.OptionalType,expression:e},n=!1;else if(!n)throw"unexpected token";r&&(e={type:L.RestType,expression:e}),t.push(e),W!==M.RPAREN&&g(M.COMMA)}return t}function A(){var e,t,n,r,i;f(W===M.NAME&&"function"===Q,"FunctionType should start with 'function'"),m(M.NAME);try{g(M.LPAREN),e=!1,n=[],t=null,W!==M.RPAREN&&(W!==M.NAME||"this"!==Q&&"new"!==Q?n=D():(e="new"===Q,m(M.NAME),g(M.COLON),t=C(),W===M.COMMA&&(m(M.COMMA),n=D()))),g(M.RPAREN)}catch(e){}return r=null,W===M.COLON&&(r=T()),i={type:L.FunctionType,params:n,result:r},t&&(i.this=t,e&&(i.new=!0)),i}function P(){switch(W){case M.STAR:return m(M.STAR),{type:L.AllLiteral};case M.LPAREN:return y();case M.LBRACK:return x();case M.LBRACE:return w();case M.NAME:return"null"===Q?(m(M.NAME),{type:L.NullLiteral}):"undefined"===Q?(m(M.NAME),{type:L.UndefinedLiteral}):"function"===Q?A():C();default:throw"unexpected token"}}function k(){var e;return W===M.QUESTION?(m(M.QUESTION),W===M.COMMA||W===M.EQUAL||W===M.RBRACE||W===M.RPAREN||W===M.PIPE||W===M.EOF?{type:L.NullableLiteral}:{type:L.NullableType,expression:P(),prefix:!0}):W===M.BANG?(m(M.BANG),{type:L.NonNullableType,expression:P(),prefix:!0}):(e=P(),W===M.BANG?(m(M.BANG),{type:L.NonNullableType,expression:e,prefix:!1}):W===M.QUESTION?(m(M.QUESTION),{type:L.NullableType,expression:e,prefix:!1}):e)}function I(){var e,t;if(e=k(),W!==M.PIPE)return e;for(t=[e],m(M.PIPE);;){if(t.push(k()),W!==M.PIPE)break;m(M.PIPE)}return{type:L.UnionType,elements:t}}function F(){var e;return W===M.REST?(m(M.REST),{type:L.RestType,expression:I()}):(e=I(),W===M.EQUAL?(m(M.EQUAL),{type:L.OptionalType,expression:e}):e)}function O(e,t){var n;if(V=e,G=V.length,B=0,U=0,v||(V=V.split("")),h(),n=I(),t&&t.midstream)return{expression:n,index:U};if(W!==M.EOF)throw"not reach to EOF";return n}function N(e,t){var n;if(V=e,G=V.length,B=0,U=0,v||(V=V.split("")),h(),n=F(),t&&t.midstream)return{expression:n,index:U};if(W!==M.EOF){if(!(e&&e.length>0))throw"not reach to EOF";n.result={type:"UndefinedLiteral"}}return n}function j(e,t,n){var r,i,o;switch(e.type){case L.NullableLiteral:r="?";break;case L.AllLiteral:r="*";break;case L.NullLiteral:r="null";break;case L.UndefinedLiteral:r="undefined";break;case L.VoidLiteral:r="void";break;case L.UnionType:for(r=n?"":"(",i=0,o=e.elements.length;i=e)){if(!c(S[w])){if(!t||"["!==S[w])return;s=1}for(a=n();w0))return;s--}if("="===o&&(u=!0),u)n();else if("."!==o){if(!l(o))return a;a+=n()}else a+=n()}for(s&&"]"===S[w]&&(a+=n());a&&"."===a[a.length-1];)a=a.substring(0,a.length-1);return a}}function m(e){return"define"===e||"enum"===e||"extends"===e||"implements"===e||"param"===e||"return"===e||"this"===e||"type"===e||"typedef"===e||"throws"===e||"returns"===e||"property"===e||"augments"===e}function g(){var e,t,o="";for(t=!0;w=E)&&(f("@"===S[w]),i=o(),r={title:i,description:null},(i||(e("Missing or invalid title"),C))&&(u=a(i),!m(i)||(r.type=s(i,u),r.type||(e("Missing or invalid tag type"),C))))){if("param"===i||"property"===i)if(r.name=p(u,T&&"param"===i),r.name)"["===r.name.charAt(0)&&"]"===r.name.charAt(r.name.length-1)&&(r.name=r.name.substring(1,r.name.length-1),l={type:"OptionalType",expression:r.type},r.type=l);else if(e("Missing or invalid tag name"),!C)return;return c=d(t(S,w,u)),c&&(r.description=c),w=u,r}}function _(e,t){var n,r,i,o,a,s=[];if(void 0===t&&(t={}),S="boolean"==typeof t.unwrap&&t.unwrap?h(e):e,t.tags){if(!b(t.tags))throw new Error('Invalid "tags" parameter: '+t.tags);for(i={},o=0,a=t.tags.length;o1))break;return 1===r&&i(n.$$proto.typeObj.name,t)}function o(e,t,n){function r(e){return"undefined"===e?0:"Object"===e?1:i(e,n.getAllTypes())?2:3}var o=e.name,a=t.name;if(o||"NullLiteral"!==e.type&&"UndefinedLiteral"!==e.type&&"VoidLiteral"!==e.type||(o="undefined"),!a)return!1;var s=r(o);return 0===s?"undefined"!==a:1===s?"undefined"!==a&&"Object"!==a:2===s&&("undefined"!==a&&"Object"!==a&&!i(a,n.getAllTypes()))}var a=r("Object"),s="$$__JUST_DOTS__$$",u=/\$\$__JUST_DOTS__\$\$/g,c=/:undefined|:\{\}/g,l=function(e,t,r){this._typeObj=n(e),this.range=t,this.path=r};Object.defineProperty(l.prototype,"typeObj",{set:function(e){var t=e;"string"==typeof t&&(t=n(t)),this._typeObj=t},get:function(){return this._typeObj}}),l.revive=function(e){var t=new l;for(var n in e)e.hasOwnProperty(n)&&("typeSig"===n?t.typeObj=e[n]:t[n]=e[n]);return t};var p="gen~",f="~proto".length;return{Definition:l,GEN_NAME:p,isArrayType:function(e){return"ArrayType"===e.type||"TypeApplication"===e.type},isFunctionOrConstructor:function(e){return"FunctionType"===e.type},isPrototypeName:function(e){return"~proto"===e.substr(-f,f)},parameterizeArray:function(e){return{type:"ArrayType",elements:[e]}},createFunctionType:function(e,t,n){var r={type:"FunctionType",params:e,result:t};return n&&(r.params=r.params||[],r.params.push({type:"ParameterType",name:"new",expression:t})),r},extractArrayParameterType:function(e){var t;if("TypeApplication"===e.type){if("Array"!==e.expression.name)return e.expression;t=e.applications}else{if("ArrayType"!==e.type)return e;t=e.elements}return t.length>0?t[0]:a},extractReturnType:function(e){return e.result||("FunctionType"===e.type?this.UNDEFINED_TYPE:e)},parseJSDocComment:function(e){var n={};if(n.params={},e){var r=e.value;if(!r)return n;try{var i=doctrine.parse("/*"+r+"*/",{unwrap:!0,tags:["param","type","return"]}),o=i.tags;if(o)for(var a=0;a1&&"FunctionType"===e.result.type?{type:"NameExpression",name:s}:i.convertJsDocType(e.result,t,n,r)),c;case"TypeApplication":var l={type:e.type,expression:i.convertJsDocType(e.expression,t,n,r)};return e.applications&&(l.applications=e.applications.map(function(e){return i.convertJsDocType(e,t,n,r)})),l;case"ParameterType":return{type:e.type,name:o,expression:e.expression?i.convertJsDocType(e.expression,t,n,r):null};case"NonNullableType":case"OptionalType":case"NullableType":return{prefix:!0,type:e.type,expression:i.convertJsDocType(e.expression,t,n,r)};case"NameExpression":if(n&&t.isSyntheticName(o)){var p=u[o];if(p.$$fntype)return i.convertJsDocType(p.$$fntype,t,n,r);var f=[];return Object.keys(p).forEach(function(e){if("$$proto"!==e&&"$$isBuiltin"!==e){var o=p[e],a=r>0&&"NameExpression"===o.typeObj.type&&t.isSyntheticName(o.typeObj.name)&&!u[o.typeObj.name].$$fntype?{type:"NameExpression",name:s}:i.convertJsDocType(o.typeObj,t,n,r+1);f.push({type:"FieldType",key:e,value:a})}}),{type:"RecordType",fields:f}}if(u[o])return{type:"NameExpression",name:o};var d=o[0].toUpperCase()+o.substring(1);return u[d]?{type:"NameExpression",name:d}:a;case"FieldType":return{type:e.type,key:e.key,value:i.convertJsDocType(e.value,t,n,r)};case"RecordType":if(n)return{type:e.type,params:e.fields.map(function(e){return i.convertJsDocType(e,t,n,r+1)})};for(var h={},m=0;m0?this.convertToSimpleTypeName(e.expressions[0]):"Object";case"RecordType":return"Object";case"FieldType":return this.convertToSimpleTypeName(e.value);case"NonNullableType":case"OptionalType":case"NullableType":case"ParameterType":return this.convertToSimpleTypeName(e.expression)}},styleAsProperty:function(e,t){return t?''+e+"":e},styleAsType:function(e,t){return t?''+e+"":e},styleAsOther:function(e,t){return t?''+e+"":e},createReadableType:function(e,t,n,r,i){if(n){if(e=this.convertJsDocType(e,t,!0),i)return this.convertToHtml(e,0);var o=doctrine.type.stringify(e,{compact:!0});return o=o.replace(u,"{...}"),o=o.replace(c,""),o=this.limitReadableLength(o,80)}return e=this.extractReturnType(e),this.createReadableType(e,t,!0,r,i)},limitReadableLength:function(e,t){if(e&&e.length>t&&0==e.indexOf("{")&&e.lastIndexOf("}")==e.length-1){for(var n="",r=e.indexOf(",");r>0&&!(n.length+r>t);)n+=e.substring(0,r+1),e=e.substring(r+1),r=e.indexOf(",");return n+="...}"}return e},convertToHtml:function(t,n){var r,i=this,o=[];switch(n=n||0,t.type){case"NullableLiteral":return this.styleAsType("?",!0);case"AllLiteral":return this.styleAsType("*",!0);case"NullLiteral":return this.styleAsType("null",!0);case"UndefinedLiteral":return this.styleAsType("undefined",!0);case"VoidLiteral":return this.styleAsType("void",!0);case"NameExpression":var a=t.name===s?"{...}":t.name;return this.styleAsType(a,!0);case"UnionType":return o=[],t.expressions&&t.expressions.forEach(function(e){o.push(i.convertToHtml(e,n+1))}),"( "+o.join(", ")+" )";case"TypeApplication":t.applications&&t.applications.forEach(function(e){o.push(i.convertToHtml(e,n))});var u="Array"===t.expression.name;return u||(r=this.convertToHtml(t.expression,n)+".<"),r+=o.join(","),r+=u?"[]":">";case"ArrayType":return t.elements&&t.elements.forEach(function(e){o.push(i.convertToHtml(e,n+1))}),o.join(", ")+"[]";case"NonNullableType":return"!"+this.convertToHtml(t.expression,n);case"OptionalType":return this.convertToHtml(t.expression,n)+"=";case"NullableType":return"?"+this.convertToHtml(t.expression,n);case"RestType":return"..."+this.convertToHtml(t.expression,n);case"ParameterType":return this.styleAsProperty(t.name,!0)+(t.expression.name===s?"":":"+this.convertToHtml(t.expression,n));case"FunctionType":var c,l=!1;t.params&&t.params.forEach(function(e){"this"===e.name?(l=!0,c=e.expression):"new"===e.name?(l=!0,c=e.expression):o.push(i.convertToHtml(e,n+1))}),!c&&t.result&&(c=t.result);var p;return p=c&&"UndefinedLiteral"!==c.type&&"undefined"!==c.name?this.convertToHtml(c,n+1):"",r=this.styleAsOther(l?"new ":"function",!0),l&&(r+=p),r+="("+o.join(",")+")",!l&&p&&(r+="→"+p),r;case"RecordType":return t.fields&&t.fields.length>0?(t.fields.forEach(function(t){o.push(e.repeatChar("  ",n+1)+i.convertToHtml(t,n+1))}),"{
"+o.join(",
")+"
"+e.repeatChar("  ",n)+"}"):"{ }";case"FieldType":return this.styleAsProperty(t.key,!0)+":"+this.convertToHtml(t.value,n)}},leftTypeIsMoreGeneral:o,isEmpty:i,ensureTypeObject:n,OBJECT_TYPE:a,UNDEFINED_TYPE:r("undefined"),NUMBER_TYPE:r("Number"),BOOLEAN_TYPE:r("Boolean"),STRING_TYPE:r("String"),ARRAY_TYPE:r("Array"),FUNCTION_TYPE:r("Function")}}),define("sap/watt/lib/orion/javascript/esprima/indexFiles/ecma5Index",[],function(){return{"!name":"ecma5","!define":{Error:{name:{"!type":"String"},message:{"!type":"String"},stack:{"!type":"String"},"!proto":"Object"},Error_obj:{"!type":"fn(err?: Error)",prototype:"Error"},RegExp:{source:{"!type":"String"},global:{"!type":"Boolean"},ignoreCase:{"!type":"Boolean"},multiline:{"!type":"Boolean"},lastIndex:{"!type":"Boolean"},exec:{"!type":"fn(str: String) -> [String]"},test:{"!type":"fn(str: String) -> Boolean"},"!proto":"Object"},RegExp_obj:{"!type":"fn(val?: RegExp)",prototype:"RegExp"},Date:{toDateString:{"!type":"fn() -> String"},toTimeString:{"!type":"fn() -> String"},toUTCString:{"!type":"fn() -> String"},toISOString:{"!type":"fn() -> String"},toJSON:{"!type":"fn(key: String) -> Object"},toLocaleDateString:{"!type":"fn() -> String"},toLocaleTimeString:{"!type":"fn() -> String"},getTime:{"!type":"fn() -> Number"},getTimezoneOffset:{"!type":"fn() -> Number"},getDay:{"!type":"fn() -> Number"},getUTCDay:{"!type":"fn() -> Number"},getFullYear:{"!type":"fn() -> Number"},getUTCFullYear:{"!type":"fn() -> Number"},getHours:{"!type":"fn() -> Number"},getUTCHours:{"!type":"fn() -> Number"},getMinutes:{"!type":"fn() -> Number"},getUTCMinutes:{"!type":"fn() -> Number"},getSeconds:{"!type":"fn() -> Number"},getUTCSeconds:{"!type":"fn() -> Number"},getMilliseconds:{"!type":"fn() -> Number"},getUTCMilliseconds:{ "!type":"fn() -> Number"},getMonth:{"!type":"fn() -> Number"},getUTCMonth:{"!type":"fn() -> Number"},getDate:{"!type":"fn() -> Number"},getUTCDate:{"!type":"fn() -> Number"},setTime:{"!type":"fn() -> Number"},setTimezoneOffset:{"!type":"fn() -> Number"},setDay:{"!type":"fn(dayOfWeek: Number) -> Number"},setUTCDay:{"!type":"fn(dayOfWeek: Number) -> Number"},setFullYear:{"!type":"fn(year: Number, month?: Number, date?: Number) -> Number"},setUTCFullYear:{"!type":"fn(year: Number, month?: Number, date?: Number) -> Number"},setHours:{"!type":"fn(hour: Number, min?: Number, sec?: Number, ms?: Number) -> Number"},setUTCHours:{"!type":"fn(hour: Number, min?: Number, sec?: Number, ms?: Number) -> Number"},setMinutes:{"!type":"fn(min: Number, sec?: Number, ms?: Number) -> Number"},setUTCMinutes:{"!type":"fn(min: Number, sec?: Number, ms?: Number) -> Number"},setSeconds:{"!type":"fn(sec: Number, ms?: Number) -> Number"},setUTCSeconds:{"!type":"fn(sec: Number, ms?: Number) -> Number"},setMilliseconds:{"!type":"fn(ms: Number) -> Number"},setUTCMilliseconds:{"!type":"fn(ms: Number) -> Number"},setMonth:{"!type":"fn(month: Number, date?: Number) -> Number"},setUTCMonth:{"!type":"fn(month: Number, date?: Number) -> Number"},setDate:{"!type":"fn(date: Number) -> Number"},setUTCDate:{"!type":"fn(date: Number) -> Number"},"!proto":"Object"},Date_obj:{"!type":"fn(val?: Date)",now:{"!type":"fn() -> Number"},parse:{"!type":"fn(dateString: String) -> Number"},UTC:{"!type":"fn(year: Number, month: Number, date?: Number, hrs?: Number, min?:Number, sec?:Number, ms?:Number) -> Number"},prototype:"Date"},Boolean:{"!proto":"Object"},Boolean_obj:{"!type":"fn(val?: Boolean)",prototype:"Boolean"},Array:{concat:{"!type":"fn(first: Array, rest: Array) -> Array"},join:{"!type":"fn(separator: Object) -> String"},length:{"!type":"Number"},pop:{"!type":"fn() -> Object"},push:{"!type":"fn(vals: Object) -> Object"},reverse:{"!type":"fn() -> Array"},shift:{"!type":"fn() -> Object"},slice:{"!type":"fn(start: Number, deleteCount: Number, items: Object) -> Array"},splice:{"!type":"fn(start: Number, end: Number) -> Array"},sort:{"!type":"fn(sorter?: Object) -> Array"},unshift:{"!type":"fn(items: Object) -> Number"},indexOf:{"!type":"fn(searchElement: Object, fromIndex?: Number) -> Number"},lastIndexOf:{"!type":"fn(searchElement: Object, fromIndex?: Number) -> Number"},every:{"!type":"fn(callbackFn: fn(elt: Object), thisArg?: Object) -> Boolean"},some:{"!type":"fn(callbackFn: fn(elt: Object), thisArg?: Object) -> Boolean"},forEach:{"!type":"fn(callbackFn: fn(elt: Object), thisArg?: Object) -> Object"},map:{"!type":"fn(callbackFn: fn(elt: Object) -> Object, thisArg?: Object) -> Array"},filter:{"!type":"fn(callbackFn: fn(elt: Object) -> Boolean, thisArg?: Object) -> Array"},reduce:{"!type":"fn(callbackFn: fn(elt: Object) -> Object, initialValue?: Object) -> Array"},reduceRight:{"!type":"fn(callbackFn: fn(elt: Object) -> Object, initialValue?: Object) -> Array"},"!proto":"Object"},Array_obj:{"!type":"fn(val?: Array)",isArray:{"!type":"fn(obj: Object) -> Boolean"},prototype:"Array"},Function:{apply:{"!type":"fn(func: fn(), argArray?: Array) -> Object"},arguments:{"!type":"Arguments"},bind:{"!type":"fn(func: fn(), args: Object) -> Object"},call:{"!type":"fn(func: fn(), args: Object) -> Object"},caller:{"!type":"Function"},length:{"!type":"Number"},name:{"!type":"String"},"!proto":"Object"},Function_obj:{"!type":"fn()",prototype:"Function"},Arguments:{callee:{"!type":"Function"},length:{"!type":"Number"},"!proto":"Object"},JSON:{parse:{"!type":"fn(str: String) -> Object"},stringify:{"!type":"fn(json: Object) -> String"},"!proto":"Object"},Math:{E:{"!type":"Number"},LN2:{"!type":"Number"},LN10:{"!type":"Number"},LOG2E:{"!type":"Number"},LOG10E:{"!type":"Number"},PI:{"!type":"Number"},SQRT1_2:{"!type":"Number"},SQRT2:{"!type":"Number"},abs:{"!type":"fn(val: Number) -> Number"},acos:{"!type":"fn(val: Number) -> Number"},asin:{"!type":"fn(val: Number) -> Number"},atan:{"!type":"fn(val: Number) -> Number"},atan2:{"!type":"fn(val1: Number, val2: Number) -> Number"},ceil:{"!type":"fn(val: Number) -> Number"},cos:{"!type":"fn(val: Number) -> Number"},exp:{"!type":"fn(val: Number) -> Number"},floor:{"!type":"fn(val: Number) -> Number"},log:{"!type":"fn(val: Number) -> Number"},max:{"!type":"fn(val1: Number, val2: Number) -> Number"},min:{"!type":"fn(val1: Number, val2: Number) -> Number"},pow:{"!type":"fn(x: Number, y: Number) -> Number"},random:{"!type":"fn() -> Number"},round:{"!type":"fn(val: Number) -> Number"},sin:{"!type":"fn(val: Number) -> Number"},sqrt:{"!type":"fn(val: Number) -> Number"},tan:{"!type":"fn(val: Number) -> Number"},"!proto":"Object"},Number:{toExponential:{"!type":"fn(digits: Number) -> String"},toFixed:{"!type":"fn(digits: Number) -> String"},toPrecision:{"!type":"fn(digits: Number) -> String"},"!proto":"Object"},Number_obj:{"!type":"fn(val?: Number)",MAX_VALUE:"Number",MIN_VALUE:"Number",prototype:"Number"},Object:{toString:{"!type":"fn() -> String"},toLocaleString:{"!type":"fn() -> String"},valueOf:{"!type":"fn() -> Object"},hasOwnProperty:{"!type":"fn(property: String) -> Boolean"},isPrototypeOf:{"!type":"fn(object: Object) -> Boolean"},propertyIsEnumerable:{"!type":"fn(property: String) -> Boolean"},prototype:{"!type":"Object"}},Object_obj:{"!type":"fn(val?: Object)",create:{"!type":"fn(proto: Object, propertiesObject?: Object) -> Object"},defineProperty:{"!type":"fn(obj: Object, prop: String, descriptor: Object) -> Object"},defineProperties:{"!type":"fn(obj: Object, props: Object) -> Object"},getOwnPropertyDescriptor:{"!type":"fn(obj: Object, prop: String) -> Object"},keys:{"!type":"fn(obj: Object) -> Array"},getOwnPropertyNames:{"!type":"fn(obj: Object) -> Array"},getPrototypeOf:{"!type":"fn(obj: Object) -> Object"},prototype:"Object"},String:{charAt:{"!type":"fn(index: Number) -> String"},charCodeAt:{"!type":"fn(index: Number) -> Number"},concat:{"!type":"fn(str: String) -> String"},indexOf:{"!type":"fn(searchString: String, start?: Number) -> Number"},lastIndexOf:{"!type":"fn(searchString: String, start?: Number) -> Number"},length:{"!type":"Number"},localeCompare:{"!type":"fn(str: String) -> Number"},match:{"!type":"fn(regexp: String) -> Boolean"},replace:{"!type":"fn(searchValue: String, replaceValue: String) -> String"},search:{"!type":"fn(regexp: String) -> String"},slice:{"!type":"fn(start: Number, end: Number) -> String"},split:{"!type":"fn(separator: String, limit?: Number) -> [String]"},substring:{"!type":"fn(start: Number, end?: Number) -> String"},toLocaleUpperCase:{"!type":"fn() -> String"},toLowerCase:{"!type":"fn() -> String"},toLocaleLowerCase:{"!type":"fn() -> String"},toUpperCase:{"!type":"fn() -> String"},trim:{"!type":"fn() -> String"},"!proto":"Object"},String_obj:{"!type":"fn(val?: Object)",fromCharCode:{"!type":"fn(num1: Number, rest: Number) -> String"},prototype:"String","!proto":"Object"}},decodeURI:{"!type":"fn(uri: String) -> String"},encodeURI:{"!type":"fn(uri: String) -> String"},eval:{"!type":"fn(toEval: String) -> Object"},parseInt:{"!type":"fn(str: String, radix?: Number) -> Number"},parseFloat:{"!type":"fn(str: String, radix?: Number) -> Number"},Math:{"!type":"Math"},JSON:{"!type":"JSON"},Object:"Object_obj",Function:"Function_obj",Array:"Array_obj",Boolean:"Boolean_obj",Number:"Number_obj",Date:"Date_obj",RegExp:"RegExp_obj",String:"String_obj",Error:"Error_obj",undefined:{"!type":"?"},isNaN:{"!type":"fn(num: Number) -> Boolean"},isFinite:{"!type":"fn(num: Number) -> Boolean"},NaN:{"!type":"number"},Infinity:{"!type":"number"},decodeURIComponent:{"!type":"fn(encodedURIString: String) -> String"},encodeURIComponent:{"!type":"fn(decodedURIString: String) -> String"},this:{"!type":""}}}),define("sap/watt/lib/orion/javascript/esprima/ui5/moduleEnvironment",["../typeUtils","../proposalUtils","../typeEnvironment"],function(e,t){function n(){return i}function r(){return{_allModules:i,getModules:function(){return this._allModules},reset:function(){for(var e in this._allModules)this._allModules.hasOwnProperty(e)&&delete this._allModules[e]},findModuleComponents:function(e,t){if(this._allModules.hasOwnProperty(e)){var n=this._allModules[e];if(t&&n.length>1){n.sort();var r=null,i=n.filter(function(e){return r&&0===e.indexOf(r)?"."!==e.charAt(r.length):(r=e,!0)});return Q(i)}return Q(n)}return Q.reject(" not found.")},updateModule:function(e,t,n){var r=t.substring(t.lastIndexOf("/")+1),i=n.provided,a=i.$$typeName?i.$$typeName:t.replace(/\//g,".")+".type";e.provided[r]=new o.Definition({type:"NameExpression",name:a},null,null),e.types[a]=i;for(var s in n.types)n.types.hasOwnProperty(s)&&!e.types.hasOwnProperty(s)&&(e.types[s]=n.types[s]);for(var u in n.templates)n.templates.hasOwnProperty(u)&&!e.templates.hasOwnProperty(u)&&(e.templates[u]=n.templates[u])},findModuleByComponent:function(e,n,r){var i=this;return r.createEnvironment({buffer:n.value||"",uid:"local",offset:0}).then(function(n){var r=[];for(var o in i._allModules)if(i._allModules.hasOwnProperty(o)&&i._allModules[o]&&i._allModules[o].length>0)for(var a=i._allModules[o],s=0;s=65&&t<=90)}function a(){return T+D++}function s(e){return e&&(A.test(e)||"["===e.slice(0,1)||"+"===e.slice(0,1))}function u(e){var t=null;return t="FunctionType"===e.typeObj.type?doctrine.type.stringify(e.typeObj,{compact:!0}):e.typeObj.name}function c(e,t,n){function r(e){e=e.substring(3,e.length);for(var t=e.replace(/\s+/g,""),r="";")"!==t.slice(0,1)&&t.indexOf(")")>=0;){var i=t.indexOf(":"),o=t.slice(0,i),a="?"===o[o.length-1];a&&(o=o.slice(0,o.length-1)),t=t.slice(i+1,t.length);var s=null,c=null;"fn"===t.slice(0,2)?(c=t.indexOf(")"),s=t.indexOf(",",c)):s=t.indexOf(",")",t.indexOf(")",c+1)):t.indexOf("->"),l=f!==-1?f-1:t.length-1}var d=t.slice(0,l),h=p(n,d);r+=o+":"+u(h),a&&(r+="="),s!==-1?(r+=",",t=t.slice(l+1,t.length)):t=t.slice(l,t.length)}return{args:r,remaining:t.slice(1,t.length)}}function i(e){return e=e.substring(2,e.length),u(p(n,e))}var a,s=r(e),c=s.remaining;""!==c?a=i(c):t&&(a=t);var l=!c&&a&&o(a),f="function(";return l&&(f+="new:"+a,s.args&&(f+=",")),f+=s.args+"):"+a}function l(e,t){return c(e,t,{})}function p(e,n,r,o){function u(n,r,o){var s,u={};o&&(u.$$library=o);for(var c in n)if(i(n,c))if("!type"===c)s=p(e,n[c],r),t.isFunctionOrConstructor(s.typeObj)&&(u.$$fntype=s.typeObj,s=r?new t.Definition(r):new t.Definition(a()));else if("!proto"===c)u.$$proto=p(e,n[c]);else if("!description"===c)u.$$description=n[c];else if("!helpDescription"===c)u.$$helpDescription=n[c];else if("!category"===c)u.$$category=n[c];else if("!static"===c)u.$$static=n[c];else if("!module"===c)u.$$module=n[c];else if("!constructorDescription"===c)u.$$constructorDescription=n[c];else if("!url"===c||"!stdProto"===c||"!effects"===c||"!doc"===c);else{if("!"===c[0])throw"didn't handle special property "+c;"prototype"===c?(u[c]=p(e,n[c]),u.$$prototype=p(e,n[c]),u.$$newtype=u.$$prototype):u[c]=p(e,n[c],void 0,o)}if(u.$$prototype&&u.$$fntype&&"string"==typeof n.prototype){var l=u.$$prototype.typeObj.name,f=u.$$fntype;f.result.name=l}return s||(s=r?new t.Definition(r):new t.Definition(a())),{propInfo:u,def:s}}if("string"==typeof n){if(C[n])return new t.Definition(C[n]);if("?"===n)return"undefined"===r?new t.Definition({name:"undefined",type:"NameExpression"}):r?new t.Definition(r):new t.Definition("Object");if(""===n)return new t.Definition("Global");if("$"===n[0])return new t.Definition(r);if("fn"===n.slice(0,2))return new t.Definition(c(n,r,e));if("["===n[0])return new t.Definition("Array");if("!custom"===n.slice(0,7)||"!this"===n.slice(0,5)||"!0"===n.slice(0,2))return new t.Definition("Object");if("!"===n.slice(0,1))throw"unhandled special case "+n;return"+"===n.slice(0,1)&&(n=n.slice(1,n.length)+"..prototype"),new t.Definition(n)}var l=u(n,r,o),f=l.def.typeObj.name;if(f&&"Global"!==f&&!s(n["!type"]))if("Object"===f){var d={};for(var h in l.propInfo)i(l.propInfo,h)&&(d["$_$"+h]=l.propInfo[h]);d.$$isBuiltin=!0,e[f]=d}else if(e[f]){l.propInfo.$$isBuiltin=!0;for(var m in l.propInfo)e[f][m]||(e[f][m]=l.propInfo[m])}else l.propInfo.$$isBuiltin=!0,e[f]=l.propInfo,w.addModule(l.propInfo,f);return l.def}function f(e,t){var n={},r=p(n,e,t);return{def:r,typeInfo:n}}function d(e,t,n,r){var o;for(o in e)if(i(e,o))if("!name"===o||"!version"===o);else if("!define"===o){var a=e[o];for(var s in a)i(a,s)&&p(n,a[s],s,r)}else if("string"==typeof e[o]){var u=e[o],c={"!type":u};t[o]=p(n,c,o,r)}else{var l=e[o];t[o]=p(n,l,o,r)}}function h(){if(P)return Q();var e=new Q.defer;return d(n,_,S),e.resolve(),P=!0,e.promise}function m(e,t){try{d(e,_,S,t)}catch(e){return!1}return!0}function g(e,t){var n={},r=Object.getPrototypeOf(e.Global);return Object.keys(r).forEach(function(e){n[e]=r[e]}),Object.keys(t.globals).forEach(function(e){n[e]=t.globals[e]}),b.prototype=n,e.Global=new b,b.prototype=_,Object.keys(t.types).forEach(function(n){"Global"!==n&&(e[n]=t.types[n])}),e}function v(t,n){var r=new Q.defer,i=k[n];if(i)r.resolve(i);else{i={globals:{},types:{}};var o;if("browser"===n)o="./indexFiles/browserIndex";else{if("node"!==n)throw"unknown library name "+n;r.resolve(i)}o&&e([o],function(e){d(e,i.globals,i.types),k[n]=i,r.resolve(i)})}var a=r.promise.then(function(e){return g(t,e)});return a}function y(e,t){var n={globals:{},types:{}};d(e,n.globals,n.types),g(t,n)}function x(){for(var e in S)delete S[e];D=0,d(n,_,S),w.reset()}var b=function(){},_={};b.prototype=_;var w=r,E=function(e){this.Global=new b},S={};E.prototype=S;var C={number:"Number",bool:"Boolean",string:"String"},T=t.GEN_NAME+"index~",D=0,A=/^[_$a-zA-Z\xA0-\uFFFF]([_$a-zA-Z0-9\.\xA0-\uFFFF])*$/;_.$$proto=new t.Definition("Object");var P=!1,k={};return{Types:E,addLibrary:v,ternSig2ClosureSig:l,init:h,parseType:f,addIndexData:y,loadIndexInfo:m,addIndexInfo:d,reset:x}}),define("sap/watt/lib/orion/javascript/esprima/typeEnvironment",["./typeUtils","./typesFromIndexFile"],function(e,t){function n(e,t){return t in e&&(Object.hasOwnProperty(t)?!e.hasOwnProperty(t):!Object.prototype.hasOwnProperty(t)||e.hasOwnProperty(t))}function r(e,n){var r=t.init(),i=r.then(function(){var r=new t.Types;n&&n.forEach(function(e){t.addIndexData(e,r)});var i=null;return i="Window"===e?t.addLibrary(r,"browser"):"Module"===e?t.addLibrary(r,"node"):Q(r)});return i}function i(t){function i(e,t,n,r){var o=n[t],a=n.$$proto;return o?r||"$$fntype"===t?o:o.typeObj:a?i(e,t,e.lookupQualifiedType(a.typeObj.name),r):null}var o=t.buffer,a=t.uid,s=t.worker,u=t.offset,c=t.indexer,l=t.globalObjName,p=t.indexData,f=t.findRef;u||(u=o.length+1);var d=[];if(t.comments)for(var h=0;h0?e+".":e},newObject:function(t,n){this.newScope(),t=t?t:this.newName(),this._allTypes[t]={$$proto:new e.Definition("Object",n,this.uid)};var r=e.createNameType(t);return this.addVariable("this",null,r,n),r},newFleetingObject:function(t,n){var r=t?t:this.newName();return this._allTypes[r]={$$proto:new e.Definition("Object",n,this.uid)},e.createNameType(r)},con:function(t,n){var r=t?t:this.newName();return this._allTypes[r]={$$proto:new e.Definition("Object",n,this.uid)},r},popScope:function(){var e=this._scopeStack.pop();return e},scope:function(e){if("string"==typeof e)return e;if(!e||!e.extras.inferredTypeObj)return this._scopeStack[this._scopeStack.length-1];var t=e.extras.inferredTypeObj;if("NameExpression"===t.type)return t.name;if("FunctionType"===t.type){if(t.params)for(var n=0;n=65&&t<=90)}function a(e){return e?"Identifier"===e.type?e:"MemberExpression"===e.type?e.computed?"Literal"===e.property.type&&"string"==typeof e.property.value?e.property:e:a(e.property):"ArrayExpression"===e.type?e:null:null}function s(e){if(e){if("Identifier"===e.type)return e.name;if("MemberExpression"===e.type){var t=s(e.object),n=s(e.property);return t.length>0&&n.length>0?t+"."+n:t+n}return"CallExpression"===e.type?s(e.callee):""}return""}function u(e,t){var n,r;if(t&&O(t.global))for(n=0;n0){var c=s[u].indexOf(":");r=c>=0?s[u].substring(0,c).trim():s[u].trim(),e.lookupTypeObj(r)||e.addOrSetVariable(r,null,null,o)}break}}}function c(e){if(e.indexer){var t=e.indexer.retrieveGlobalSummaries();for(var n in t)t.hasOwnProperty(n)&&e.mergeSummary(t[n],e.globalTypeName())}}function l(e){var t=e.body;return t&&t.length>=1&&t[0]&&"ExpressionStatement"===t[0].type&&t[0].expression&&"CallExpression"===t[0].expression.type&&"define"===t[0].expression.callee.name?(console.log(".........detected as a AMD module"),t[0].expression):null}function p(e){var t=e.body;if(t&&t.length>=1)for(var n=0;n=1&&n[0]){var r=n[0];if(r&&"ExpressionStatement"===r.type&&r.expression&&"CallExpression"===r.expression.type&&r.expression.callee&&r.expression.callee.property&&"define"===r.expression.callee.property.name){for(var i=r.expression.callee,o="define";i.object;)o=i.object.property?i.object.property.name+"."+o:i.object.name+"."+o,i=i.object;if("sap.ui.define"===o){console.log(t.uid+" is detected as a SAPUI5 asynchronous control/module");var a={};if(r.expression.arguments&&Array.isArray(r.expression.arguments)&&r.expression.arguments.length>1&&r.expression.arguments[1].body&&r.expression.arguments[1].body.body&&Array.isArray(r.expression.arguments[1].body.body)&&r.expression.arguments[1].body.body.length>1&&r.expression.arguments[1].body.body[1].argument&&r.expression.arguments[1].body.body[1].argument.arguments&&Array.isArray(r.expression.arguments[1].body.body[1].argument.arguments)&&r.expression.arguments[1].body.body[1].argument.arguments.length>1&&r.expression.arguments[1].body.body[1].argument.arguments[1].properties){a=r.expression.arguments[1].body.body[1].argument.arguments[1];var s=r.expression.arguments[1].body.body[1].argument.arguments[0].value}return{moduleId:s,expression:r.expression,node:a}}return null}}return null}function d(e,t){var n,r,i=e.body;if(i&&i.length>=1)for(var o=0;o0){if(p[0].value){n=p[0].value;var f=n.split(".");r=f[f.length-1]}console.log("ModuleId : "+n+" module name "+r)}}}}}if("ExpressionStatement"===i[o].type&&i[o].hasOwnProperty("expression")&&i[o].expression&&"AssignmentExpression"===i[o].expression.type&&i[o].expression.left.object&&"="===i[o].expression.operator&&(a=i[o].expression,a.left.property&&"Identifier"===a.left.property.type&&a.left.property.name===r)){c=a.left,l=r;for(var d=[a.left.property];c.object;)c.object.property?(l=c.object.property.name+"."+l,d.unshift(c.object.property)):(l=c.object.name+"."+l,d.unshift(c.object)),c=c.object;if(n===l&&a.right&&("ObjectExpression"===a.right.type||"FunctionExpression"===a.right.type||"CallExpression"===a.right.type))return console.log((n||"Target file ")+" is detected as a SAPUI5 control/module"), {node:a.right,moduleScope:d,left:a.left,moduleId:n,typeObj:{type:"NameExpression",name:"Object"}}}if(i[o]&&"ExpressionStatement"===i[o].type&&i[o].expression&&"CallExpression"===i[o].expression.type&&"MemberExpression"===i[o].expression.callee.type&&i[o].expression.callee.property&&"Identifier"===i[o].expression.callee.property.type&&"extend"===i[o].expression.callee.property.name){d=[];var h=i[o].expression;if(h.hasOwnProperty("arguments")&&h.arguments&&2===h.arguments.length&&"ObjectExpression"===h.arguments[1].type){for(var m=h.arguments[0].value.split(".");m.length>0;)1===m.length?d.push({name:m[0],isConstructor:!0}):d.push({name:m[0]}),m.splice(0,1);return console.log((n||"Target file ")+" is detected as a SAPUI5 control/module"),{node:h.arguments[1],moduleScope:d,moduleId:n}}}}return null}function h(e,t){for(var n;t.length>0&&t[0].range[0]0&&(e.extras||(e.extras={}),n.indexer&&e.extras.amdDefn)){var a=e.extras.amdDefn.arguments;if(a.length>1&&a[a.length-1]===e){var s=null;if(3===a.length&&"Literal"===a[0].type&&"ArrayExpression"===a[1].type?s=a[1].elements:2===a.length&&"ArrayExpression"===a[0].type&&(s=a[0].elements),s)for(r=0;r1&&o[o.length-1]===t){var a=null;if(3===o.length&&"Literal"===o[0].type&&"ArrayExpression"===o[1].type?a=o[1].elements:2===o.length&&"ArrayExpression"===o[0].type&&(a=o[0].elements),a&&e.length>0)for(i=0;i0&&r.comments[0].range[1]0;)r.comments.unshift(C.pop());break;case"FunctionDeclaration":case"FunctionExpression":var A;if(e.id?(i=e.id.name,A=e.id.range):e.extras.fname&&(i=r.SapUI5?e.extras.cname:e.extras.fname,A=e.range),v=[],e.params)for(u=0;u0){var R=m(e,r),L=g(R,e,r);for(u=0;u0){var z=R[u].indexOf("):");if(z>0){var q=R[u].substring(z+2);q&&(H.typeObj.$$template=L[u][q])}}}break;case"VariableDeclarator":e.id.name&&(e.id.extras||(e.id.extras={}),e.id.extras.isLHS=e.id.extras.isDecl=!0,e.init&&!e.init.extras&&(e.init.extras={}),e.init&&"FunctionExpression"===e.init.type?(e.init.extras.fname=e.id.name,e.init.extras.cname=r.getQualifiedName()+e.id.name,e.init.extras.fnameRange=e.id.range):(E=h(e,r.comments),_=t.parseJSDocComment(E),w=_.type&&t.convertJsDocType(_.type,r),e.extras.docRange=E.range,w&&(e.extras.inferredTypeObj=w,e.extras.jsdocType=w,r.addVariable(e.id.name,e.extras.target,w,e.id.range,E.range)))),r.pushName(e.id.name);break;case"AssignmentExpression":var $=a(e.left),X=r.getQualifiedName()+s(e.left);!$||"Identifier"!==$.type&&"Literal"!==$.type||($.extras||($.extras={}),"FunctionExpression"===e.right.type&&(e.right.extras||(e.right.extras={}),e.right.extras.appliesTo=$,e.right.extras.fname=$.name,e.right.extras.cname=X,e.right.extras.fnameRange=$.range,e.left.extras||(e.left.extras={})),E=h(e,r.comments),_=t.parseJSDocComment(E),w=_.type&&t.convertJsDocType(_.type,r),e.extras.docRange=E.range,w&&(e.extras.inferredTypeObj=w,e.extras.jsdocType=w,r.addVariable($.name,e.extras.target,w,$.range,E.range))),r.pushName(X);break;case"CatchClause":if(e.extras.inferredTypeObj=r.newScope(),e.param){e.param.extras||(e.param.extras={});var K=t.createNameType("Error");e.param.extras.inferredTypeObj=K,r.addVariable(e.param.name,e.extras.target,K,e.param.range)}break;case"MemberExpression":e.property&&(!e.computed||e.computed&&"Literal"===e.property.type&&"string"==typeof e.property.value)&&(e.property.extras||(e.property.extras={}),e.property.extras.target=e.object);break;case"CallExpression":if("define"===e.callee.name||"require"===e.callee.name){var J=e.arguments;J.length>1&&"FunctionExpression"===J[J.length-1].type&&"ArrayExpression"===J[J.length-2].type&&(J[J.length-1].extras||(J[J.length-1].extras={}),J[J.length-1].extras.amdDefn=e)}else if(!e.callee.hasOwnProperty("property")||"define"!==e.callee.property.name&&"require"!==e.callee.property.name)if(r.SapUIAmd&&e.callee.property&&"Identifier"===e.callee.property.type&&"extend"===e.callee.property.name&&"string"==typeof e.arguments[0].value){r.SapUIAmd.moduleId=r.SapUIAmd.moduleId||e.arguments[0].value,console.log("Module Id detected and variable added "+r.SapUIAmd.moduleId);var Y=r.newFleetingObject(e.arguments[0].value);r.addVariable(r.SapUIAmd.moduleId,e.extras.target,Y);var Z=e.arguments[1].properties;for(r.SapUIAmd.node=e.arguments[1],u=0;u1&&"FunctionExpression"===J[J.length-1].type&&"ArrayExpression"===J[J.length-2].type&&(J[J.length-1].extras||(J[J.length-1].extras={}),J[J.length-1].extras.amdDefn=e))}return e===r.defer&&(e.extras.associatedComment=h(e,r.comments),e.extras.inferredTypeObj=e.extras.inferredTypeObj||t.OBJECT_TYPE,e.extras.scope=r.scope(e.extras.target),e.body.extras.stop=!0),!0}function y(e){var t="";return e&&e.object?e.property&&"Identifier"===e.property.type&&(t=y(e.object)+"."+e.property.name):e&&e.name&&(t=e.name),t}function x(e){var t=y(e);if(t){var n={"sap.ui.controller":"sap.ui.core.mvc.Controller","sap.ui.jsview":"sap.ui.core.mvc.JSView"};for(var r in n){var i=n[r];if(0===t.indexOf(r)||0===t.indexOf(i))return i}if(0===t.indexOf("sap.")){var o=t.lastIndexOf(".extend");return o>0&&(t=t.substring(0,o)),t}}}function b(e){for(var t in e){var n=e[t];if("ObjectExpression"===n.type)return n}}function _(e,n){if(e.indexOf(".")!==-1||e.indexOf("/")!==-1)return null;var r=t.ensureTypeObject(e);return n.findType(r)?r:null}function w(e,n){if((n.indexer||n.nodeJSModule)&&"CallExpression"===e.type&&"Identifier"===e.callee.type&&"require"===e.callee.name&&1===e.arguments.length){var r=e.arguments[0];if("Literal"===r.type&&"string"==typeof r.value){if(n.nodeJSModule)return _(r.value,n);var i=n.indexer.retrieveSummary(r.value);if(i){var o,a;return"string"==typeof i.provided?a=o=i.provided:(a=o=n.newScope(),n.popScope()),n.mergeSummary(i,a),t.ensureTypeObject(o)}}}}function E(e,n){if(n.indexer&&"CallExpression"===e.type&&e.callee.property&&"Identifier"===e.callee.property.type&&"require"===e.callee.property.name&&1===e.arguments.length&&e.callee.object&&e.callee.object.object&&"sap"===e.callee.object.object.name&&e.callee.object.property&&"ui"===e.callee.object.property.name){var r=e.arguments[0];if("Literal"===r.type&&"string"==typeof r.value){var i=n.indexer.retrieveSummary(r.value);if(i){var o,a;return"string"==typeof i.provided?a=o=i.provided:(a=o=n.newScope(),n.popScope()),n.mergeSummary(i,a),t.ensureTypeObject(o)}}}}function S(e){if(!e)return null;var t,n,r,i=e.type;switch(i){case"BlockStatement":return e.body&&e.body.length>0?(r=e.body[e.body.length-1],"ReturnStatement"===r.type?r:S(r)):null;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"CatchClause":return S(e.body);case"IfStatement":return t=S(e.alternate),t||(t=S(e.consequent)),t;case"TryStatement":t=S(e.finalizer);var o=e.handlers;if(!t&&o)for(n=o.length-1;n>=0&&!(t=S(o[n]));n--);return t||(t=S(e.block)),t;case"SwitchStatement":var a=e.cases;if(a)for(n=a.length-1;n>=0&&!(t=S(a[n]));n--);return t;case"SwitchCase":return e.consequent&&e.consequent.length>0?(r=e.consequent[e.consequent.length-1],"ReturnStatement"===r.type?r:S(r)):null;case"ReturnStatement":return e;default:return null}}function C(e,n,i){var o="",a=[];if(e){var s=Object.keys(e);if(s&&s.length>0)for(var u=1;u=2&&n.inRange(o.offset,r.arguments[0].range,!0)&&(o.SapUIAmd&&r.arguments[1]==o.SapUIAmd.node?o.selectedProp={name:"new",type:o.SapUIAmd.node.extras.inferredTypeObj}:o.SapUI5&&r.arguments[1]==o.SapUI5.node&&(o.selectedProp={name:"new",type:o.SapUI5.node.extras.inferredTypeObj}));break;case"NewExpression":var c=o.getNewType(r.callee);if(!c){var x=o.getFnType(r.callee);x&&(c=t.extractReturnType(x))}r.extras.inferredTypeObj=c;break;case"ObjectExpression":for(p=r.properties,f=0;f>":case">>>":r.extras.inferredTypeObj=t.NUMBER_TYPE;break;case"&&":case"||":r.extras.inferredTypeObj=r.left.extras.inferredTypeObj;break;case"!==":case"!=":case"===":case"==":case"<":case"<=":case">":case">=":r.extras.inferredTypeObj=t.BOOLEAN_TYPE;break;default:r.extras.inferredTypeObj=t.OBJECT_TYPE}break;case"UpdateExpression":case"UnaryExpression":"!"===r.operator?r.extras.inferredTypeObj=t.BOOLEAN_TYPE:r.extras.inferredTypeObj=t.NUMBER_TYPE;break;case"FunctionDeclaration":case"FunctionExpression":if(o.popScope(),r.body){var V;if(r.body.extras.isConstructor)V=r.id?r.id.range:r.extras.fnameRange,o.addOrSetVariable(t.extractReturnType(r.extras.inferredTypeObj),r.extras.target,r.extras.inferredTypeObj,V);else{if(!r.extras.jsdocReturn){var G,W=S(r.body);G=W&&W.extras&&W.extras.inferredTypeObj?W.extras.inferredTypeObj:t.UNDEFINED_TYPE,o.updateReturnType(r.extras.inferredTypeObj,G)}var Q;r.id?(Q=r.id.name,V=r.id.range):r.extras.appliesTo&&(Q=r.extras.fname,V=r.extras.fnameRange),Q&&o.addOrSetVariable(Q,r.extras.target,r.extras.inferredTypeObj,V)}}if(r.id&&o.offset&&n.inRange(o.offset,r.id.range,!0)&&(o.selectedLocalId={name:r.id.name,range:r.id.range,type:r.extras.inferredTypeObj,scope:o.scope()}),r.params&&r.params.length>0&&o.offset)for(var H=0;H0&&(o+=", ");var u,c,l=r[s];"OptionalType"===l.type&&(l=l.expression,u=!0),"RestType"===l.type&&(l=l.expression,c=!0);var p=l.name||"arg"+s;c&&(p="..."+p),u&&(p="["+p+"]"),i.push({offset:n+o.length+1,length:p.length}),o+=p}return o+=")",{completion:o,positions:0===i.length?null:i}}function s(t,n,r,o){var a=function(e,t,r){if(e.extras||(e.extras={}),!r){if("Program"===e.type||"BlockStatement"===e.type&&i.inRange(n,e.range))throw"done";return t.pop(),!1}if(e.range&&i.inRange(n-1,e.range)||"Program"===e.type){if("Identifier"===e.type)throw"done";if(t.push(e),("FunctionDeclaration"===e.type||"FunctionExpression"===e.type)&&e.body&&i.isBefore(n,e.body.range))throw"done";if("MemberExpression"===e.type&&!e.property&&i.afterDot(n,e,o))throw"done";return!0}return!1},s=[];try{e.visit(t,s,a,a)}catch(e){if("done"!==e)throw e}var u;if(s&&s.length){for(var c=s.pop(),l=0;l0&&(l=l.substring(0,p)),o="Global"!=l?l+"."+n:n,c.$$description&&(i=c.$$description)}else{var f=r._allTypes[e+"."+n];f||(f=r._allTypes[n]),f&&f.$$category?(s=f.$$library,a=f.$$category,f.$$description&&(i=f.$$description),o=e+"."+n):c.$$fntype&&(a="function",s=c.$$library,c.$$description&&(i=c.$$description),o=0===e.indexOf("gen~")?t[n].path?n+" in "+t[n].path:n:e+"."+n)}if(a&&!i){var d=a.charAt(0).toUpperCase()+a.slice(1);i=d+" "+o}}return{category:a||"object",description:i,target:o,library:s}}function f(e,t,n,o,s,u,c,d,h,m){var g,v,y,x,b,_=t.lookupQualifiedType(e),w=_.$$proto;if(d||(d=100),_.$$isBuiltin&&!_.$$library&&t.worker&&!m.isAutoHint)return[];w&&f(w.typeObj.name,t,n,o,s,u,c,d-10,h,m),c["---dummy"+d]={proposal:"",description:"---------------------------------",relevance:d-1,style:"hr",unselectable:!0};var E=Object.getPrototypeOf(_),S=!Object.getPrototypeOf(E);for(g in _)if(_.hasOwnProperty(g)||!S&&E.hasOwnProperty(g)){if("$"===g.charAt(0)&&"$"===g.charAt(1))continue;if(x=w||0!==g.indexOf("$_$")?g:g.substring(3),"this"===x&&"member"===n)continue;if(!_[g].typeObj)continue;if(i.looselyMatches(s,x,o)){if(v=_[g].typeObj,y=t.findType(_[g].typeObj),_.$$library&&"class"===_.$$category){var C=t.findType(v);if(C&&"function"===C.$$category&&C.$$static)continue}var T=p(e,_,g,t);if(t._allTypes[v.name]&&t._allTypes[v.name].$$fntype&&(v=t._allTypes[v.name].$$fntype),"FunctionType"===v.type){b=a(x,v,u-1);var D=b.completion+" : "+r.createReadableType(v,t);c["$"+x]={proposal:b.completion,library:T.library,category:T.category,description:D,helpDescription:T.description,helpTarget:T.target,positions:b.positions,escapePosition:u+b.completion.length,relevance:d+5,style:"emphasis",overwrite:!0}}else c["$"+x]={proposal:x,relevance:d,library:T.library,category:T.category,description:l(x,v,t),helpDescription:T.description,helpTarget:T.target,style:"emphasis",overwrite:!0};if(m.ignoreSnippetProposals)continue;if(t.SapUIAmd)if(v.$$template){for(var A in v.$$template)if(v.$$template){console.log("...........Template came here from Summary: "+v.$$template);var P=h.createProposalFromTemplate(v.$$template,m,x);P&&(c["$~"+x]=P)}}else y&&y.$$template&&(console.log("...........Template came here from Summary: "+y.$$template),P=h.createProposalFromTemplate(y.$$template,m,x),P&&(c["$~"+x]=P));else{var k=h.getTemplate(e,x);k&&(P=h.createProposalFromTemplate(k,m,x),P&&(c["$~"+x]=P))}}}}function d(e,t,n,r){function i(e,n){return e.hasOwnProperty(n)&&0===n.indexOf(t)&&!r["$"+n]&&"$$proto"!==n&&"$$isBuiltin"!==n&&"$$fntype"!==n&&"$$newtype"!==n&&"$$prototype"!==n}function o(o){for(var u in o)if(i(o,u)){var p=o[u].typeObj;if(p&&"FunctionType"===p.type){var f=a(u,p,n-1);r[u]={proposal:c(t,f.completion),description:l(u,p,e),positions:f.positions,escapePosition:n+f.completion.length,relevance:-99,style:"noemphasis"},s=!0}else r[u]={proposal:c(t,u),description:l(u,p,e),relevance:-100,style:"noemphasis"},s=!0}}var s=!1,u=e.getAllTypes();for(var p in u)u[p].$$proto&&o(u[p]);s&&(r["---dummy"]={proposal:"",description:"Non-inferred proposals",relevance:-98,style:"noemphasis",unselectable:!0})}function h(e,t,n,o,s,u,c,f){var d,m,g=t.lookupQualifiedType(e);if(u||(u=160),g.$$library&&g.$$prototype&&!t.SapUIAmd){var v=t.findType(g.$$prototype.typeObj);v&&v.$$library&&h(g.$$prototype.typeObj.name,t,n,o,s,u,c,f)}for(d in g)if(g.hasOwnProperty(d)||hasOwnProperty(d)){if("$"===d.charAt(0)&&"$"===d.charAt(1))continue;if(m=0===d.indexOf("$_$")?d.substring(3):d,"this"===m&&"member"===n)continue;if(i.looselyMatches(f.prefix,m,!0)){var y=g[d].typeObj,x=t.findType(y);if(!x||!x.$$static)continue;var b=p(e,g,d,t);if(t._allTypes[y.name]&&t._allTypes[y.name].$$fntype&&(y=t._allTypes[y.name].$$fntype),"FunctionType"===y.type){var _=a(m,y,o-1),w=_.completion+" : "+r.createReadableType(y,t);if(s["$"+m]={proposal:_.completion,library:b.library,category:b.category,description:w,helpDescription:b.description,helpTarget:b.target,positions:_.positions,escapePosition:o+_.completion.length,relevance:u+5,style:"emphasis",overwrite:!0,isStatic:!0},f.ignoreSnippetProposals)continue;if(g.$$library&&t.SapUIAmd){var E=t.findType({type:"NameExpression",name:e+"#"+m});if(E&&E.$$template){console.log("...........Template came here from Summary: "+E.$$template);var S=c.createProposalFromTemplate(E.$$template,f,m);S&&(s["$~"+m]=S)}}else if(g.$$library){if(E=t.findType({type:"NameExpression",name:e})[m],!E)continue;E=t.findType(E.typeObj),E&&E.$$library&&E.$$static&&(S=c.createProposalFromTemplate(c.getTemplate(e,m),f,m),S&&(s["$~"+m]=S))}}else s["$"+m]={proposal:m,relevance:u,library:b.library,category:b.category,description:l(m,y,t),helpDescription:b.description,helpTarget:b.target,style:"emphasis",overwrite:!0,isStatic:!0}}}}function m(e,t){if("object"==typeof e)switch(e.type){case"NullableLiteral":case"AllLiteral":case"NullLiteral":case"UndefinedLiteral":case"VoidLiteral":return;case"NameExpression":return void t(e,t);case"ArrayType":m(e.expression,t);case"UnionType":return void(e.elements&&e.elements.forEach(function(e){m(e,t)}));case"RecordType":return void(e.fields&&e.fields.forEach(function(e){m(e,t)}));case"FieldType":return void m(e.expression,t);case"FunctionType":return e.params&&e.params.forEach(function(e){m(e,t)}),void(e.result&&m(e.result,t));case"ParameterType":return void m(e.expression,t);case"TypeApplication":e.applications&&e.applications.forEach(function(e){m(e,t)});case"RestType":case"NonNullableType":case"OptionalType":case"NullableType":return void m(e.expression,t)}}function g(e,t,n){var r=t[e],i=function(e,r){n[e.name]||(n[e.name]=!0,g(e.name,t,n))};if(r)for(var o in r)if(r.hasOwnProperty(o)&&"$$isBuiltin"!==o){var a="$$fntype"===o?r[o]:r[o].typeObj;if("$$newtype"===o)continue;m(a,i)}}function v(e,t,n,r){r=r||{};var i=function(e,i){for(;n[e.name];)e.name=t[e.name].$$proto.typeObj.name,e.name||(e.name="Object");if(!r[e.name]){r[e.name]=!0;var o=t[e.name];if(o)for(var a in o)if(o.hasOwnProperty(a)&&"$$isBuiltin"!==a){var s="$$fntype"===a?o[a]:o[a].typeObj;m(s,i)}}};m(e,i)}function y(e,t){if(e)return"NameExpression"===e.type&&t[e.name]&&t[e.name].$$fntype}function x(e,t,n){if(e.params)for(var r=0;rt.relevance)return-1;if(t.relevance>e.relevance)return 1;var n=e.description.toLowerCase(),r=t.description.toLowerCase();return n=0&&0===t[o].description.indexOf("---");)i[o]=!0,o--;for(o=0;oc&&("ExpressionStatement"===e.type||"ReturnStatement"===e.type||"ifStatement"===e.type||"WhileStatement"===e.type||"Program"===e.type))throw"no hover";return"FunctionDeclaration"!==e.type&&"FunctionExpression"!==e.type||f.push(e),!0};try{e.visit(o,{},d,function(e){e===f[f.length-1]&&f.pop()})}catch(e){if("no hover"===e)return Q();if("done"!==e)throw e}if(!p)return Q();var h=s(o,c,p.name,a),m=t.createEnvironment({buffer:a,uid:"local",offset:c,indexer:this.indexer,globalObjName:_(o.comments,this.lintOptions),comments:o.comments});return m.then(function(e){e.defer=h.toDefer,e.defer&&(e.deferredComments=u(e.comments,e.defer.range));var t=n.inferTypes(o,e,this.lintOptions),i="Identifier"===p.type?p.name:"this",a=e.lookupTypeObj(i,p.extras.target||t,!0);if(a){var s=e.getAllTypes();y(a.typeObj,s)&&(x(s[a.typeObj.name].$$fntype,s),a.typeObj=s[a.typeObj.name].$$fntype);var c=r.styleAsProperty(i,l)+" : "+r.createReadableType(a.typeObj,e,!0,0,l);return a.hoverText=c,a.hoverName=i,a.hoverRange=p.range,Q(a)}return Q({hoverName:i,hoverRange:p.range})})},_internalFindDefinitionOLD:function(o,a,s,c){var l;if(!o)return Q();var p=[],f=t.createEnvironment({buffer:a,uid:"local",offset:s,indexer:this.indexer,globalObjName:_(o.comments,this.lintOptions),comments:o.comments});return f.then(function(t){var a=function(e){if(("Identifier"===e.type||"ThisExpression"===e.type)&&i.inRange(s,e.range,!0))throw l=e,"done";if(e.range[0]>s&&("ExpressionStatement"===e.type||"ReturnStatement"===e.type||"ifStatement"===e.type||"WhileStatement"===e.type||"Program"===e.type))throw"no hover";return"FunctionDeclaration"!==e.type&&"FunctionExpression"!==e.type||p.push(e),!0};try{e.visit(o,{},a,function(e){e===p[p.length-1]&&p.pop()})}catch(e){if("no hover"===e)return Q();if("done"!==e)throw e}if(!l)return Q();t.defer=p.pop(),t.defer&&l===t.defer.id&&delete t.defer,t.defer&&(t.deferredComments=u(t.comments,t.defer.range));var f=n.inferTypes(o,t,this.lintOptions),d="Identifier"===l.type?l.name:"this",h=t.lookupTypeObj(d,l.extras.target||f,!0);if(h){var m=t.getAllTypes();y(h.typeObj,m)&&(x(m[h.typeObj.name].$$fntype,m),h.typeObj=m[h.typeObj.name].$$fntype);var g=r.styleAsProperty(d,c)+" : "+r.createReadableType(h.typeObj,t,!0,0,c);return h.hoverText=g,h.hoverName=d,h.hoverRange=l.range,Q(h)}return Q({hoverName:d,hoverRange:l.range})})},computeHover:function(e,t,n){return this._internalFindDefinition(e,t,n,!0)},findDefinition:function(e,t,n){return this._internalFindDefinition(e,t,n,!1)},_internalFindExternalReferences:function(r,i,a){var s=e.parse(r);if(!s)return Q();var u=t.createEnvironment({buffer:r,uid:i,globalObjName:_(s.comments,this.lintOptions),comments:s.comments,indexer:this.indexer,findRef:a});return u.then(function(t){try{n.inferTypes(s,t,this.lintOptions)}catch(e){return"undefined"!=typeof o&&(o.error("Problem inferring in: "+i,"CONTENT_ASSIST"),o.error(e.message,"CONTENT_ASSIST"),o.error(e.stack,"CONTENT_ASSIST")),Q.reject(e)}var r={},u={iMatches:0,items:[],sFullPath:i};return e.visit(s,r,function(e,n){var r=e.type;switch(r){case"CallExpression":var o=e.callee;if(o.object&&o.object.extras.inferredTypeObj){var s=t.findType(o.object.extras.inferredTypeObj);if(s&&s.$$proto&&s.$$proto.path&&s.$$proto.path===a.refModule&&o.property.extras.target){var c=t.indexer.retrieveGlobalSummary(s.$$proto.path);if(c&&(c=c.module),o.property.extras.target.extras.inferredTypeObj.name===a.refProperty.type||"anonymous"===a.refProperty.type||c===a.refModuleId)if(Array.isArray(a.refProperty.prop))for(var l=0;l0?u.items[u.items.length-1]:{sText:null,range:[-1]};if(e.property.extras.target.extras.inferredTypeObj.name===a.refProperty.type&&h.range[0]!==e.property.range[0])console.log("I found it! Ref to module "+a.refModule+" type "+a.refProperty.type+" ref to property "+a.refProperty.prop.name+" in "+i+" at "+e.range),u.iMatches++,u.items.push({sText:a.refProperty.prop.name,range:e.property.range});else{var m="",g=e.object;for(d="";g.hasOwnProperty("object");)m=g.property.name.concat(d,m),g=g.object,d=".";g.name&&(m=g.name.concat(d,m),a.refProperty.type===m&&h.range[0]!==e.property.range[0]&&(console.log("I found it! Ref to module "+a.refModule+" type "+a.refProperty.type+" ref to global "+a.refProperty.prop.name+" in "+i+" at "+e.range),u.iMatches++,u.items.push({sText:a.refProperty.prop.name,range:e.property.range})))}}}return!0}),Q(u)})},findExternalReferences:function(e,t,n){return this._internalFindExternalReferences(e,t,n)},_internalFindLocalReferences:function(t,n,r){function i(e,t){this.name=e,this.range=t}var o={_scopeStack:["Global"],_thisTypeStack:[],isInScope:function(e){for(var t=0;t<=this._scopeStack.length;t++)if(this._scopeStack[t]===e)return!0;return!1},isInThis:function(e){for(var t=0;t<=this._thisTypeStack.length;t++)if(this._thisTypeStack[t]==e)return!0;return!1}},a={iMatches:0,items:[],sFullPath:n};return i.prototype.is=function(e){return this.name===(e.name||e.sText)&&this.range[0]===e.range[0]&&this.range[1]===e.range[1]},e.visit(t,o,function(e,t){var o=e.type;switch(o){case"CallExpression":var s=e.callee;if(s.name===r.name&&r.type.type===s.extras.inferredTypeObj.type&&r.type.name===s.extras.inferredTypeObj.name&&t.isInScope(r.scope)&&(console.log("I found it! Ref to function CALL "+r.name+" type "+r.type.name+" scope "+r.scope+" in "+n+" at "+e.callee.range),a.iMatches++,a.items.push({sText:r.name,range:e.callee.range})),e.arguments&&e.arguments.length>0)for(var u=0;u3&&"Program"===arguments[3].type)u=arguments[3];else if(u=e.parse(i),!u)return Q();var c=t.createEnvironment({buffer:i,uid:a,globalObjName:_(u.comments,this.lintOptions),comments:u.comments,indexer:this.indexer,offset:s});return c.then(function(e){try{n.inferTypes(u,e,this.lintOptions)}catch(e){return"undefined"!=typeof o&&(o.error("Problem inferring in: "+a,"CONTENT_ASSIST"),o.error(e.message,"CONTENT_ASSIST"),o.error(e.stack,"CONTENT_ASSIST")),Q.reject(e)}var t,i,s,c,l,p;if(e.amdModule){var f=e.amdModule.arguments;s=f&&f.length>0?r.extractReturnType(e.getFnType(f[f.length-1])):r.OBJECT_TYPE,i="AMD"}else if(e.commonjsModule){var d=e.commonjsModule.arguments[0].params[1];s=d.extras.inferredTypeObj,t=e.findType(s)}else if(e.SapUIAmd&&e.SapUIAmd.result)s=e.SapUIAmd.result,t=e.findType(s),i="AMD",e.selectedProp&&(c={type:t.$$newtype.typeObj.name,prop:e.selectedProp});else if(e.SapUIAmd){var f=e.SapUIAmd.expression.arguments;s=f&&f.length>0?r.extractReturnType(e.getFnType(f[f.length-1])):r.OBJECT_TYPE,e.selectedProp&&(c={type:"anonymous",prop:e.selectedProp}),i="AMD"}else if(e.SapUI5)s=e.SapUI5.typeObj,t=e.SapUI5.moduleType||e.findType(s),p=e.SapUI5.moduleId,e.selectedProp&&(c={type:t.$$newtype?t.$$newtype.typeObj.name:p,prop:e.selectedProp});else{t=e.globalScope();var h=t.exports||t.module&&e.getAllTypes()[t.module.typeObj.name]&&e.getAllTypes()[t.module.typeObj.name].exports;h?(i="commonjs",s=h.typeObj):(i="global",s=t.this.typeObj)}r.isFunctionOrConstructor(s)||e.findType(s).$$isBuiltin||(t=e.findType(s));var m=e.getAllTypes();return e.SapUI5||e.SapUIAmd||b(e,i,s,t),r.isFunctionOrConstructor(s)||e.findType(s)&&e.findType(s).$$isBuiltin?t=doctrine.type.stringify(s,{compact:!0}):t.$$fntype&&(t=doctrine.type.stringify(t.$$fntype,{compact:!0})),l=e.selectedLocalId,Q({module:p,provided:t,selectedProperty:c,localIdentifier:l,types:m,kind:i})})}},{EsprimaJavaScriptContentAssistProvider:E}}),define("sap/watt/lib/orion/editor/templates",[],function(){function e(e,t){return t.substring(e.length)}function t(e,t,n,r,i,o){this.prefix=e,this.description=t,this.helpDescription=r,this.template=n,this.library=i,this.isStatic=o,this._parse()}function n(e,t){this._keywords=e||[],this._templates=[];var n=[];t&&(n=n.concat(t)),this.addTemplates(n)}var r="${tab}",i="${delimiter}",o="${cursor}";return t.prototype={getProposal:function(e,t,n){var a,s=t-e.length,u={},c=void 0!==n.delimiter?n.delimiter:"\n";n.indentation&&(c+=n.indentation);for(var l=void 0!==n.tab?n.tab:"\t",p=0,f=this.variables,d=this.segments,h=[],m=0;m=0&&(n=e[t],"\n"!==n&&"\r"!==n)&&/\s/.test(n);)t--;return n}function r(e){return JSON.stringify(e).replace("}","\\}")}function i(){}var o={type:"link",values:["undefined","object","boolean","number","string","function","xml"]},a="!@#$^&*.?<>",s=[{prefix:"if",description:"if - if statement",template:"if (${condition}) {\n\t${cursor}\n}"},{prefix:"if",description:"if - if else statement",template:"if (${condition}) {\n\t${cursor}\n} else {\n\t\n}"},{prefix:"for",description:"for - iterate over array",template:"for (var ${i}=0; ${i}<${array}.length; ${i}++) {\n\t${cursor}\n}"},{prefix:"for",description:"for - iterate over array with local var",template:"for (var ${i}=0; ${i}<${array}.length; ${i}++) {\n\tvar ${value} = ${array}[${i}];\n\t${cursor}\n}"},{prefix:"for",description:"for..in - iterate over properties of an object",template:"for (var ${property} in ${object}) {\n\tif (${object}.hasOwnProperty(${property})) {\n\t\t${cursor}\n\t}\n}"},{prefix:"while",description:"while - while loop with condition",template:"while (${condition}) {\n\t${cursor}\n}"},{prefix:"do",description:"do - do while loop with condition",template:"do {\n\t${cursor}\n} while (${condition});"},{prefix:"switch",description:"switch - switch case statement",template:"switch (${expression}) {\n\tcase ${value1}:\n\t\t${cursor}\n\t\tbreak;\n\tdefault:\n}"},{prefix:"case",description:"case - case statement",template:"case ${value}:\n\t${cursor}\n\tbreak;"},{prefix:"try",description:"try - try..catch statement",template:"try {\n\t${cursor}\n} catch (${err}) {\n}"},{prefix:"try",description:"try - try..catch statement with finally block",template:"try {\n\t${cursor}\n} catch (${err}) {\n} finally {\n}"},{prefix:"var",description:"var - variable declaration",template:"var ${name};"},{prefix:"var",description:"var - variable declaration with value",template:"var ${name} = ${value};"},{prefix:"let",description:"let - local scope variable declaration",template:"let ${name};"},{prefix:"let",description:"let - local scope variable declaration with value",template:"let ${name} = ${value};"},{prefix:"return",description:"return - return result",template:"return ${result};"},{prefix:"typeof",description:"typeof - typeof statement",template:'typeof ${object} === "${type:'+r(o)+'}"'},{prefix:"instanceof",description:"instanceof - instanceof statement",template:"${object} instanceof ${type}"},{prefix:"with",description:"with - with statement",template:"with (${object}) {\n\t${cursor}\n}"},{prefix:"function",description:"function - function declaration",template:"function ${name} (${parameter}) {\n\t${cursor}\n}"},{prefix:"nls",description:"string - non NLS",template:"${cursor} //$NON-NLS-${0}$"},{prefix:"log",description:"log - console log",template:"console.log(${object});"}];return i.prototype=new e.TemplateContentAssist(t.JSKeywords,s),i.prototype.resetTemplateAndKeywords=function(){this._templates=[];var e=[];s&&(e=e.concat(s)),this.addTemplates(e)},i.prototype.isValid=function(e,t,r,i){var o=n(t,r-e.length-1);return!o||a.indexOf(o)===-1},{JSTemplateContentAssistProvider:i}}),define("sap/watt/lib/orion/editor/LibraryTemplateContentAssist",["./templates"],function(e){function t(e,t){for(var n="";t>=0&&(n=e[t],"\n"!==n&&"\r"!==n)&&/\s/.test(n);)t--;return n}function n(e,t){function n(){return"."===t.token.value||t.aRowTokens[t.token.index-1]&&"."===t.aRowTokens[t.token.index-1].value}function r(){return t.aRowTokens[t.token.index-1]&&"text"===t.aRowTokens[t.token.index-1].type&&t.aRowTokens[t.token.index-2]&&"new"===t.aRowTokens[t.token.index-2].value}t.token&&t.aRowTokens&&(n()||r())&&(e.segments[0]=e.segments[0].replace("new ",""))}function r(e,t,n,r,i,o,s,u,c){o&&"constructor"!==o||(n=n.replace(i,a),t=t.replace(e,a)),this.prefix=e,this.description=t,this.template=n,this.helpDescription=r,this.name=i,this.category=o,this.helpTarget=s,this.library=u,this.isStatic=c,this._parse()}function i(){this._templates={}}var o="!@#$^&*.?<>",a="{fn}";return r.prototype=Object.create(e.Template.prototype),r.prototype.constructor=r,i.prototype=Object.create(e.TemplateContentAssist.prototype),i.prototype.constructor=i,i.prototype.resetTemplates=function(){this._templates={}},i.prototype.addTemplates=function(e,t){for(var n=this.getTemplates(),i=0;i0))return null;var s=e.segments[0],u=e.description,c=i?i:e.name,l=i?i:e.prefix;e.segments[0]=e.segments[0].replace(a,c),n(e,t),e.description=e.description.replace(a,l),o=r.prototype.getProposal.call(e,t.prefix,t.offset,t),o.name=e.name,e.segments[0]=s,e.description=u}return this.removePrefix(t.prefix,o),o},i.prototype.computeTemplateProposals=function(e,t,n){var r=this.getPrefix(e,t,n),i=[];return this.isValid(r,e,t,n)?i.concat(this.getTemplateProposals(r,t,n)):i},i.prototype.getTemplateProposals=function(e,t,n){var r,i=[],o=this.getTemplates();for(var a in o)for(var s in o[a])if(r=o[a][s],r.prefix&&r.match(e,n.caseSensitive)){var u=this.createProposalFromTemplate(r,n);u&&i.push(u)}return i},i.prototype.isValid=function(e,n,r,i){var a=t(n,r-e.length-1);return!a||o.indexOf(a)===-1},{LibraryTemplateContentAssistProvider:i}}),define("sap/watt/core/ConfigPreload",["sap/watt/lib/lodash/lodash"],function(e){"use strict";var t={plugins:{},interfaces:{}},n=new URI(require.toUrl("a")).absoluteTo(new URI(document.location.href)),r={loadPreload:function(n){if(sap.watt.getEnv("debugMode"))return Q();var r=this;return Q(jQuery.ajax({url:n,dataType:"json"})).then(function(i){e.assign(t.interfaces,i.interfaces);var o={};e.forEach(i.plugins,function(e,t){o[r.toInternalPath(t,i.compatibilityMode?void 0:n)]=e}),e.assign(t.plugins,o)},function(e){return console.log("Could not load configuration preload from "+n+", Reason: "+e.statusText),null})},loadJSPreload:function(e){if(sap.watt.getEnv("debugMode"))return Q();var t=Q.defer();return require([e],function(){t.resolve()},function(n){console.log("Could not load JS preload for "+e+", Reason: "+n),t.resolve()}),t.promise},getPreload:function(e,n){var r=t&&t[e]&&t[e][n];return r?Q(r):Q.reject(new Error)},toInternalPath:function(e,t){var r=new URI(e).absoluteTo(t||n),i=r.normalize().path();return i=i.replace(/\/$/g,"")}};return r}),define("sap/watt/core/Interface",["./ConfigPreload","sap/watt/lib/lodash/lodash"],function(e,t){"use strict";function n(e){return!t.isEmpty(e)}var r=function(e){this._vInterfaces=e,this._mInterfaces={},this._mConfigurationProperties={},this._mEvents={},this._mMethods={}};return r.mInterfaces={},r.create=function(e){var t=new r(e);return t.initialize()},r.register=function(e,t){return r.mInterfaces[e]?new Error("Interface "+e+" has been provided twice!"):void("string"==typeof t?r.mInterfaces[e]=require.toUrl(t):r.mInterfaces[e]=Q(t))},r.SUPPORTED_TYPES={string:!0,number:!0,boolean:!0,object:!0,"[string]":!0,"[number]":!0,"[boolean]":!0,"[object]":!0},r.load=function(n){var i=r.mInterfaces,o=i[n];if(!o){var a=n.replace(/\./g,"/");o=require.toUrl(a)+".json",console.warn("Deprecation Warning: The interface '"+n+"' is not provided. Please provide the interface in a plugin.json file")}return t.isString(o)?i[n]=e.getPreload("interfaces",n).then(null,function(){return Q(jQuery.ajax({url:o,dataType:"json"}).then(function(e){return e},function(){return new Error("Cannot parse interface '"+n+"' from path '"+o+"'")}))}):o},r.prototype.initialize=function(){var e=this;return delete this.initialize,this._loadInterfaces(this._vInterfaces).then(function(){return e})},r.prototype.createConfigurationObject=function(){var e=this.getConfigurationProperties(),t={};for(var n in e){var r=e[n],i=void 0;r.multiple&&(i=[]),t[n]=i}return t},r.prototype.isConfigurationPropertyMultiple=function(e){return this.getConfigurationProperties()[e].multiple},r.prototype.isSimpleType=function(e){return"string"==typeof e&&r.SUPPORTED_TYPES[e]},r.prototype.isComplexType=function(e){return Array.isArray(e)||t.isPlainObject(e)},r.prototype.isProxyType=function(e){return!this.isSimpleType(e)&&!this.isComplexType(e)},r.prototype.hasConfigurationProperties=function(){return n(this.getConfigurationProperties())},r.prototype.getConfigurationProperties=function(){return this._mConfigurationProperties},r.prototype.hasMethods=function(){return n(this.getMethods())},r.prototype.getMethods=function(){return this._mMethods},r.prototype.hasEvents=function(){return n(this.getEvents())},r.prototype.getEvents=function(){return this._mEvents},r.prototype.hasInterfaces=function(){return n(this._mInterfaces)},r.prototype.hasInterface=function(e){return!!this._mInterfaces[e]},r.prototype.getMethodDefaultReturnValue=function(e){return"undefined"!=typeof this._mMethods[e].returns&&{type:this._mMethods[e].returns.type,default:this._mMethods[e].returns.default}},r.prototype._loadInterfaces=function(e,n){var i=this;n=n||{};var o=[];"string"==typeof e?o.push(e):Array.isArray(e)&&(o=e);var a=o.map(function(e){if(n[e])return new Error("Interface "+e+" inherits from itself");var o=t.clone(n);o[e]=!0;var a=r.load(e).then(function(e){return e.extends?i._loadInterfaces(e.extends,o).then(function(){return e}):e});return a});return Q.all(a).then(function(e){o.forEach(function(t,n){if(!i._mInterfaces[t]){var r=e[n];i._mInterfaces[t]=r,i._mergeInterface(r)}})})},r.prototype._mergeInterface=function(e){this._mergeInterfaceSection("_mConfigurationProperties","configurationProperties",e),this._mergeInterfaceSection("_mEvents","events",e),this._mergeInterfaceSection("_mMethods","methods",e)},r.prototype._mergeInterfaceSection=function(e,t,n){var r=n[t];if(r)for(var i in r){if(this[e][i])return new Error("Error during merging interface '"+n.name+"': The key '"+i+"' in section '"+t+"' is already defined by another interface");this[e][i]=r[i]}},r}),define("sap/watt/core/DebugHooks",[],function(){function e(e){try{throw e}catch(e){}}function t(e){var t=[];for(var n in e)C.call(e,n)&&t.push(n);return t}function n(e){var t=null;if(0===e.length)t=function(){};else if(1===e.length){var n=e[0];t=function(){n.apply(this,arguments)}}else{t=e[0];for(var r=1;r=0)throw new Error("Trying to register same extension method twice");if(i)for(var a=0;aA&&k()}function l(e){A||(A=e,r(self,"onpromisechained",c),S.onChainLengthLimitExceeded=function(e){k=e})}function p(){A>0&&(i(self,"onpromisechained",c),k=P,A=null)}function f(){I>0&&(F++,F>I&&j())}function d(){I&&F--}function h(e){I||(I=e,r(self,"onpromisecreated",f),r(self,"onpromisefulfilled",d),r(self,"onpromiserejected",d),r(self,"onpromiseresolved",d),r(self,"onpromisecancelled",d),S.onPendingPromisesLimitExceeded=function(e){j=e})}function m(){I&&(I=null,F=0,j=N,i(self,"onpromisecreated",f),i(self,"onpromisefulfilled",d),i(self,"onpromiserejected",d),i(self,"onpromiseresolved",d),i(self,"onpromisecancelled",d))}function g(e,t){e._promiseId||(L++,e._promiseId=L),t._promiseId||(L++,t._promiseId=L),e._tracks||(e._tracks=[]),t._trackedBy||(t._trackedBy=[]),e._tracks.push(t),t._trackedBy.push(e)}function v(e){return e._trackedBy&&0!==e._trackedBy.length?(1!==e._trackedBy.length&&console.warn("Promise "+e._promiseId+" is tracked by more than one promise"),v(e._trackedBy[0])):e}function y(e,t){var n=[];if(t++,t>100)return null;var r=null,i="";if(e._trace){var o=e._trace.stack;i=',tooltip="'+o.replace(/(?:\r\n|\r|\n)/g," ")+'"';var a=o.split("\n")[4].trim(),s=/at (.*) \(.*[\\\/](.*:.*:.*)\)/g,u=s.exec(a);r=u&&3===u.length?e._promiseId+": "+u[1]+" at "+u[2]:e._promiseId}else r=e._promiseId;var c="";if(e.isRejected()&&(c=",color=blue"),e.isPending()&&(c=",color=red"),e.isCancelled()&&(c=",color=gray"),n.push(e._promiseId+'[label="'+r+'"'+c+i+"];"),e._tracks)for(var l=0;l"+e._tracks[l]._promiseId+";"),n=n.concat(y(e._tracks[l],t));return n}function x(){return"digraph promises {"+y(v(this),0).join("\n")+"}"}function b(){if(!this.isPending())throw new Error("This promise is not waiting for any other promise");if(this._tracks&&0!=this._tracks.length){for(var e=[],t=0;t2?e.resolve([].slice.call(arguments,1)):e.resolve(n)}},e},r.deferred=r.pending=r.defer,r.getBluebirdPromise=function(){return f},f.prototype.valueOf=f.prototype.value;var b=function(e){if(e instanceof Array)return f.all(e.map(function(e){var t=e instanceof f?e:r(e);return t.reflect()}));if(e instanceof f)return e.then(function(e){return b(e)});throw new Error("that must be a promise or an array")};f.prototype.allSettled=function(){return b(this).then(function(e){for(var t=[],n=0;n0;){var t=e.shift();if("function"==typeof t){var n=e.shift(),r=e.shift();t.call(n,r)}else t._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},t.exports=r,t.exports.firstLineError=s},{"./queue":19,"./schedule":20,"./util":25}],3:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){var i=!1,o=function(e,t){this._reject(t)},a=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},s=function(e,t){0===(50397184&this._bitField)&&this._resolveCallback(t.target)},u=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){i||(i=!0,e.prototype._propagateFrom=r.propagateFromFunction(),e.prototype._boundValue=r.boundValueFunction());var c=n(o),l=new e(t);l._propagateFrom(this,1);var p=this._target();if(l._setBoundTo(c),c instanceof e){var f={promiseRejectionQueued:!1,promise:l,target:p,bindingPromise:c};p._then(t,a,void 0,l,f),c._then(s,u,void 0,l,f),l._setOnCancel(c)}else l._resolveCallback(p);return l},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=this._bitField&-2097153},e.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},e.bind=function(t,n){return e.resolve(n).bind(t)}}},{}],4:[function(e,t,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}t.exports=function(t){function n(e,n){var r;if(null!=e&&(r=e[n]),"function"!=typeof r){var i="Object "+l.classString(e)+" has no method '"+l.toString(n)+"'";throw new t.TypeError(i)}return r}function r(e){var t=this.pop(),r=n(e,t);return r.apply(e,this)}function a(e){return e[this]}function s(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}var u,c,l=e("./util"),p=l.canEvaluate,f=l.isIdentifier,d=function(e){return new Function("ensureMethod"," \n return function(obj) { \n 'use strict' \n var len = this.length; \n ensureMethod(obj, 'methodName'); \n switch(len) { \n case 1: return obj.methodName(this[0]); \n case 2: return obj.methodName(this[0], this[1]); \n case 3: return obj.methodName(this[0], this[1], this[2]); \n case 0: return obj.methodName(); \n default: \n return obj.methodName.apply(obj, this); \n } \n }; \n ".replace(/methodName/g,e))(n)},h=function(e){return new Function("obj"," \n 'use strict'; \n return obj.propertyName; \n ".replace("propertyName",e))},m=function(e,t,n){var r=n[e];if("function"!=typeof r){if(!f(e))return null;if(r=t(e),n[e]=r,n[" size"]++,n[" size"]>512){for(var i=Object.keys(n),o=0;o<256;++o)delete n[i[o]];n[" size"]=i.length-256}}return r};u=function(e){ return m(e,d,i)},c=function(e){return m(e,h,o)},t.prototype.call=function(e){for(var t=arguments.length,n=new Array(Math.max(t-1,0)),i=1;i0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e))for(var n=0;n=0)return o[e]}var i=!1,o=[];return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},t.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},t.prototype._popContext=function(){if(void 0!==this._trace){var e=o.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},t.CapturedTrace=null,t.create=n,t.deactivateLongStackTraces=function(){},t.activateLongStackTraces=function(){var n=e.prototype._pushContext,o=e.prototype._popContext,a=e._peekContext,s=e.prototype._peekContext,u=e.prototype._promiseCreated;t.deactivateLongStackTraces=function(){e.prototype._pushContext=n,e.prototype._popContext=o,e._peekContext=a,e.prototype._peekContext=s,e.prototype._promiseCreated=u,i=!1},i=!0,e.prototype._pushContext=t.prototype._pushContext,e.prototype._popContext=t.prototype._popContext,e._peekContext=e.prototype._peekContext=r,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},t}},{}],8:[function(e,t,n){"use strict";t.exports=function(t,n){function r(e,t){return{promise:t}}function i(){return!1}function o(e,t,n){var r=this;try{e(t,n,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+M.toString(e));r._attachCancellationCallback(e)})}catch(e){return e}}function a(e){if(!this.isCancellable())return this;var t=this._onCancel();void 0!==t?M.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function s(){return this._onCancelField}function u(e){this._onCancelField=e}function c(){this._cancellationParent=void 0,this._onCancelField=void 0}function l(e,t){if(0!==(1&t)){this._cancellationParent=e;var n=e._branchesRemainingToCancel;void 0===n&&(n=0),e._branchesRemainingToCancel=n+1}0!==(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function p(e,t){0!==(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function f(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function d(){this._trace=new I(this._peekContext())}function h(e,t){if(B(e)){var n=this._trace;if(void 0!==n&&t&&(n=n._parent),void 0!==n)n.attachExtraTrace(e);else if(!e.__stackCleaned__){var r=E(e);M.notEnumerableProp(e,"stack",r.message+"\n"+r.stack.join("\n")),M.notEnumerableProp(e,"__stackCleaned__",!0)}}}function m(e,t,n,r,i){if(void 0===e&&null!==t&&q){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="a promise was created in a "+n+"handler but was not returned from it";r._warn(o,!0,t)}}function g(e,t){var n=e+" is deprecated and will be removed in a future version.";return t&&(n+=" Use "+t+" instead."),v(n)}function v(e,n,r){if(re.warnings){var i,o=new L(e);if(n)r._attachExtraTrace(o);else if(re.longStackTraces&&(i=t._peekContext()))i.attachExtraTrace(o);else{var a=E(o);o.stack=a.message+"\n"+a.stack.join("\n")}Y("warning",o)||S(o,"",!0)}}function y(e,t){for(var n=0;n=0;--s)if(r[s]===o){a=s;break}for(var s=a;s>=0;--s){var u=r[s];if(t[i]!==u)break;t.pop(),i--}t=r}}function _(e){for(var t=[],n=0;n0&&(t=t.slice(n)),t}function E(e){var t=e.stack,n=e.toString();return t="string"==typeof t&&t.length>0?w(e):[" (No stack trace)"],{message:n,stack:_(t)}}function S(e,t,n){if("undefined"!=typeof console){var r;if(M.isObject(e)){var i=e.stack;r=t+G(i,e)}else r=t+String(e);"function"==typeof N?N(r,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function C(e,t,n,r){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(r):t(n,r))}catch(e){R.throwLater(e)}"unhandledRejection"===e?Y(e,n,r)||i||S(n,"Unhandled rejection "):Y(e,r)}function T(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{t=e&&"function"==typeof e.toString?e.toString():M.toString(e);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(t))try{var r=JSON.stringify(e);t=r}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+D(t)+">, no stack trace)"}function D(e){var t=41;return e.length=s||(ee=function(e){if(U.test(e))return!0;var t=P(e);return!!(t&&t.fileName===n&&a<=t.line&&t.line<=s)})}}function I(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);ne(this,I),t>32&&this.uncycle()}var F,O,N,j=t._getDomain,R=t._async,L=e("./errors").Warning,M=e("./util"),B=M.canAttachTrace,U=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,V=null,G=null,W=!1,Q=!(0==M.env("BLUEBIRD_DEBUG")||!M.env("BLUEBIRD_DEBUG")&&"development"!==M.env("NODE_ENV")),H=!(0==M.env("BLUEBIRD_WARNINGS")||!Q&&!M.env("BLUEBIRD_WARNINGS")),z=!(0==M.env("BLUEBIRD_LONG_STACK_TRACES")||!Q&&!M.env("BLUEBIRD_LONG_STACK_TRACES")),q=0!=M.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(H||!!M.env("BLUEBIRD_W_FORGOTTEN_RETURN"));t.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=e._bitField&-1048577|524288},t.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),R.invokeLater(this._notifyUnhandledRejection,this,void 0))},t.prototype._notifyUnhandledRejectionIsHandled=function(){C("rejectionHandled",F,void 0,this)},t.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},t.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),C("unhandledRejection",O,e,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(e,t,n){return v(e,t,n||this)},t.onPossiblyUnhandledRejection=function(e){var t=j();O="function"==typeof e?null===t?e:t.bind(e):void 0},t.onUnhandledRejectionHandled=function(e){var t=j();F="function"==typeof e?null===t?e:t.bind(e):void 0};var $=function(){};t.longStackTraces=function(){if(R.haveItemsQueued()&&!re.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!re.longStackTraces&&A()){var e=t.prototype._captureStackTrace,r=t.prototype._attachExtraTrace;re.longStackTraces=!0,$=function(){if(R.haveItemsQueued()&&!re.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=e,t.prototype._attachExtraTrace=r,n.deactivateLongStackTraces(),R.enableTrampoline(),re.longStackTraces=!1},t.prototype._captureStackTrace=d,t.prototype._attachExtraTrace=h,n.activateLongStackTraces(),R.disableTrampolineIfNecessary()}},t.hasLongStackTraces=function(){return re.longStackTraces&&A()};var X=function(){try{var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),M.global.dispatchEvent(e),function(e,t){var n=document.createEvent("CustomEvent");return n.initCustomEvent(e.toLowerCase(),!1,!0,t),!M.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),K=function(){return M.isNode?function(){return process.emit.apply(process,arguments)}:M.global?function(e){var t="on"+e.toLowerCase(),n=M.global[t];return!!n&&(n.apply(M.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),J={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(e,t,n){return{promise:t,child:n}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,n){return{reason:t,promise:n}},rejectionHandled:r},Y=function(e){var t=!1;try{t=K.apply(null,arguments)}catch(e){R.throwLater(e),t=!0}var n=!1;try{n=X(e,J[e].apply(null,arguments))}catch(e){R.throwLater(e),n=!0}return n||t};t.config=function(e){if(e=Object(e),"longStackTraces"in e&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&$()),"warnings"in e){var n=e.warnings;re.warnings=!!n,q=re.warnings,M.isObject(n)&&"wForgottenReturn"in n&&(q=!!n.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!re.cancellation){if(R.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=c,t.prototype._propagateFrom=l,t.prototype._onCancel=s,t.prototype._setOnCancel=u,t.prototype._attachCancellationCallback=a,t.prototype._execute=o,Z=l,re.cancellation=!0}"monitoring"in e&&(e.monitoring&&!re.monitoring?(re.monitoring=!0,t.prototype._fireEvent=Y):!e.monitoring&&re.monitoring&&(re.monitoring=!1,t.prototype._fireEvent=i))},t.prototype._fireEvent=i,t.prototype._execute=function(e,t,n){try{e(t,n)}catch(e){return e}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(e){},t.prototype._attachCancellationCallback=function(e){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(e,t){};var Z=p,ee=function(){return!1},te=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;M.inherits(I,Error),n.CapturedTrace=I,I.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],n={},r=0,i=this;void 0!==i;++r)t.push(i),i=i._parent;e=this._length=r;for(var r=e-1;r>=0;--r){var o=t[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;r0&&(t[s-1]._parent=void 0,t[s-1]._length=1),t[r]._parent=void 0,t[r]._length=1;var u=r>0?t[r-1]:this;s=0;--l)t[l]._length=c,c++;return}}}},I.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=E(e),n=t.message,r=[t.stack],i=this;void 0!==i;)r.push(_(i.stack.split("\n"))),i=i._parent;b(r),x(r),M.notEnumerableProp(e,"stack",y(n,r)),M.notEnumerableProp(e,"__stackCleaned__",!0)}};var ne=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():T(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,V=e,G=t;var n=Error.captureStackTrace;return ee=function(e){return U.test(e)},function(e,t){Error.stackTraceLimit+=6,n(e,t),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return V=/@/,G=t,W=!0,function(e){e.stack=(new Error).stack};var i;try{throw new Error}catch(e){i="stack"in e}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(G=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?T(t):t.toString()},null):(V=e,G=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(N=function(e){console.warn(e)},M.isNode&&process.stderr.isTTY?N=function(e,t){var n=t?"":"";console.warn(n+e+"\n")}:M.isNode||"string"!=typeof(new Error).stack||(N=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var re={warnings:H,longStackTraces:!1,cancellation:!1,monitoring:!1};return z&&t.longStackTraces(),{longStackTraces:function(){return re.longStackTraces},warnings:function(){return re.warnings},cancellation:function(){return re.cancellation},monitoring:function(){return re.monitoring},propagateFromFunction:function(){return Z},boundValueFunction:function(){return f},checkForgottenReturns:m,setBounds:k,warn:v,deprecated:g,CapturedTrace:I,fireDomEvent:X,fireGlobalEvent:K}}},{"./errors":10,"./util":25}],9:[function(e,t,n){"use strict";t.exports=function(e){function t(){return this.value}function n(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(n){return n instanceof e&&n.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:n},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(n,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:e},void 0);var t=arguments[1],r=function(){throw t};return this.caught(e,r)},e.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof e&&n.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:n},void 0);var r=arguments[1];r instanceof e&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],10:[function(e,t,n){"use strict";function r(e,t){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:t),p(this,"name",e),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return l(n,Error),n}function i(e){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",e),this.cause=e,this.isOperational=!0,void(e instanceof Error?(p(this,"message",e.message),p(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(e)}var o,a,s=e("./es5"),u=s.freeze,c=e("./util"),l=c.inherits,p=c.notEnumerableProp,f=r("Warning","warning"),d=r("CancellationError","cancellation error"),h=r("TimeoutError","timeout error"),m=r("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(e){o=r("TypeError","type error"),a=r("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),v=0;v1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function a(){return u.call(this,this.promise._target()._settledValue())}function s(e){if(!o(this,e))return p.e=e,p}function u(e){var r=this.promise,u=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?u.call(r._boundValue()):u.call(r._boundValue(),e);if(void 0!==c){r._setReturnedNonUndefined();var f=n(c,r);if(f instanceof t){if(null!=this.cancelPromise){if(f.isCancelled()){var d=new l("late cancellation observer");return r._attachExtraTrace(d),p.e=d,p}f.isPending()&&f._attachCancellationCallback(new i(this))}return f._then(a,s,void 0,this,void 0)}}}return r.isRejected()?(o(this),p.e=e,p):(o(this),e)}var c=e("./util"),l=t.CancellationError,p=c.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},t.prototype._passThrough=function(e,t,n,i){return"function"!=typeof e?this.then():this._then(n,i,void 0,new r(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,u,u)},t.prototype.tap=function(e){return this._passThrough(e,1,u)},r}},{"./util":25}],13:[function(e,t,n){"use strict";t.exports=function(t,n,r,i){var o,a=e("./util"),s=a.canEvaluate,u=a.tryCatch,c=a.errorObj;if(s){for(var l=function(e){return new Function("value","holder"," \n 'use strict'; \n holder.pIndex = value; \n holder.checkFulfillment(this); \n ".replace(/Index/g,e))},p=function(e){return new Function("promise","holder"," \n 'use strict'; \n holder.pIndex = promise; \n ".replace(/Index/g,e))},f=function(e){for(var n=new Array(e),r=0;r0&&"function"==typeof arguments[a]&&(e=arguments[a],a<=8&&s)){var u=new t(i);u._captureStackTrace();for(var c=d[a-1],l=new c(e),p=h,f=0;f=1?[]:d,this._init$(void 0,-2)}function u(e,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+l.classString(n));var a=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+l.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+l.classString(i.concurrency)));a=i.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new s(e,n,a,o).promise()}var c=t._getDomain,l=e("./util"),p=l.tryCatch,f=l.errorObj,d=[];l.inherits(s,n),s.prototype._init=function(){},s.prototype._promiseFulfilled=function(e,n){var r=this._values,o=this.length(),s=this._preservedValues,u=this._limit;if(n<0){if(n=n*-1-1,r[n]=e,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return r[n]=e,this._queue.push(n),!1;null!==s&&(s[n]=e);var c=this._promise,l=this._callback,d=c._boundValue();c._pushContext();var h=p(l).call(d,e,n,o),m=c._popContext();if(a.checkForgottenReturns(h,m,null!==s?"Promise.filter":"Promise.map",c),h===f)return this._reject(h.e),!0;var g=i(h,this._promise);if(g instanceof t){g=g._target();var v=g._bitField;if(0===(50397184&v))return u>=1&&this._inFlight++,r[n]=g,g._proxy(this,(n+1)*-1),!1;if(0===(33554432&v))return 0!==(16777216&v)?(this._reject(g._reason()),!0):(this._cancel(),!0);h=g._value()}r[n]=h}var y=++this._totalResolved;return y>=o&&(null!==s?this._filter(r,s):this._resolve(r),!0)},s.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,n=this._values;e.length>0&&this._inFlight1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],l=arguments[2];u=a.isArray(c)?s(e).apply(l,c):s(e).call(l,c)}else u=s(e)();var p=r._popContext();return o.checkForgottenReturns(u,p,"Promise.try",r),r._resolveFromSyncValue(u),r},t.prototype._resolveFromSyncValue=function(e){e===a.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":25}],16:[function(e,t,n){"use strict";function r(e){return e instanceof Error&&l.getPrototypeOf(e)===Error.prototype}function i(e){var t;if(r(e)){t=new c(e),t.name=e.name,t.message=e.message,t.stack=e.stack;for(var n=l.keys(e),i=0;i1){var n,r=new Array(t-1),i=0;for(n=0;n0&&"function"!=typeof e&&"function"!=typeof t){var n=".then() only accepts functions but was passed: "+f.classString(e);arguments.length>1&&(n+=", "+f.classString(t)),this._warn(n)}return this._then(e,t,void 0,void 0,void 0)},r.prototype.done=function(e,t){var n=this._then(e,t,void 0,void 0,void 0);n._setIsFinal()},r.prototype.spread=function(e){return"function"!=typeof e?l("expecting a function but got "+f.classString(e)):this.all()._then(e,void 0,void 0,b,void 0)},r.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},r.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},r.prototype.error=function(e){return this.caught(f.originatesFromRejection,e)},r.is=function(e){return e instanceof r},r.fromNode=r.fromCallback=function(e){var t=new r(x);t._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,i=k(e)(A(t,n));return i===P&&t._rejectCallback(i.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},r.all=function(e){return new E(e).promise()},r.cast=function(e){var t=w(e);return t instanceof r||(t=new r(x),t._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},r.resolve=r.fulfilled=r.cast,r.reject=r.rejected=function(e){var t=new r(x);return t._captureStackTrace(),t._rejectCallback(e,!0),t},r.setScheduler=function(e){if("function"!=typeof e)throw new v("expecting a function but got "+f.classString(e));return m.setScheduler(e)},r.prototype._then=function(e,t,n,i,o){var a=void 0!==o,u=a?o:new r(x),c=this._target(),l=c._bitField;a||(u._propagateFrom(this,3),u._captureStackTrace(),void 0===i&&0!==(2097152&this._bitField)&&(i=0!==(50397184&l)?this._boundValue():c===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,u));var p=s();if(0!==(50397184&l)){var f,d,h=c._settlePromiseCtx;0!==(33554432&l)?(d=c._rejectionHandler0,f=e):0!==(16777216&l)?(d=c._fulfillmentHandler0,f=t,c._unsetRejectionIsUnhandled()):(h=c._settlePromiseLateCancellationObserver,d=new y("late cancellation observer"),c._attachExtraTrace(d),f=t),m.invoke(h,c,{handler:null===p?f:"function"==typeof f&&p.bind(f),promise:u,receiver:i,value:d})}else c._addCallbacks(e,t,u,i,p);return u},r.prototype._length=function(){return 65535&this._bitField},r.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},r.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},r.prototype._setLength=function(e){this._bitField=this._bitField&-65536|65535&e},r.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},r.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},r.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},r.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},r.prototype._isFinal=function(){return(4194304&this._bitField)>0},r.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},r.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},r.prototype._setAsyncGuaranteed=function(){m.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},r.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==p)return void 0===t&&this._isBound()?this._boundValue():t},r.prototype._promiseAt=function(e){return this[4*e-4+2]},r.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},r.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},r.prototype._boundValue=function(){},r.prototype._migrateCallback0=function(e){var t=(e._bitField,e._fulfillmentHandler0),n=e._rejectionHandler0,r=e._promise0,i=e._receiverAt(0);void 0===i&&(i=p),this._addCallbacks(t,n,r,i,null)},r.prototype._migrateCallbackAt=function(e,t){var n=e._fulfillmentHandlerAt(t),r=e._rejectionHandlerAt(t),i=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=p),this._addCallbacks(n,r,i,o,null)},r.prototype._addCallbacks=function(e,t,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof e&&(this._fulfillmentHandler0=null===i?e:i.bind(e)),"function"==typeof t&&(this._rejectionHandler0=null===i?t:i.bind(t));else{var a=4*o-4;this[a+2]=n,this[a+3]=r,"function"==typeof e&&(this[a+0]=null===i?e:i.bind(e)),"function"==typeof t&&(this[a+1]=null===i?t:i.bind(t))}return this._setLength(o+1),o},r.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},r.prototype._resolveCallback=function(e,t){if(0===(117506048&this._bitField)){if(e===this)return this._rejectCallback(u(),!1);var n=w(e,this);if(!(n instanceof r))return this._fulfill(e);t&&this._propagateFrom(n,2);var i=n._target();if(i===this)return void this._reject(u());var o=i._bitField;if(0===(50397184&o)){var a=this._length();a>0&&i._migrateCallback0(this);for(var s=1;s>>16)){if(e===this){var n=u();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!==(134217728&t)?this._settlePromises():m.settlePromises(this))}},r.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16))return this._setRejected(),this._fulfillmentHandler0=e,this._isFinal()?m.fatalError(e,f.isNode):void((65535&t)>0?m.settlePromises(this):this._ensurePossibleRejectionHandled())},r.prototype._fulfillPromises=function(e,t){for(var n=1;n0){if(0!==(16842752&e)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,e),this._rejectPromises(t,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,e),this._fulfillPromises(t,r)}this._setLength(0)}this._clearCancellationData()},r.prototype._settledValue=function(){var e=this._bitField;return 0!==(33554432&e)?this._rejectionHandler0:0!==(16777216&e)?this._fulfillmentHandler0:void 0},r.defer=r.pending=function(){C.deprecated("Promise.defer","new Promise");var e=new r(x);return{promise:e,resolve:i,reject:o}},f.notEnumerableProp(r,"_makeSelfResolutionError",u),e("./method")(r,x,w,l,C),e("./bind")(r,x,w,C),e("./cancel")(r,E,l,C),e("./direct_resolve")(r),e("./synchronous_inspection")(r),e("./join")(r,E,w,x,C),r.Promise=r,r.version="3.4.0",e("./call_get.js")(r),e("./map.js")(r,E,l,w,x,C),e("./settle.js")(r,E,C),e("./timers.js")(r,x,C),f.toFastProperties(r),f.toFastProperties(r.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new r(x)),C.setBounds(h.firstLineError,f.lastLineError),r}},{"./async":2,"./bind":3,"./call_get.js":4,"./cancel":5,"./catch_filter":6,"./context":7,"./debuggability":8,"./direct_resolve":9,"./errors":10,"./es5":11,"./finally":12,"./join":13,"./map.js":14,"./method":15,"./nodeback":16,"./promise_array":18,"./settle.js":21,"./synchronous_inspection":22,"./thenables":23,"./timers.js":24,"./util":25}],18:[function(e,t,n){"use strict";t.exports=function(t,n,r,i,o){function a(e){switch(e){case-2:return[];case-3:return{}}}function s(e){var r=this._promise=new t(n);e instanceof t&&r._propagateFrom(e,3),r._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var u=e("./util");u.isArray;return u.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function e(n,o){var s=r(this._values,this._promise);if(s instanceof t){s=s._target();var c=s._bitField;if(this._values=s,0===(50397184&c))return this._promise._setAsyncGuaranteed(),s._then(e,this._reject,void 0,this,o);if(0===(33554432&c))return 0!==(16777216&c)?this._reject(s._reason()):this._cancel();s=s._value()}if(s=u.asArray(s),null===s){var l=i("expecting an array or an iterable object but got "+u.classString(s)).reason();return void this._promise._rejectCallback(l,!1)}return 0===s.length?void(o===-5?this._resolveEmptyArray():this._resolve(a(o))):void this._iterate(s)},s.prototype._iterate=function(e){var n=this.getActualLength(e.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,a=null,s=0;s=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var n=0;n=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(e,t){var n=new o;return n._bitField=33554432,n._settledValueField=e,this._promiseResolved(t,n)},i.prototype._promiseRejected=function(e,t){var n=new o;return n._bitField=16777216,n._settledValueField=e,this._promiseResolved(t,n)},t.settle=function(e){return r.deprecated(".settle()",".reflect()"),new i(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":25}],22:[function(e,t,n){"use strict";t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var n=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=t.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},a=t.prototype.isPending=function(){return 0===(50397184&this._bitField)},s=t.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};t.prototype.isCancelled=e.prototype._isCancelled=function(){return 65536===(65536&this._bitField)},e.prototype.isCancelled=function(){return this._target()._isCancelled()},e.prototype.isPending=function(){return a.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return i.call(this._target())},e.prototype.isResolved=function(){return s.call(this._target())},e.prototype.value=function(){return n.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),r.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],23:[function(e,t,n){"use strict";t.exports=function(t,n){function r(e,r){if(l(e)){if(e instanceof t)return e;var i=o(e);if(i===c){r&&r._pushContext();var u=t.reject(i.e);return r&&r._popContext(),u}if("function"==typeof i){if(a(e)){var u=new t(n);return e._then(u._fulfill,u._reject,void 0,u,null),u}return s(e,i,r)}}return e}function i(e){return e.then}function o(e){try{return i(e)}catch(e){return c.e=e,c}}function a(e){try{return p.call(e,"_promise0")}catch(e){return!1}}function s(e,r,i){function o(e){s&&(s._resolveCallback(e),s=null)}function a(e){s&&(s._rejectCallback(e,p,!0),s=null)}var s=new t(n),l=s;i&&i._pushContext(),s._captureStackTrace(),i&&i._popContext();var p=!0,f=u.tryCatch(r).call(e,o,a);return p=!1,s&&f===c&&(s._rejectCallback(f.e,!0,!0),s=null),l}var u=e("./util"),c=u.errorObj,l=u.isObject,p={}.hasOwnProperty;return r}},{"./util":25}],24:[function(e,t,n){"use strict";t.exports=function(t,n,r){function i(e){this.handle=e}function o(e){return clearTimeout(this.handle),e}function a(e){throw clearTimeout(this.handle),e}var s=e("./util"),u=t.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var c=function(e){return l(+this).thenReturn(e)},l=t.delay=function(e,o){var a,s;return void 0!==o?(a=t.resolve(o)._then(c,null,null,e,void 0),r.cancellation()&&o instanceof t&&a._setOnCancel(o)):(a=new t(n),s=setTimeout(function(){a._fulfill()},+e),r.cancellation()&&a._setOnCancel(new i(s))),a._setAsyncGuaranteed(),a};t.prototype.delay=function(e){return l(e,this)};var p=function(e,t,n){var r;r="string"!=typeof t?t instanceof Error?t:new u("operation timed out"):new u(t),s.markAsOriginatingFromRejection(r),e._attachExtraTrace(r),e._reject(r),null!=n&&n.cancel()};t.prototype.timeout=function(e,t){e=+e;var n,s,u=new i(setTimeout(function(){n.isPending()&&p(n,t,s)},e));return r.cancellation()?(s=this.then(),n=s._then(o,a,void 0,u,void 0),n._setOnCancel(u)):n=this._then(o,a,void 0,u,void 0),n}}},{"./util":25}],25:[function(e,t,n){"use strict";function r(){try{var e=A;return A=null,e.apply(this,arguments)}catch(e){return D.e=e,D}}function i(e){return A=e,r}function o(e){return null==e||e===!0||e===!1||"string"==typeof e||"number"==typeof e}function a(e){return"function"==typeof e||"object"==typeof e&&null!==e}function s(e){return o(e)?new Error(g(e)):e}function u(e,t){var n,r=e.length,i=new Array(r+1);for(n=0;n1,r=t.length>0&&!(1===t.length&&"constructor"===t[0]),i=F.test(e+"")&&C.names(e).length>0;if(n||r||i)return!0}return!1}catch(e){return!1}}function d(e){function t(){}t.prototype=e;for(var n=8;n--;)new t;return e}function h(e){return O.test(e)}function m(e,t,n){for(var r=new Array(e),i=0;i10||e[0]>0}(),M.isNode&&M.toFastProperties(process);try{throw new Error}catch(e){M.lastLineError=e}t.exports=M},{"./es5":11}]},{},[1])(1)}),define("sap/watt/core/q",["sap/watt/lib/q/q","sap/watt/core/UtilsCore"],function(e,t){"use strict";function n(e,t){for(var n=0;n'),n){if("async"!==e.preload)throw new Error("Trying to supply callback for UI5 that is synchronously loaded, add preload attribute to UI5 configuration");sap.ui.getCore().attachInit(n)}},d.promise},n=define,r=sap.watt.getEnv("base_path"),i=sap.watt.getEnv("themename")||"sap_flat",o=sap.watt.getEnv("themeroots")||r,a=!1;if("hcproxy"!==sap.watt.getEnv("server_type")){var s=o+"sap/watt/preload/themes/"+i+"/library.css";return this._headJax(s).then(function(e){return a=!(404!==e),t(a)})}return t(a)},_headJax:function(e){var t=Q.defer(),n=new XMLHttpRequest;return n.open("GET",e),n.onload=function(){t.resolve(n.status)},n.send(null),t.promise}}),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("sap/watt/lib/xhr/xhrlib",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.xhrlib=e()}}(function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a0)for(this.clearEvents(),e=0;e0||this["on"+e])},a.subscribed=function(e){return!!this.subscriptions[e]},a.subscribe=function(e){this.subscriptions[e]=!0},a.unsubscribe=function(e){delete this.subscriptions[e]}},{"./Log.js":9}],6:[function(e,t,n){"use strict";function r(e){this.logonManager=e,this._lfp=new a,e.addEventListener("xhrlogon",this),e.addEventListener("xhrlogoncomplete",this),e.addEventListener("xhrlogonfailed",this)}var i,o,a=e("./DefaultLogonFrameProvider.js"),s=e("./LogonManager.js"),u=e("./URL.js");t.exports=r,r.getInstance=function(){return i},r.startup=function(){return i||(i=new r(s.startup())),i},r.shutdown=function(){i&&(i.shutdown(),i=null)},o=r.prototype,Object.defineProperties(o,{logonFrameProvider:{get:function(){return this._lfp},set:function(e){e?this._lfp=e:this._lfp=new a}}}),o.shutdown=function(){var e;e=this.logonManager,e&&(e.removeEventListener("xhrlogon",this),e.removeEventListener("xhrlogoncomplete",this),e.removeEventListener("xhrlogonfailed",this))},o.getFrameLoadHandler=function(e,t,n){var r,i;return n=n||300,r=function(){i&&clearTimeout(i),i=setTimeout(function(){e.show()},n)}},o.onXHRLogon=function(e){var t,n,r;this.cancelXHRLogon(),t=new u(e.channel.url),t.setParameter("xhr-logon","iframe"),n=this.logonFrameProvider,r=n.create(),r&&(r.onload||(r.onload=this.getFrameLoadHandler(n,r.id)),r.src=t.href),this.pending=n},o.onXHRLogonComplete=function(){this.pending&&(this.pending.destroy(),this.pending=void 0)},o.cancelXHRLogon=function(){this.pending&&(s.getInstance().abortXHRLogon(),this.onXHRLogonComplete())},o.handleEvent=function(e){var t;switch(e.type){case"xhrlogon":t=e.request,t&&this.onXHRLogon(t);break;case"xhrlogoncomplete":this.onXHRLogonComplete();break;case"xhrlogonfailed":this.onXHRLogonComplete()}}},{"./DefaultLogonFrameProvider.js":4,"./LogonManager.js":10,"./URL.js":11}],7:[function(e,t,n){"use strict";function r(e){this.provider=e}function i(e,t){return setTimeout(function(){e.window||e.createWindow()},t)}var o,a=e("./events.js"),s=e("./FrameLogonManager.js"),u=e("./Log.js").logger;t.exports=r,o=r.prototype,r.frameCounter=0;var c='
Authentication required
';Object.defineProperty(o,"src",{get:function(){return this.url},set:function(e){this.initialize(e)}}),o.initialize=function(e){var t,n=this;this.close(),this.closed=!1,this.url=e,this.createPollingFrame(),t=i(n,500),a.addEventListener(this.frame,"load",function(){t&&clearTimeout(t),t=i(n,500)})},o.closeFrame=function(){this.frame&&(document.body.removeChild(this.frame),this.frame=void 0)},o.close=function(){try{this.closed=!0,this.pollIntervalId&&(clearInterval(this.pollIntervalId),this.pollIntervalId=void 0),this.windowIntervalId&&(clearInterval(this.windowIntervalId),this.windowIntervalId=void 0),this.closeAlertWindow(),this.closeFrame(),this.window&&(setTimeout(function(){window.focus()},100),this.window.close(),this.window=void 0)}catch(e){u.warning("Error while closing logon window: "+e.message)}},o.cancelLogon=function(){this.closed||(u.warning("XHR Logon cancelled"),this.close(),s.getInstance().cancelXHRLogon())},o.createPollingFrame=function(){function e(){"complete"===document.readyState&&document.body.appendChild(t)}var t,n;this.closed||(r.frameCounter+=1,n="xhrLogonFrame"+r.frameCounter,t=document.createElement("iframe"),t.id=n,t.style.display="none","complete"===document.readyState?document.body.appendChild(t):a.addEventListener(document,"readystatechange",e),this.frame=t,t.src=this.url)},o.onWindowOpenFailed=function(){u.warning("Failed to open logon window"),this.cancelLogon(),this.provider.dispatchWindowFailedEvent()},o.createAlertWindow=function(){var e=this;this.alertContainer&&this.closeAlertWindow(),this.alertContainer=document.createElement("div"),this.alertContainer.className="alertContainer",this.alertContainer.innerHTML=c,document.body.appendChild(this.alertContainer),setTimeout(function(){var t=document.getElementById("POPUP_LOGIN_LINK");t.onclick=function(){e.createWindow()}})},o.closeAlertWindow=function(){this.alertContainer&&(this.alertContainer.parentNode.removeChild(this.alertContainer),this.alertContainer=null)},o.createWindow=function(){var e,t=this;e=window.open(this.url),e&&!e.closed||(u.warning("Failed to open logon window, alerting user"),this.createAlertWindow()),this.window=e,a.addEventListener(e,"load",function(){u.info("Logon window opened"),t.pollIntervalId&&clearInterval(t.pollIntervalId),t.closed||(t.pollIntervalId=setInterval(function(){t.poll()},5e3),t.windowIntervalId||(t.windowIntervalId=setInterval(function(){var e=t.window;try{!e||e.closed?t.cancelLogon():"function"==typeof e.notifyParent&&t.poll()}catch(e){u.warning("Logon polling failed: "+e.message)}},300)),setTimeout(function(){t.poll()},300))}),a.addEventListener(e,"close",function(){t.cancelLogon()}),setTimeout(function(){try{t.window&&t.window.focus()}catch(e){u.warn("Failed to switch focus to logon window")}},300)},o.poll=function(){this.window&&this.window.closed?this.cancelLogon():(this.closeFrame(),this.createPollingFrame())}},{"./FrameLogonManager.js":6,"./Log.js":9,"./events.js":14}],8:[function(e,t,n){"use strict";function r(){this.p=[],this.r=[],this.f=[]}var i;t.exports=r,i=r.prototype,String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),i.add=function(e){switch(typeof e){case"string":this.p.push(e);break;case"object":if(!(e instanceof RegExp))throw new TypeError("Unsupported ignore rule type");this.r.push(e);break;case"function":this.f.push(e);break;default:throw new TypeError("Unsupported ignore rule type")}},i.ignored=function(e){var t;return t=this._prefix(e)||this._regexp(e)||this._function(e)},i.clear=function(){this.p=[],this.r=[],this.f=[]},i._prefix=function(e){var t,n,r,i;for(i=!1,t=this.p,r=t.length,n=0;n=200&&e<300||304===e}e("./xhr.js");var o,a,s,u=e("./events.js").createEvent,c=e("./EventHandlers.js"),l=e("./IgnoreList.js"),p=e("./Log.js").logger,f=e("./XHRLogonFilter.js"),d=XMLHttpRequest;o={AUTHENTICATED:0,UNAUTHENTICATED:1,PENDING:2},s=["xhrlogon","xhrlogoncomplete","xhrlogonfailed","xhrlogonaborted"],t.exports=r,r.startup=function(e){return a||(a=new r(e)),a},r.shutdown=function(){a&&(a.shutdown(),a=void 0)},r.getInstance=function(){return a},r.prototype.triggerLogonOnSyncRequest=!0,r.prototype.addEventListener=function(e,t){this.handlers.add(e,t)},r.prototype.removeEventListener=function(e,t){this.handlers.remove(e,t)},r.prototype.dispatchEvent=function(e){this.handlers.dispatch(e)},r.prototype.dispatchLogonEvent=function(e){var t;t=u("xhrlogon"),t.request=e,this.dispatchEvent(t)},r.prototype.dispatchLogonCompletedEvent=function(e){var t;t=u("xhrlogoncomplete"),t.xhrLogon=e,this.dispatchEvent(t)},r.prototype.dispatchLogonFailedEvent=function(e){var t;t=u("xhrlogonfailed"),t.xhrLogon=e,this.dispatchEvent(t)},r.prototype.dispatchLogonAbortedEvent=function(e){var t;t=u("xhrlogonaborted"),t.realm=e,this.dispatchEvent(t)},r.prototype.getRealmStatus=function(e){var t;return t=this.realms[e],void 0===t&&(t=o.UNAUTHENTICATED,this.realms[e]=t),t},r.prototype.isQueued=function(e){var t,n,r;if(this.pending&&this.pending.channel&&this.pending.channel.xhr===e)return!0;for(t=0,n=this.queue.length;t0&&(n?(p.info("Authentication succeeded for realm "+t+", repeating requests."),this.retry(a)):(p.warning("Authentication failed for realm "+t),this.abort(a))),n?this.dispatchLogonCompletedEvent(e):this.dispatchLogonFailedEvent(e),this.queue.length>0&&this.onXHRLogon(this.queue.shift())},r.prototype.abortXHRLogon=function(e){var t,n,r,i,a;if(!e&&this.pending&&(e=this.pending.header.realm),e){for(t=this.queue,n=[],r=[],this.realms[e]=o.UNAUTHENTICATED,this.pending&&(e===this.pending.header.realm?n.push(this.pending):t.push(this.pending)),this.pending=void 0,a=t.length,i=0;i0&&(p.warning("Authentication aborted for realm "+e),this.abort(n))}else p.info("No pending authentication, ignoring abort");this.dispatchLogonAbortedEvent(e),this.queue.length>0&&this.onXHRLogon(this.queue.shift())},r.prototype.retry=function(e){var t,n,r,i;for(n=e.length,t=0;t0&&(e+="&"),e+=n,r&&(e+="=",e+=r));return e.length>0&&(e="?"+e),e}}})},{}],12:[function(e,t,n){"use strict";function r(e,t){this.manager=e,this.channel=t,this.manager.ignore&&this.manager.ignore.ignored(t.url)||t.xhr._addEventListener("readystatechange",this)}var i,o,a=2,s=e("./XHRLogonRequest.js");t.exports=r,i=r.prototype,i.sending=function(e){var t;this.manager.ignore&&this.manager.ignore.ignored(e.url)||(t=e.xhr,t.getRequestHeader("X-XHR-Logon")||t.setRequestHeader("X-XHR-Logon",'accept="iframe"'),t.getRequestHeader("X-Requested-With")||t.setRequestHeader("X-Requested-With","XMLHttpRequest"))},i.handleEvent=function(e){var t,n,r,i;if(t=this.channel,n=t.xhr,!(n.readyState2&&this._checkEventSubscriptions(),this._getHandlers().dispatch(e)},a.suspendEvents=function(){this._getHandlers().suspend=!0},a.resumeEvents=function(e){var t;t=this._getHandlers(),t.suspend=!1,e&&t.releaseEvents()},a.getEventHandler=function(){var e,t;return t=this._fnHandler,t||(e=this,t=function(t){e.handleEvent(t)},this._fnHandler=t),t},a._checkEventSubscription=function(e,t){t=t||this._getHandlers(),this._saveOnEvent(e),t.hasSubscribers(e)?t.subscribed(e)||(this._addEventListener(e,this.getEventHandler()),t.subscribe(e)):t.subscribed(e)&&(this._removeEventListener(e,this.getEventHandler()),t.unsubscribe(e))},a._checkEventSubscriptions=function(){var e,t,n;for(e=this._getHandlers(),n=i.length,t=0;t=200)s.resolve([this.response,r,r.statusText]);else{var e=new Error("Request Failed: "+this.statusText+" URI: "+t);e.status=this.status,e.statusText=this.statusText,e.getResponseHeader=this.getResponseHeader.bind(this),""!==this.responseType&&"text"!==this.responseType||(e.responseText=this.responseText),s.reject(e)}},r.send(n.data),s.promise}var u=jQuery.ajax(t,n),c=e.defer();return u.then(function(e,t,n){delete u.then,c.resolve([e,u,t])},function(e,n,r){var i=u.responseJSON&&u.responseJSON.Message?"\n\nMessage: "+u.responseJSON.Message:"",o=new Error("Request failed: "+u.statusText+" URI: "+t+i);o.status=u.status,o.statusText=u.statusText,o.responseText=u.responseText,o.responseJSON=u.responseJSON,o.textStatus=n,o.errorThrown=r,o.getResponseHeader=u.getResponseHeader.bind(u),o.jqXHR=e,c.reject(o)}),c.promise},a={};e.sap.ajax=function(e,t){var n=a[e];if(r.isEmpty(a)||void 0===n)return o(e,t);if(null===n){var i=o(e,t);return a[e]=i,i}return delete a[e],n},e.sap.ajax.setPrefetchUri=function(e){a[e]=null},e.sap.require=function(t,n){var r=e.defer();return require([t],function(e){e||n?r.resolve(e):r.reject(new Error(t+" could not be loaded. The file exists, but is either defining a module with a different name or not defining anything. Please remove the module name or add the missing define."))},function(e){r.reject(new Error("Error loading module from path '"+t+"'\nOriginal error message: "+e.message+"\nError stack: "+e.stack+"\n -----------"))}),r.promise},e.sap.ui=e.sap.ui||{},e.sap.ui.define=function(t){var n=e.defer();return sap.ui.define([t],function(e){e?n.resolve(e):n.reject(new Error(t+" could not be loaded. The file exists, but is either defining a module with a different name or not defining anything. Please remove the module name or add the missing define."))},!1),n.promise}}),define("sap/watt/core/Proxy",["./Interface","./DebugHooks","sap/watt/lib/lodash/lodash","./Constants","./UtilsCore","sap/watt/core/UtilsQSap"],function(e,t,n,r,i,o){"use strict";var a=function(){this._mListeners={}};a.prototype._mListeners=null,a.prototype.emit=function(e){var t=Array.prototype.slice.call(arguments,1),n=[],r=[];if(t.push({}),this.hasListeners(e))for(var i=this._mListeners[e].concat(),o=0;o0)for(var o=0;o0?(e.numberOfAllowedEmits--,0===e.numberOfAllowedEmits&&t.push({listener:e.listener,context:e.context})):n=!1),n},a.prototype.on=function(e,t,n){this._on(e,t,n)},a.prototype.once=function(e,t,n){this._on(e,t,n,1)},a.prototype._on=function(e,t,n,r){if(this.hasListener(e,t,n))throw new Error("Listener for event '"+e+"' is already registered");var i=this._mListeners[e]=this._mListeners[e]||[];i.push({listener:t,context:n,numberOfAllowedEmits:r})},a.prototype.off=function(e,t,n){this._visitListeners(e,function(e,t){return e.splice(t,1),!1},t,n)},a.prototype.hasListeners=function(e){if(!this._mListeners)throw new Error("EventEmitter constructor not called");return this._mListeners[e]&&this._mListeners[e].length>0},a.prototype.hasListener=function(e,t,n){var r=!1;return this._visitListeners(e,function(){return r=!0,!1},t,n),r},a.prototype._visitListeners=function(e,t,n,r){var i=this.hasListeners(e);if(i)for(var o=this._mListeners[e],a=0;a1&&e.slice(0,1).toUpperCase()+e.slice(1)},c.prototype._invokeImplMethod=function(e,t,n){var r=this;return this._getImpl().then(function(i){return r._invokeMethod(i,e,t,n)})},c.prototype._invokeMethod=function(e,t,n,r){r=r!==!1;var i=this,o=null;if(e[t])o=e[t].apply(e,n),Q.isPromise(o)||(o&&o.constructor===Array&&o.length>0&&Q.isPromise(o[0])?(console.error("Warning: unhandeled promisses array"),o=Q.all(o)):o=Q(o)),o=o.catch(function(e){throw i._addModuleContextToError(e)}),o.timeout(c.SERVICE_METHODS_TIMEOUT).catch(Q.getBluebirdPromise().TimeoutError,function(){sap.watt.fireBrowserEvent("webide_service_method_timeout","module",i._mConfig.module,"method",t)}).catch(function(){});else if(r){var a=this._oInterface.getMethodDefaultReturnValue(t);if(a)o=a.default,"object"===a.type&&(o=jQuery.extend(!0,{},o)),e[t]=function(){return Q(o)};else{if(!sap.watt.getEnv("devMode"))return console.error("Method: "+t+" not implemented"),Q();i._error("Method: "+t+" not implemented")}}return Q(o)},c.prototype._callLifeCycleMethod=function(e,t,n){var r=this;return this._fireEvent("$before"+this._charToUpperCase(t)).then(function(){return r._invokeMethod(e,t,n,!1)}).timeout(c.LIFECYCLE_METHODS_TIMEOUT,"Timeout during method "+t+" of service "+r._sName)},c.prototype._getImplSync=function(){return this._oImplSync},c.prototype._getImpl=function(){if(!this._oImpl){var e=this;this._oImpl=this._createImplInstance().then(function(t){return e._oImplSync=t,t})}return this._oImpl},c.prototype._createImplInstance=function(){var e=this;if(this._mConfig.factory)return this._oContext.service[this._mConfig.factory].create(this._sName,{self:this._mConfig.self,eventEmitter:this._getEventEmitter(),configuration:this._mConfiguration});if(this.$isLazy()){var t=n.clone(this._mConfig);return t.lazy=!1,t.context=this._oContext,t.self=this,t.configuration=n.assign(this._mConfiguration,this._mConfig),t.eventEmitter=this._getEventEmitter(),c.create(this._sName,t)}var r=this._mConfig.module,i=function(t){var n=t;return"function"==typeof t?n=new n:(n.__bProxyImplInUse&&e._error("Error loading "+t+": Module instance is already in use. Please define module as a class by returning a function instead of an object"),n.__bProxyImplInUse=!0),n.context=e.context,delete e.context,e._callLifeCycleMethod(n,"init",null).then(function(){return e._callLifeCycleMethod(n,"configure",[e._mConfiguration])}).then(function(){return n})};return"string"==typeof r?Q.sap.require(r).then(i).fail(function(t){return e._fireModuleErrorEvent(r,t)}):i(r)},c.prototype._fireModuleErrorEvent=function(e,t){var n=e.substr(0,e.indexOf("/"));return sap.watt.fireBrowserEvent("webide_module_error","pluginName",n),Q.reject(t)},c.prototype._error=function(e,t){c._error(e,this._sName,t)},c.prototype._decorateProxyWithInterfaceMethods=function(){for(var e=this._oInterface,t=e.getMethods(),n=Object.keys(t),r=n.length,i=0;i(.+)}$"),t=function(e){this._sLocale=window.sap.watt.getLocale(),this._defaultBundleName="i18n";var t={};"string"==typeof e?t[this._defaultBundleName]=e:t=e;for(var n in t){var r,i=t[n].indexOf(".hdbtextbundle");i>0?(r=".hdbtextbundle",t[n]=t[n].substr(0,i)):r=".properties";var o=/([^\/]*)\/(.*)/.exec(t[n]);t[n]=sap.ui.resource(o[1],o[2]+r)}this._mI18nBundles=t,this._aResourceBundles={},this.locale=this._sLocale,this.bundles=t};return t.prototype={},t.prototype.getText=function(t,n,r){if(1===arguments.length){var i=e.exec(arguments[0]);i?(t=i[1],n=i[2]):(n=arguments[0],t=this._defaultBundleName)}else 2===arguments.length&&Array.isArray(arguments[1])&&(r=arguments[1],n=arguments[0],t=this._defaultBundleName);if("string"!=typeof t&&"string"==typeof n&&(!r||Array.isArray(r)))throw new Error("Wrong arguments");if(!this._aResourceBundles[t]){var o=this._mI18nBundles[t];if(!o)throw new Error("Error getting i18n resource bundle '"+t+"'");this._aResourceBundles[t]=jQuery.sap.resources({url:o,locale:this._sLocale})}return this._aResourceBundles[t].getText(n,r)},t.prototype.applyTo=function(e){var t=this._mI18nBundles;jQuery.isArray(e)||(e=[e]);for(var n in t){var r=new sap.ui.model.resource.ResourceModel({bundleUrl:t[n],bundleLocale:this.locale});e.forEach(function(e){e.setModel(r,n)})}},t}),define("sap/watt/core/Validations",["../lib/lodash/lodash"],function(e){"use strict";function t(t){function r(e){return e._getImpl().then(function(e){return e._getImpl()})}var i=e.mapValues(t,function(e){return{expectedInterface:e._oInterface,actualImplPromise:r(e)}}),o=e.map(i,function(e){return e.actualImplPromise});return Q.all(o).then(function(t){var r=0,o=e.mapValues(i,function(e){return{expectedInterface:e.expectedInterface,actualImpl:t[r++]}}),a=e.mapValues(o,function(e){return n(e)}),s=e.omitBy(a,function(t){return e.isEmpty(t)});return s})}function n(t){var n=t.expectedInterface,i=t.actualImpl,o=r(n),a=e.functions(i),s=e.difference(o,a);return s}function r(t){var n=e.map(t._mInterfaces,function(t){return e.keys(e.omitBy(t.methods,function(e){return e.returns&&e.returns.hasOwnProperty("default")}))}),r=e.union(e.flatten(n));return r}function i(t,n,r){var i=[];e.isString(e.head(n))?i=n:e.isObject(e.head(n))&&(i=o(n)),r&&(i=e.union(i,r));var a=c(t),s=a?t.requires.services:[];return e.difference(s,i)}function o(t){var n=e.map(t,function(t){var n=u(t);return n?e.keys(t.provides.services):[]});return e.uniq(e.flatten(n))}function a(t){if(!s(t))return[];var n=c(t),r=u(t),i=n?t.requires.services:[],o=r?e.keys(t.provides.services):[],a=e.keys(t.configures.services),l=e.map(a,function(e){return e.split(":")[0]}),p=e.reject(l,function(t){return e.includes(i,t)}),f=e.reject(l,function(t){return e.includes(o,t)});return e.intersection(p,f)}function s(t){return e.isObject(t.configures)&&e.isObject(t.configures.services)}function u(t){return e.isObject(t.provides)&&e.isObject(t.provides.services)}function c(t){return e.isObject(t.requires)&&e.isArray(t.requires.services)}return{checkAllMethodsOnInterfaceImplemented_forAll:t,checkAllMethodsOnInterfaceImplemented:n,checkConfiguredServicesWhichAreNotRequiredOrProvided:a,checkMissingRequiredServices:i}}),define("sap/watt/core/ErrorMessages",["../lib/lodash/lodash"],function(e){"use strict";function t(e){var t="Not all required services are provided: \n";return r(e,t,"missing required services --->")}function n(e){var t="Inconsistent Service Definition\t\t\t- Not all configured services are required or provided: \n";return r(e,t,"services not required or provided --->")}function r(t,n,r){var i=e.reduce(t,function(e,t,n){var i="Plugin: "+n+" "+r+" "+t.join(", ")+"\n";return e+i},n);return i}return{getErrorMessage_configured_but_not_required_or_provided:n,getErrorMessage_missing_required_service:t}}),define("sap/watt/core/PluginRegistry",["./Service","./ServiceRegistry","./Proxy","./Interface","./ConfigPreload","./I18nBundle","./Validations","./ErrorMessages","./UtilsCore","sap/watt/lib/lodash/lodash"],function(e,t,n,r,i,o,a,s,u,c){"use strict";function l(e,t){return c.forEach(t,function(t,n){e[n]?Array.isArray(t)?e[n]=jQuery.merge(e[n],t):c.isPlainObject(t)?e[n]=l(e[n],t):e[n]=t:e[n]=t}),e}function p(e,t){var n=!0,r=!0;return c.endsWith(e,".Plugin")&&(console.warn("Deprecation Warning: Wrong pattern for plugin 'name' "+e+". Please use a valid namespace, e.g. sap.watt.common.myplugin. To use a Plugin.js please define a 'module', e.g. 'module':'sap.watt.common.myplugin/Plugin.js"),n=!1),t&&0===t.indexOf("./")&&(console.warn("Deprecation Warning: Wrong pattern for plugin 'module' "+e+". To use a Plugin.js please define a 'module', e.g. 'module':'sap.watt.common.myplugin/Plugin.js. If no module is needed, delete it."),r=!1),!r&&!n}function f(e){var t=c.mapValues(e,function(e){return a.checkConfiguredServicesWhichAreNotRequiredOrProvided(e)}),n=c.omitBy(t,function(e){return c.isEmpty(e)});return n}function d(e,t){var n=t.getAllServiceNames(),r=c.mapValues(e,function(e){return a.checkMissingRequiredServices(e,n)}),i=c.omitBy(r,function(e){return c.isEmpty(e)});return i}function h(e,t){var n={};n[e.getMetadata().name]=e.getMetadata();var r=f(n),i=d(n,t),o=[];if(c.isEmpty(r)||o.push(s.getErrorMessage_configured_but_not_required_or_provided(r)),c.isEmpty(i)||o.push(s.getErrorMessage_missing_required_service(i)),!c.isEmpty(o))throw new Error("Problems detected while checking service definition consistency:\n"+o.join("--------------------\n"))}function m(e,t){for(var n=0;n:, but is '"+n+"'");var i=_.get(r[0]),o=r[1];"string"==typeof t&&(t=[t]),t.forEach(function(t){var n,r,a=t.split(":");if(1===a.length){if(n=a[0],r=e._oProxy,!r)throw new Error("Target service of event subscription is not available. Please define a plugin 'module' in the plugin.json of plugin: "+e.getMetadata().name)}else{var s=a[0];if(n=a[1],r=_.get(s),!e._oMetadata.provides||!e._oMetadata.provides.services||!e._oMetadata.provides.services[s])throw new Error("An event handling service needs to be provided by the plugin that defines the subscription - Plugin: "+e._oMetadata.name+" - Service: "+s)}if(n){var u=function(e,t){return r.$invoke(n,t||{},e)};i.attachEvent(o,u)}})})},E.prototype._initServiceConfigurations=function(){var e=this._getServiceMetadataFor("configures"),t=this;c.forEach(e||{},function(e,n){var r=n.split(":"),i=null;if(2!==r.length)throw new Error("Service Configuration: Syntax error in configuration for service '"+n+"' in Plugin '"+this.getMetadata().name+"'. No configuration property given.'");n=r[0],i=r[1];var o=_.get(n);o.attachEventOnce("$beforeInit",function(){return t._enrichServiceConfigurationValueAndConfigureService(i,e,o)})})},E.prototype._configureAnonymousService=function(e,t){var n=this,r=[];return c.forEach(t||{},function(t,i){r.push(n._enrichServiceConfigurationValueAndConfigureService(i,t,e))}),Q.all(r)},E.prototype._enrichServiceConfigurationValueAndConfigureService=function(e,t,n){return this._enrichServiceConfigurationValue(e,t,n).then(function(t){return n.$configure(e,t)})},E.prototype._enrichServiceConfigurationValue=function(e,t,n){var r=this,i=n.$getInterface(),o=n.getProxyMetadata().getName()||"anonymous";if(!i.hasConfigurationProperties())throw new Error("Service configuration: No configuration defined for '"+o+"'. Please define the configuration in the interface");var a=i.getConfigurationProperties(),s=a[e];if(!s)throw new Error("Service Configuration: Configuration property '"+e+"' not defined in configuration for service '"+o+"' in Plugin '"+this.getMetadata().name+"'.'");var u=s.type,c=[];if(i.isConfigurationPropertyMultiple(e)){if(!Array.isArray(t))throw new Error("Service configuration: Multiple configuration property '"+e+"' of service '"+o+"' needs to be an array");c=t.map(function(e,n){return r._enrichServiceConfigurationValueByType(u,e,i).then(function(e){t[n]=e})})}else c.push(this._enrichServiceConfigurationValueByType(u,t,i).then(function(e){t=e}));return Q.all(c).then(function(){return t})},E.prototype._enrichServiceConfigurationValueByType=function(e,t,n){var r=this,i=[];if(null===t||void 0===t)return Q(t);if(n.isComplexType(e))if(Array.isArray(e)){var o=e[0];i=t.map(function(e,i){return r._enrichServiceConfigurationValueByType(o,e,n).then(function(e){t[i]=e})})}else c.forEach(e,function(e,o){var a=e;c.isPlainObject(e)&&(a=e.type),i.push(r._enrichServiceConfigurationValueByType(a,t[o],n).then(function(e){t[o]=e}))});else n.isProxyType(e)?i.push(this._getServiceByConfigurationValue(t,e).then(function(e){t=e})):t=this._getTextFromResourceBundle(t);return Q.all(i).then(function(){return t})},E.prototype._getServiceByConfigurationValue=function(e,t){var r=this;if("string"==typeof e&&0===e.indexOf("@")){var i=e.substring(1),o=_.get(i);return o.instanceOf("Factory")&&"Factory"!==t?o.create().then(function(e){return e}):Q(o)}var a,s={};if(c.isString(e)?(s.implements=t,e.indexOf("/")!=-1?s.module=e:s.className=e):(s=e,a=e.configuration,delete s.configuration,s.implements&&""!==s.implements||(s.implements=t)),s.factory){var i=s.factory.substring(1),o=_.get(i);return o.create().then(function(e){return r._configureAnonymousService(e,a).then(function(){return e})})}return n.create(e,s).then(function(e){return r._configureAnonymousService(e,a).then(function(){return e.context.service=r._oContext.service,e.context.i18n=r._oContext.i18n,e})})},E.prototype._createServiceObjectForContext=function(e,t){var n=t.slice(0);for(i in e)n.push(i);for(var r={},i="",o=null,a=0;a")>1){var t=e.match(/{(.+)>(.+)}/);if(3===t.length){var n=t[1],r=t[2];e=this._oContext.i18n.getText(n,r)}}return e};var S=function(){this._mRegistry={},this._assertUtils=w;var e=this;window.addEventListener("webide_module_error",function(t){if(!localStorage.getItem(e._LOCALSTORAGE_INVALIDPLUGININFO))for(var n=t.pluginName,r=c.values(e._mRegistry),i=0;i\n";if(n)throw new Error(o+r);console.log(o+r)}}return r(e,"metadata loading"),this._createPlugins(e.successes,t,n).then(function(t){return r(t,"creation"),{successes:t.successes,failures:e.failures.concat(t.failures)}})},S.prototype._removeFailedPluginsFromPluginRegistry=function(e){var t=this;c.forEach(e,function(e){delete t._mRegistry[e.baseURI]})},S.prototype._createPlugins=function(e,t,n){if(c.isEmpty(e))return Q({successes:[],failures:[]});var r=this;return r._registerPlugins(e,t,n).then(function(e){return r._initServices(e.successes).then(function(t){return r._verifyPluginsServices(t.successes).then(function(n){return r._initPlugins(n.successes).then(function(r){var i=r.failures.concat(e.failures,t.failures,n.failures);return{successes:r.successes,failures:i}})})})})},S.prototype.getInvalidPluginInfo=function(){var e=localStorage.getItem(this._LOCALSTORAGE_INVALIDPLUGININFO),t=null;return e&&(t=JSON.parse(e)),t},S.prototype._registerPlugins=function(e,t,n){var r=this;if(c.isEmpty(e))return Q({successes:[],failures:[]});var i=this.getInvalidPluginInfo(),o=c.map(e,function(e){return n===!1&&i&&i.baseURI===e.baseURI?Q.reject(i):r._register(e,t)});return Q.allSettled(o).then(function(t){return v(e,t)})},S.prototype._verifyPluginsServices=function(e){if(c.isEmpty(e))return Q({successes:[],failures:[]});var t=this,n=c.map(e,function(e){return Q.fcall(function(){h(e,t.$getServiceRegistry())})});return Q.allSettled(n).then(function(t){return g(e,t)})},S.prototype._initServices=function(e){if(c.isEmpty(e))return Q({successes:[],failures:[]});var t=c.map(e,function(e){return Q(e).invoke("initServices").then(function(){console.log("READY: "+e.getMetadata().name)})});return Q.allSettled(t).then(function(t){return g(e,t)})},S.prototype._initPlugins=function(e){if(c.isEmpty(e))return Q({successes:[],failures:[]});var t=c.map(e,function(e){return e.initialize()});return Q.allSettled(t).then(function(t){return g(e,t)})},S.prototype._register=function(e,t){var n=e.baseURI;if(this._mRegistry[n]){var r=Q.defer();return r.reject(new Error("Plugin "+n+" is already registered")),r.promise}var i=this;return console.log("CREATE: "+n),E.create(e,t).then(function(e){return i._mRegistry[n]=e,e})},S.prototype.get=function(e){var t=this._mRegistry[e];return t||jQuery.sap.log.error("Plugin not registered",e),t&&t.getMetadata()},S.prototype._loadPluginsMetaData=function(e){var t=c.map(e,function(e){if(c.has(e,"sURI")){var t=e.sURI.replace(/\/$/,"");return E.loadMetadata(t,"plugin.json").then(function(t){if(!c.isUndefined(e.pluginName)&&e.pluginName!==t.name)throw new Error("The plugin that is referenced as "+e.pluginName+" has a different name "+t.name+' in its "plugin.json" file');return t.optionalFeature=e.optionalFeature,t.required=e.required,t})}return Q(E._ensureSections(e,e.baseURI))});return Q.allSettled(t).then(function(t){return v(e,t)})},new S}),define("sap.watt.toolsets.javascript/service/watt/pluginProposalUtil",["sap/watt/lib/orion/javascript/esprima/esprimaJsContentAssist","sap/watt/lib/orion/javascript/esprima/esprimaVisitor","sap/watt/core/PluginRegistry","sap/watt/core/Service"],function(e,t,n,r){"use strict";function i(e,t){var n=t.getEntity().getParentPath();return t.getProject().then(function(t){if(null!==t){var r=t.getEntity();return r.isRoot()?null:t.getCurrentMetadata(!0,{hidden:!1}).then(function(t){var r=t.filter(function(e){return"plugin.json"===e.name&&0===n.indexOf(e.parentPath)});return r.length>0&&r[0].path?e.documentProvider.getDocument(r[0].path):null})}return null})}function o(e,t){if(e.range[1]===t.offset)if("ThisExpression"===e.type)t.thisName="this";else{var n=h(e,t);n&&(t.thisName=n)}return!t.thisName}function a(e,t){if(e.range[0]<=t.offset){if("VariableDeclarator"===e.type&&"Identifier"===e.id.type)if(e.init&&"ThisExpression"===e.init.type)t.setVarNames[e.id.name]="this";else{var n=h(e.init,t);n&&(t.setVarNames[e.id.name]=n)}e.range[1]===t.offset&&"Identifier"===e.type&&t.setVarNames[e.name]&&(t.thisName=t.setVarNames[e.name])}return!t.thisName}function s(e,t,n,r,i){var o=[];if("this"==e)u("context",n,i)&&o.push(l("context"));else if("this.context"==e)u("service",n,i)&&o.push(l("service"));else if("this.context.service"==e){var a=f(t);for(var s in a){var h=a[s];u(h,n,i)&&o.push(l(h))}}else{var m="this.context.service.",g=e.indexOf(m);if(0===g){var v=e.substring(g+m.length);if(f(t).indexOf(v)!==-1){var y=d(v);for(var x in y)u(x,n,i)&&o.push(p(x,y[x],r))}}}return o.length>0&&o.push(c()),o}function u(e,t,n){return n?0==e.indexOf(t):0==e.toLowerCase().indexOf(t.toLowerCase())}function c(){return{proposal:"",description:"---------------------------------",style:"hr",unselectable:!0}}function l(e){return{proposal:e,description:e+" : Object",category:"object",style:"emphasis",overwrite:!0}}function p(t,n,r){var i;n.returns&&(i=n.returns.type?n.returns.type instanceof Array?"Array":n.returns.type instanceof Object?"Object":"undefined":n.returns);var o=new e.EsprimaJavaScriptContentAssistProvider,a=o.calculateFunctionProposal(t,n,r-1);return{proposal:a.completion,description:a.completion+" : "+i,category:"function",positions:a.positions,escapePosition:r+a.completion.length,style:"emphasis",overwrite:!0}}function f(e){return e.requires&&e.requires.services?e.requires.services:[]}function d(e){try{var t=r.get(e);if(t)return t.$getInterface().getMethods()}catch(e){return console.log(e),[]}}function h(e,t){for(var n="";e&&"MemberExpression"===e.type;){if(e.property&&"Identifier"===e.property.type&&(n=n?e.property.name+"."+n:e.property.name+n),"ThisExpression"===e.object.type){n="this."+n;break}if("Identifier"===e.object.type&&t.setVarNames[e.object.name]){n=t.setVarNames[e.object.name]+"."+n;break}e=e.object}return n}var m=["/sap/watt/common/plugin/","/sap/watt/uitools/plugin/"],g={};return{getPluginName:function(e){if(e)for(var t in m){var n=m[t],r=e.indexOf(n);if(r>=0){for(var i=n.split("/",3).join(".")+".",o=e.split("/"),a="",s=0;s=0&&"js"===t.split(".")[1]&&delete g[e.params.document.getEntity().getFullPath()]; return Q()}}}),define("sap.watt.toolsets.javascript/service/Constants",[],function(){return{workerState:{ready:"ready",synchronized:"synchronized",error:"error",successComputeProposals:"successComputeProposals",successComputeSummary:"successComputeSummary"},workerAction:{start:"start",syncContext:"syncContext",computeProposals:"computeProposals",computeHintProposals:"computeHintProposals",computeModuleProposals:"computeModuleProposals",computeSummary:"computeSummary"}}}),define("sap.watt.toolsets.javascript/service/JsCodeAssistanceWorkerManager",["./Constants","sap/watt/lib/lodash/lodash"],function(e){function t(e){return{selection:e.selection,offset:e.offset,buffer:e.buffer,prefix:e.prefix,caseSensitive:e.caseSensitive,coords:e.coords?{pageX:e.coords.pageX,pageY:e.coords.pageY}:{},inferredOnly:!0,bComment:e.bComment,bSuffix:e.bSuffix,ignoreContextProposals:e.ignoreContextProposals,ignoreSnippetProposals:e.ignoreSnippetProposals,ignoreKeywordProposals:e.ignoreKeywordProposals,indentation:e.indentation,isAutoHint:e.isAutoHint,tab:e.tab,targetFile:e.targetFile,token:e.token,aRowTokens:e.aRowTokens,insideDependencies:e.insideDependencies,isNodeProject:e.isNodeProject}}function n(t){this._webWorker=null,this._dfWorkerReady=Q.defer(),this._modulePath=null,this._isWorkerReady=function(){return this._dfWorkerReady&&this._dfWorkerReady.promise&&"fulfilled"===this._dfWorkerReady.promise.inspect().state},this._onWorkerResponse=function(t){t.data.workerState===e.workerState.error?(this.semaphore.leave(),this.client.dfWorker.reject(new Error("Error: unknown event!"))):t.data.workerState===e.workerState.ready?(this.client.dfWorkerReady.resolve(),delete this._starting):t.data.workerState===e.workerState.synchronized?(this.semaphore.leave(),this.client.bSynchronized=!0,delete this.client._syncInProgress,this.client.timestamp=t.data.timestamp,this.client.dfWorker.resolve()):(this.semaphore.leave(),t.data.workerState===e.workerState.successComputeProposals?this.client.oLastWorkerData.hasOwnProperty("prefix")&&null!==this.client.oLastWorkerData.prefix?this.client.dfWorker.resolve({proposals:t.data.hintProposals,requestId:t.data.requestId}):this.client.dfWorker.reject(new Error("Error: unknown event!")):t.data.workerState===e.workerState.successComputeSummary&&this.client.dfWorker.resolve({metaSymbol:t.data.metaSymbol,summary:t.data.summary}))},this._runWorker=function(){return this._webWorker&&this._isWorkerReady()?Q():this._webWorker&&this._webWorker._starting?this._dfWorkerReady.promise:(this._webWorker=new Worker(this._modulePath),this._webWorker._starting=!0,this._webWorker.addEventListener("message",this._onWorkerResponse),this._webWorker.client={dfWorkerReady:this._dfWorkerReady,dfWorker:null,bSynchronized:!1},this._webWorker.semaphore={locked:void 0,take:function(){return this.locked&&this.locked.promise.isPending()?this.locked.promise:(this.locked=Q.defer(),Q())},leave:function(){this.locked&&this.locked.promise.isPending()&&this.locked.resolve()}},this._dfWorkerReady.promise)},this._pushLibraryToWorker=function(e){if(this._isWorkerReady()){this._webWorker.client.dfWorker=Q.defer();for(var t,n={libraries:[]},r=[],i=new TextEncoder,o=0;o0)return"."===t.prefix.charAt(0)?b(e,t,n):v(a.workerAction.computeModuleProposals,t);if(0===t.prefix.length){var r=[b(e,t,n),v(a.workerAction.computeModuleProposals,t)];return Q.all(r).spread(function(e,t){var n=[];return e&&(n=n.concat(e)),t&&(n=n.concat(t)),n})}}function w(t,n,r,i){var o=this;if(i&&!r.isNodeProject){var a=[i.getDependentIndexes(r.targetFile,n,r.offset),i.getUI5ProjectInfo(r.targetFile)];return Q.spread(a,function(n,i){if(!n)return Q.reject(new Error("fail to get dependencies for cross file proposals"));var o=new e.OrionIndexer(n,r.targetFile,i),a=[];return n.insideDependencies?a.push(_(n.insideDependencies,r,o)):null==r.stringValue&&(a.push(v(t,r)),a.push(x(r,o))),Q.allSettled(a).then(function(e){for(var t=0,i=[];t0){var e=$.splice(0,1);return y(e[0])}return Q()})}function R(e){var t="",n=/[^a-zA-Z_0-9\$\u00A2-\uFFFF]+/;return e.token&&e.token.value&&(t=e.token.value.substr(0,e.cursorPosition.column-e.token.start)),e.token&&"string"===e.token.type?t.substring(1):t.split(n).slice(-1)[0]}function L(e){var t=[o.clearCach(e),s.destroy(e)];return Q.all(t)}function M(e){return o.clearCach(e)}function B(e){return o.clearCach(e)}var U,V,G=null,W=new Q.sap.Queue,H=new Q.sap.Queue,z=new r.LibraryTemplateContentAssistProvider,q=[],$=[],X={},K=function(){this.init=p,this.configure=f,this.getWordSuggestions=N,this.getSummaryFromMeta=j,this.onDeleted=L,this.onSaved=M,this.onTabClosed=B,this.getCalculatedPrefix=R};return K}),define("sap.watt.toolsets.javascript/service/jsrules",[],function(){"use strict";var e=".eslintrc",t=".eslintrc.ext",n=sap.watt.getEnv("context_root")+"jsrules",r={};return{init:function(){},fromHcp:function(){var i=this;if(Object.keys(r).length>0)return r;if("hcproxy"===sap.watt.getEnv("server_type")){var o={Accept:"*/*"};return this.context.service.ajaxrequest.createClient(null,o,null).then(function(o){return o.get(n+"/"+e).then(function(a){return a&&(r[e]=a),o.get(n+"/"+t).then(function(e){e&&(r[t]=e,i.context.service.usagemonitoring.report("centralRules","centralRulesUseSuccess").done())}).fail(function(e){i.context.service.log.info("Code Check","no central validation rules file found"+t+": "+e.message,["user"]).done()})}).fail(function(t){i.context.service.log.info("Code Check","no central validation rules file found"+e+": "+t.message,["user"]).done()})}).fail(function(e){i.context.service.log.error("Code Check","failed to create client in central validation rules"+e.message,["user"]).done()}).finally(function(){0===Object.keys(r).length&&(r[e]=void 0,r[t]=void 0)}).then(function(){return r})}return 0===Object.keys(r).length&&(r[e]=void 0,r[t]=void 0),r}}}),function(){var e=function t(n,r,i){function o(s,u){if(!r[s]){if(!n[s]){var c="function"==typeof e&&e;if(!u&&c)return c(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var p=r[s]={exports:{}};n[s][0].call(p.exports,function(e){var t=n[s][1][e];return o(t?t:e)},p,p.exports,t,n,r,i)}return r[s].exports}for(var a="function"==typeof e&&e,s=0;s2?arguments[2]:void 0,l=Math.min((void 0===c?a:i(c,a))-u,a-s),p=1;for(u0;)u in n?n[s]=n[u]:delete n[s],s+=p,u+=p;return n}},{105:105,108:108,109:109}],9:[function(e,t,n){"use strict";var r=e(109),i=e(105),o=e(108);t.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)t[s++]=e;return t}},{105:105,108:108,109:109}],10:[function(e,t,n){var r=e(37);t.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},{37:37}],11:[function(e,t,n){var r=e(107),i=e(108),o=e(105);t.exports=function(e){return function(t,n,a){var s,u=r(t),c=i(u.length),l=o(a,c);if(e&&n!=n){for(;c>l;)if(s=u[l++],s!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}}},{105:105,107:107,108:108}],12:[function(e,t,n){var r=e(25),i=e(45),o=e(109),a=e(108),s=e(15);t.exports=function(e,t){var n=1==e,u=2==e,c=3==e,l=4==e,p=6==e,f=5==e||p,d=t||s;return function(t,s,h){for(var m,g,v=o(t),y=i(v),x=r(s,h,3),b=a(y.length),_=0,w=n?d(t,b):u?d(t,0):void 0;b>_;_++)if((f||_ in y)&&(m=y[_],g=x(m,_,v),e))if(n)w[_]=g;else if(g)switch(e){case 3:return!0;case 5:return m;case 6:return _;case 2:w.push(m)}else if(l)return!1;return p?-1:c||l?l:w}}},{108:108,109:109,15:15,25:25,45:45}],13:[function(e,t,n){var r=e(3),i=e(109),o=e(45),a=e(108);t.exports=function(e,t,n,s,u){r(t);var c=i(e),l=o(c),p=a(c.length),f=u?p-1:0,d=u?-1:1;if(n<2)for(;;){if(f in l){s=l[f],f+=d;break}if(f+=d,u?f<0:p<=f)throw TypeError("Reduce of empty array with no initial value")}for(;u?f>=0:p>f;f+=d)f in l&&(s=t(s,l[f],f,c));return s}},{108:108,109:109,3:3,45:45}],14:[function(e,t,n){var r=e(49),i=e(47),o=e(117)("species");t.exports=function(e){var t;return i(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&(t=t[o],null===t&&(t=void 0))),void 0===t?Array:t}},{117:117,47:47,49:49}],15:[function(e,t,n){var r=e(14);t.exports=function(e,t){return new(r(e))(t)}},{14:14}],16:[function(e,t,n){"use strict";var r=e(3),i=e(49),o=e(44),a=[].slice,s={},u=function(e,t,n){if(!(t in s)){for(var r=[],i=0;i1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!g(this,e)}}),d&&r(p.prototype,"size",{get:function(){return u(this[m])}}),p},def:function(e,t,n){var r,i,o=g(e,t);return o?o.v=n:(e._l=o={i:i=h(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[m]++,"F"!==i&&(e._i[i]=o)),e},getEntry:g,setStrong:function(e,t,n){l(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?p(0,n.k):"values"==t?p(0,n.v):p(0,[n.k,n.v]):(e._t=void 0,p(1))},n?"entries":"values",!n,!0),f(t)}}},{25:25,27:27,28:28,37:37,53:53,55:55,6:6,62:62,66:66,67:67,86:86,91:91}],20:[function(e,t,n){var r=e(17),i=e(10);t.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},{10:10,17:17}],21:[function(e,t,n){"use strict";var r=e(86),i=e(62).getWeak,o=e(7),a=e(49),s=e(6),u=e(37),c=e(12),l=e(39),p=c(5),f=c(6),d=0,h=function(e){return e._l||(e._l=new m)},m=function(){this.a=[]},g=function(e,t){return p(e.a,function(e){return e[0]===t})};m.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var n=g(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},t.exports={getConstructor:function(e,t,n,o){var c=e(function(e,r){s(e,c,t,"_i"),e._i=d++,e._l=void 0,void 0!=r&&u(r,n,e[o],e)});return r(c.prototype,{delete:function(e){if(!a(e))return!1;var t=i(e);return t===!0?h(this).delete(e):t&&l(t,this._i)&&delete t[this._i]},has:function(e){if(!a(e))return!1;var t=i(e);return t===!0?h(this).has(e):t&&l(t,this._i)}}),c},def:function(e,t,n){var r=i(o(t),!0);return r===!0?h(e).set(t,n):r[e._i]=n,e},ufstore:h}},{12:12,37:37,39:39,49:49,6:6,62:62,7:7,86:86}],22:[function(e,t,n){"use strict";var r=e(38),i=e(32),o=e(87),a=e(86),s=e(62),u=e(37),c=e(6),l=e(49),p=e(34),f=e(54),d=e(92),h=e(43);t.exports=function(e,t,n,m,g,v){var y=r[e],x=y,b=g?"set":"add",_=x&&x.prototype,w={},E=function(e){var t=_[e];o(_,e,"delete"==e?function(e){return!(v&&!l(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(v&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!l(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof x&&(v||_.forEach&&!p(function(){(new x).entries().next()}))){var S=new x,C=S[b](v?{}:-0,1)!=S,T=p(function(){S.has(1)}),D=f(function(e){new x(e)}),A=!v&&p(function(){for(var e=new x,t=5;t--;)e[b](t,t);return!e.has(-0)});D||(x=t(function(t,n){c(t,x,e);var r=h(new y,t,x);return void 0!=n&&u(n,g,r[b],r),r}),x.prototype=_,_.constructor=x),(T||A)&&(E("delete"),E("has"),g&&E("get")),(A||C)&&E(b),v&&_.clear&&delete _.clear}else x=m.getConstructor(t,e,g,b),a(x.prototype,n),s.NEED=!0;return d(x,e),w[e]=x,i(i.G+i.W+i.F*(x!=y),w),v||m.setStrong(x,e,g),x}},{32:32,34:34,37:37,38:38,43:43,49:49,54:54,6:6,62:62,86:86,87:87,92:92}],23:[function(e,t,n){var r=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},{}],24:[function(e,t,n){"use strict";var r=e(67),i=e(85);t.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},{67:67,85:85}],25:[function(e,t,n){var r=e(3);t.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},{3:3}],26:[function(e,t,n){"use strict";var r=e(7),i=e(110),o="number";t.exports=function(e){if("string"!==e&&e!==o&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),e!=o)}},{110:110,7:7}],27:[function(e,t,n){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],28:[function(e,t,n){t.exports=!e(34)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{34:34}],29:[function(e,t,n){var r=e(49),i=e(38).document,o=r(i)&&r(i.createElement);t.exports=function(e){return o?i.createElement(e):{}}},{38:38,49:49}],30:[function(e,t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],31:[function(e,t,n){var r=e(76),i=e(73),o=e(77);t.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),u=o.f,c=0;s.length>c;)u.call(e,a=s[c++])&&t.push(a);return t}},{73:73,76:76,77:77}],32:[function(e,t,n){var r=e(38),i=e(23),o=e(40),a=e(87),s=e(25),u="prototype",c=function(e,t,n){var l,p,f,d,h=e&c.F,m=e&c.G,g=e&c.S,v=e&c.P,y=e&c.B,x=m?r:g?r[t]||(r[t]={}):(r[t]||{})[u],b=m?i:i[t]||(i[t]={}),_=b[u]||(b[u]={});m&&(n=t);for(l in n)p=!h&&x&&void 0!==x[l],f=(p?x:n)[l],d=y&&p?s(f,r):v&&"function"==typeof f?s(Function.call,f):f,x&&a(x,l,f,e&c.U),b[l]!=f&&o(b,l,d),v&&_[l]!=f&&(_[l]=f)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},{23:23,25:25,38:38,40:40,87:87}],33:[function(e,t,n){var r=e(117)("match");t.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},{117:117}],34:[function(e,t,n){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],35:[function(e,t,n){"use strict";var r=e(40),i=e(87),o=e(34),a=e(27),s=e(117);t.exports=function(e,t,n){var u=s(e),c=n(a,u,""[e]),l=c[0],p=c[1];o(function(){var t={};return t[u]=function(){return 7},7!=""[e](t)})&&(i(String.prototype,e,l),r(RegExp.prototype,u,2==t?function(e,t){return p.call(e,this,t)}:function(e){return p.call(e,this)}))}},{117:117,27:27,34:34,40:40,87:87}],36:[function(e,t,n){"use strict";var r=e(7);t.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},{7:7}],37:[function(e,t,n){var r=e(25),i=e(51),o=e(46),a=e(7),s=e(108),u=e(118),c={},l={},n=t.exports=function(e,t,n,p,f){var d,h,m,g,v=f?function(){return e}:u(e),y=r(n,p,t?2:1),x=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(o(v)){for(d=s(e.length);d>x;x++)if(g=t?y(a(h=e[x])[0],h[1]):y(e[x]),g===c||g===l)return g}else for(m=v.call(e);!(h=m.next()).done;)if(g=i(m,y,h.value,t),g===c||g===l)return g};n.BREAK=c,n.RETURN=l},{108:108,118:118,25:25,46:46,51:51,7:7}],38:[function(e,t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},{}],39:[function(e,t,n){var r={}.hasOwnProperty;t.exports=function(e,t){return r.call(e,t)}},{}],40:[function(e,t,n){var r=e(67),i=e(85);t.exports=e(28)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},{28:28,67:67,85:85}],41:[function(e,t,n){t.exports=e(38).document&&document.documentElement},{38:38}],42:[function(e,t,n){t.exports=!e(28)&&!e(34)(function(){return 7!=Object.defineProperty(e(29)("div"),"a",{get:function(){return 7}}).a})},{28:28,29:29,34:34}],43:[function(e,t,n){var r=e(49),i=e(90).set;t.exports=function(e,t,n){var o,a=t.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},{49:49,90:90}],44:[function(e,t,n){t.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},{}],45:[function(e,t,n){var r=e(18);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},{18:18}],46:[function(e,t,n){var r=e(56),i=e(117)("iterator"),o=Array.prototype;t.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},{117:117,56:56}],47:[function(e,t,n){var r=e(18);t.exports=Array.isArray||function(e){return"Array"==r(e)}},{18:18}],48:[function(e,t,n){var r=e(49),i=Math.floor;t.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},{49:49}],49:[function(e,t,n){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],50:[function(e,t,n){var r=e(49),i=e(18),o=e(117)("match");t.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},{117:117,18:18,49:49}],51:[function(e,t,n){var r=e(7);t.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},{7:7}],52:[function(e,t,n){"use strict";var r=e(66),i=e(85),o=e(92),a={};e(40)(a,e(117)("iterator"),function(){return this}),t.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},{117:117,40:40,66:66,85:85,92:92}],53:[function(e,t,n){"use strict";var r=e(58),i=e(32),o=e(87),a=e(40),s=e(39),u=e(56),c=e(52),l=e(92),p=e(74),f=e(117)("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",m="keys",g="values",v=function(){return this};t.exports=function(e,t,n,y,x,b,_){c(n,t,y);var w,E,S,C=function(e){if(!d&&e in P)return P[e];switch(e){case m:return function(){return new n(this,e)};case g:return function(){return new n(this,e)}}return function(){return new n(this,e)}},T=t+" Iterator",D=x==g,A=!1,P=e.prototype,k=P[f]||P[h]||x&&P[x],I=k||C(x),F=x?D?C("entries"):I:void 0,O="Array"==t?P.entries||k:k;if(O&&(S=p(O.call(new e)),S!==Object.prototype&&(l(S,T,!0),r||s(S,f)||a(S,f,v))),D&&k&&k.name!==g&&(A=!0,I=function(){return k.call(this)}),r&&!_||!d&&!A&&P[f]||a(P,f,I),u[t]=I,u[T]=v,x)if(w={values:D?I:C(g),keys:b?I:C(m),entries:F},_)for(E in w)E in P||o(P,E,w[E]);else i(i.P+i.F*(d||A),t,w);return w}},{117:117,32:32,39:39,40:40,52:52,56:56,58:58,74:74,87:87,92:92}],54:[function(e,t,n){var r=e(117)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(e){}t.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},{117:117}],55:[function(e,t,n){t.exports=function(e,t){return{value:t,done:!!e}}},{}],56:[function(e,t,n){t.exports={}},{}],57:[function(e,t,n){var r=e(76),i=e(107);t.exports=function(e,t){for(var n,o=i(e),a=r(o),s=a.length,u=0;s>u;)if(o[n=a[u++]]===t)return n}},{107:107,76:76}],58:[function(e,t,n){t.exports=!1},{}],59:[function(e,t,n){var r=Math.expm1;t.exports=!r||r(10)>22025.465794806718||r(10)<22025.465794806718||r(-2e-17)!=-2e-17?function(e){ return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:r},{}],60:[function(e,t,n){t.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},{}],61:[function(e,t,n){t.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},{}],62:[function(e,t,n){var r=e(114)("meta"),i=e(49),o=e(39),a=e(67).f,s=0,u=Object.isExtensible||function(){return!0},c=!e(34)(function(){return u(Object.preventExtensions({}))}),l=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},p=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[r].i},f=function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[r].w},d=function(e){return c&&h.NEED&&u(e)&&!o(e,r)&&l(e),e},h=t.exports={KEY:r,NEED:!1,fastKey:p,getWeak:f,onFreeze:d}},{114:114,34:34,39:39,49:49,67:67}],63:[function(e,t,n){var r=e(149),i=e(32),o=e(94)("metadata"),a=o.store||(o.store=new(e(255))),s=function(e,t,n){var i=a.get(e);if(!i){if(!n)return;a.set(e,i=new r)}var o=i.get(t);if(!o){if(!n)return;i.set(t,o=new r)}return o},u=function(e,t,n){var r=s(t,n,!1);return void 0!==r&&r.has(e)},c=function(e,t,n){var r=s(t,n,!1);return void 0===r?void 0:r.get(e)},l=function(e,t,n,r){s(n,r,!0).set(e,t)},p=function(e,t){var n=s(e,t,!1),r=[];return n&&n.forEach(function(e,t){r.push(t)}),r},f=function(e){return void 0===e||"symbol"==typeof e?e:String(e)},d=function(e){i(i.S,"Reflect",e)};t.exports={store:a,map:s,has:u,get:c,set:l,keys:p,key:f,exp:d}},{149:149,255:255,32:32,94:94}],64:[function(e,t,n){var r=e(38),i=e(104).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==e(18)(a);t.exports=function(){var e,t,n,c=function(){var r,i;for(u&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(c)};else if(o){var l=!0,p=document.createTextNode("");new o(c).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}else if(s&&s.resolve){var f=s.resolve();n=function(){f.then(c)}}else n=function(){i.call(r,c)};return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},{104:104,18:18,38:38}],65:[function(e,t,n){"use strict";var r=e(76),i=e(73),o=e(77),a=e(109),s=e(45),u=Object.assign;t.exports=!u||e(34)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r})?function(e,t){for(var n=a(e),u=arguments.length,c=1,l=i.f,p=o.f;u>c;)for(var f,d=s(arguments[c++]),h=l?r(d).concat(l(d)):r(d),m=h.length,g=0;m>g;)p.call(d,f=h[g++])&&(n[f]=d[f]);return n}:u},{109:109,34:34,45:45,73:73,76:76,77:77}],66:[function(e,t,n){var r=e(7),i=e(68),o=e(30),a=e(93)("IE_PROTO"),s=function(){},u="prototype",c=function(){var t,n=e(29)("iframe"),r=o.length,i="<",a=">";for(n.style.display="none",e(41).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write(i+"script"+a+"document.F=Object"+i+"/script"+a),t.close(),c=t.F;r--;)delete c[u][o[r]];return c()};t.exports=Object.create||function(e,t){var n;return null!==e?(s[u]=r(e),n=new s,s[u]=null,n[a]=e):n=c(),void 0===t?n:i(n,t)}},{29:29,30:30,41:41,68:68,7:7,93:93}],67:[function(e,t,n){var r=e(7),i=e(42),o=e(110),a=Object.defineProperty;n.f=e(28)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},{110:110,28:28,42:42,7:7}],68:[function(e,t,n){var r=e(67),i=e(7),o=e(76);t.exports=e(28)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,u=0;s>u;)r.f(e,n=a[u++],t[n]);return e}},{28:28,67:67,7:7,76:76}],69:[function(e,t,n){t.exports=e(58)||!e(34)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete e(38)[t]})},{34:34,38:38,58:58}],70:[function(e,t,n){var r=e(77),i=e(85),o=e(107),a=e(110),s=e(39),u=e(42),c=Object.getOwnPropertyDescriptor;n.f=e(28)?c:function(e,t){if(e=o(e),t=a(t,!0),u)try{return c(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},{107:107,110:110,28:28,39:39,42:42,77:77,85:85}],71:[function(e,t,n){var r=e(107),i=e(72).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return i(e)}catch(e){return a.slice()}};t.exports.f=function(e){return a&&"[object Window]"==o.call(e)?s(e):i(r(e))}},{107:107,72:72}],72:[function(e,t,n){var r=e(75),i=e(30).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},{30:30,75:75}],73:[function(e,t,n){n.f=Object.getOwnPropertySymbols},{}],74:[function(e,t,n){var r=e(39),i=e(109),o=e(93)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},{109:109,39:39,93:93}],75:[function(e,t,n){var r=e(39),i=e(107),o=e(11)(!1),a=e(93)("IE_PROTO");t.exports=function(e,t){var n,s=i(e),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},{107:107,11:11,39:39,93:93}],76:[function(e,t,n){var r=e(75),i=e(30);t.exports=Object.keys||function(e){return r(e,i)}},{30:30,75:75}],77:[function(e,t,n){n.f={}.propertyIsEnumerable},{}],78:[function(e,t,n){var r=e(32),i=e(23),o=e(34);t.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},{23:23,32:32,34:34}],79:[function(e,t,n){var r=e(76),i=e(107),o=e(77).f;t.exports=function(e){return function(t){for(var n,a=i(t),s=r(a),u=s.length,c=0,l=[];u>c;)o.call(a,n=s[c++])&&l.push(e?[n,a[n]]:a[n]);return l}}},{107:107,76:76,77:77}],80:[function(e,t,n){var r=e(72),i=e(73),o=e(7),a=e(38).Reflect;t.exports=a&&a.ownKeys||function(e){var t=r.f(o(e)),n=i.f;return n?t.concat(n(e)):t}},{38:38,7:7,72:72,73:73}],81:[function(e,t,n){var r=e(38).parseFloat,i=e(102).trim;t.exports=1/r(e(103)+"-0")!==-(1/0)?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},{102:102,103:103,38:38}],82:[function(e,t,n){var r=e(38).parseInt,i=e(102).trim,o=e(103),a=/^[\-+]?0[xX]/;t.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(e,t){var n=i(String(e),3);return r(n,t>>>0||(a.test(n)?16:10))}:r},{102:102,103:103,38:38}],83:[function(e,t,n){"use strict";var r=e(84),i=e(44),o=e(3);t.exports=function(){for(var e=o(this),t=arguments.length,n=Array(t),a=0,s=r._,u=!1;t>a;)(n[a]=arguments[a++])===s&&(u=!0);return function(){var r,o=this,a=arguments.length,c=0,l=0;if(!u&&!a)return i(e,n,o);if(r=n.slice(),u)for(;t>c;c++)r[c]===s&&(r[c]=arguments[l++]);for(;a>l;)r.push(arguments[l++]);return i(e,r,o)}}},{3:3,44:44,84:84}],84:[function(e,t,n){t.exports=e(38)},{38:38}],85:[function(e,t,n){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],86:[function(e,t,n){var r=e(87);t.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},{87:87}],87:[function(e,t,n){var r=e(38),i=e(40),o=e(39),a=e(114)("src"),s="toString",u=Function[s],c=(""+u).split(s);e(23).inspectSource=function(e){return u.call(e)},(t.exports=function(e,t,n,s){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(o(n,a)||i(n,a,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||u.call(this)})},{114:114,23:23,38:38,39:39,40:40}],88:[function(e,t,n){t.exports=function(e,t){var n=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,n)}}},{}],89:[function(e,t,n){t.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},{}],90:[function(e,t,n){var r=e(49),i=e(7),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{r=e(25)(Function.call,e(70).f(Object.prototype,"__proto__").set,2),r(t,[]),n=!(t instanceof Array)}catch(e){n=!0}return function(e,t){return o(e,t),n?e.__proto__=t:r(e,t),e}}({},!1):void 0),check:o}},{25:25,49:49,7:7,70:70}],91:[function(e,t,n){"use strict";var r=e(38),i=e(67),o=e(28),a=e(117)("species");t.exports=function(e){var t=r[e];o&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},{117:117,28:28,38:38,67:67}],92:[function(e,t,n){var r=e(67).f,i=e(39),o=e(117)("toStringTag");t.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},{117:117,39:39,67:67}],93:[function(e,t,n){var r=e(94)("keys"),i=e(114);t.exports=function(e){return r[e]||(r[e]=i(e))}},{114:114,94:94}],94:[function(e,t,n){var r=e(38),i="__core-js_shared__",o=r[i]||(r[i]={});t.exports=function(e){return o[e]||(o[e]={})}},{38:38}],95:[function(e,t,n){var r=e(7),i=e(3),o=e(117)("species");t.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[o])?t:i(n)}},{117:117,3:3,7:7}],96:[function(e,t,n){var r=e(34);t.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},{34:34}],97:[function(e,t,n){var r=e(106),i=e(27);t.exports=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(o=s.charCodeAt(u),o<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):(o-55296<<10)+(a-56320)+65536)}}},{106:106,27:27}],98:[function(e,t,n){var r=e(50),i=e(27);t.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},{27:27,50:50}],99:[function(e,t,n){var r=e(32),i=e(34),o=e(27),a=/"/g,s=function(e,t,n,r){var i=String(o(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+i+""};t.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},{27:27,32:32,34:34}],100:[function(e,t,n){var r=e(108),i=e(101),o=e(27);t.exports=function(e,t,n,a){var s=String(o(e)),u=s.length,c=void 0===n?" ":String(n),l=r(t);if(l<=u||""==c)return s;var p=l-u,f=i.call(c,Math.ceil(p/c.length));return f.length>p&&(f=f.slice(0,p)),a?f+s:s+f}},{101:101,108:108,27:27}],101:[function(e,t,n){"use strict";var r=e(106),i=e(27);t.exports=function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},{106:106,27:27}],102:[function(e,t,n){var r=e(32),i=e(27),o=e(34),a=e(103),s="["+a+"]",u="​…",c=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),p=function(e,t,n){var i={},s=o(function(){return!!a[e]()||u[e]()!=u}),c=i[e]=s?t(f):a[e];n&&(i[n]=c),r(r.P+r.F*s,"String",i)},f=p.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(l,"")),e};t.exports=p},{103:103,27:27,32:32,34:34}],103:[function(e,t,n){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},{}],104:[function(e,t,n){var r,i,o,a=e(25),s=e(44),u=e(41),c=e(29),l=e(38),p=l.process,f=l.setImmediate,d=l.clearImmediate,h=l.MessageChannel,m=0,g={},v="onreadystatechange",y=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},x=function(e){y.call(e.data)};f&&d||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return g[++m]=function(){s("function"==typeof e?e:Function(e),t)},r(m),m},d=function(e){delete g[e]},"process"==e(18)(p)?r=function(e){p.nextTick(a(y,e,1))}:h?(i=new h,o=i.port2,i.port1.onmessage=x,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(e){l.postMessage(e+"","*")},l.addEventListener("message",x,!1)):r=v in c("script")?function(e){u.appendChild(c("script"))[v]=function(){u.removeChild(this),y.call(e)}}:function(e){setTimeout(a(y,e,1),0)}),t.exports={set:f,clear:d}},{18:18,25:25,29:29,38:38,41:41,44:44}],105:[function(e,t,n){var r=e(106),i=Math.max,o=Math.min;t.exports=function(e,t){return e=r(e),e<0?i(e+t,0):o(e,t)}},{106:106}],106:[function(e,t,n){var r=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:r)(e)}},{}],107:[function(e,t,n){var r=e(45),i=e(27);t.exports=function(e){return r(i(e))}},{27:27,45:45}],108:[function(e,t,n){var r=e(106),i=Math.min;t.exports=function(e){return e>0?i(r(e),9007199254740991):0}},{106:106}],109:[function(e,t,n){var r=e(27);t.exports=function(e){return Object(r(e))}},{27:27}],110:[function(e,t,n){var r=e(49);t.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},{49:49}],111:[function(e,t,n){"use strict";if(e(28)){var r=e(58),i=e(38),o=e(34),a=e(32),s=e(113),u=e(112),c=e(25),l=e(6),p=e(85),f=e(40),d=e(86),h=e(106),m=e(108),g=e(105),v=e(110),y=e(39),x=e(89),b=e(17),_=e(49),w=e(109),E=e(46),S=e(66),C=e(74),T=e(72).f,D=e(118),A=e(114),P=e(117),k=e(12),I=e(11),F=e(95),O=e(130),N=e(56),j=e(54),R=e(91),L=e(9),M=e(8),B=e(67),U=e(70),V=B.f,G=U.f,W=i.RangeError,Q=i.TypeError,H=i.Uint8Array,z="ArrayBuffer",q="Shared"+z,$="BYTES_PER_ELEMENT",X="prototype",K=Array[X],J=u.ArrayBuffer,Y=u.DataView,Z=k(0),ee=k(2),te=k(3),ne=k(4),re=k(5),ie=k(6),oe=I(!0),ae=I(!1),se=O.values,ue=O.keys,ce=O.entries,le=K.lastIndexOf,pe=K.reduce,fe=K.reduceRight,de=K.join,he=K.sort,me=K.slice,ge=K.toString,ve=K.toLocaleString,ye=P("iterator"),xe=P("toStringTag"),be=A("typed_constructor"),_e=A("def_constructor"),we=s.CONSTR,Ee=s.TYPED,Se=s.VIEW,Ce="Wrong length!",Te=k(1,function(e,t){return Fe(F(e,e[_e]),t)}),De=o(function(){return 1===new H(new Uint16Array([1]).buffer)[0]}),Ae=!!H&&!!H[X].set&&o(function(){new H(1).set({})}),Pe=function(e,t){if(void 0===e)throw Q(Ce);var n=+e,r=m(e);if(t&&!x(n,r))throw W(Ce);return r},ke=function(e,t){var n=h(e);if(n<0||n%t)throw W("Wrong offset!");return n},Ie=function(e){if(_(e)&&Ee in e)return e;throw Q(e+" is not a typed array!")},Fe=function(e,t){if(!(_(e)&&be in e))throw Q("It is not a typed array constructor!");return new e(t)},Oe=function(e,t){return Ne(F(e,e[_e]),t)},Ne=function(e,t){for(var n=0,r=t.length,i=Fe(e,r);r>n;)i[n]=t[n++];return i},je=function(e,t,n){V(e,t,{get:function(){return this._d[n]}})},Re=function(e){var t,n,r,i,o,a,s=w(e),u=arguments.length,l=u>1?arguments[1]:void 0,p=void 0!==l,f=D(s);if(void 0!=f&&!E(f)){for(a=f.call(s),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);s=r}for(p&&u>2&&(l=c(l,arguments[2],2)),t=0,n=m(s.length),i=Fe(this,n);n>t;t++)i[t]=p?l(s[t],t):s[t];return i},Le=function(){for(var e=0,t=arguments.length,n=Fe(this,t);t>e;)n[e]=arguments[e++];return n},Me=!!H&&o(function(){ve.call(new H(1))}),Be=function(){return ve.apply(Me?me.call(Ie(this)):Ie(this),arguments)},Ue={copyWithin:function(e,t){return M.call(Ie(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return ne(Ie(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return L.apply(Ie(this),arguments)},filter:function(e){return Oe(this,ee(Ie(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return re(Ie(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ie(Ie(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Z(Ie(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ae(Ie(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return oe(Ie(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return de.apply(Ie(this),arguments)},lastIndexOf:function(e){return le.apply(Ie(this),arguments)},map:function(e){return Te(Ie(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return pe.apply(Ie(this),arguments)},reduceRight:function(e){return fe.apply(Ie(this),arguments)},reverse:function(){for(var e,t=this,n=Ie(t).length,r=Math.floor(n/2),i=0;i1?arguments[1]:void 0)},sort:function(e){return he.call(Ie(this),e)},subarray:function(e,t){var n=Ie(this),r=n.length,i=g(e,r);return new(F(n,n[_e]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===t?r:g(t,r))-i))}},Ve=function(e,t){return Oe(this,me.call(Ie(this),e,t))},Ge=function(e){Ie(this);var t=ke(arguments[1],1),n=this.length,r=w(e),i=m(r.length),o=0;if(i+t>n)throw W(Ce);for(;o255?255:255&r),i.v[h](n*t+i.o,r,De)},P=function(e,t){V(e,t,{get:function(){return D(this,t)},set:function(e){return A(this,t,e)},enumerable:!0})};x?(g=n(function(e,n,r,i){l(e,g,c,"_d");var o,a,s,u,p=0,d=0;if(_(n)){if(!(n instanceof J||(u=b(n))==z||u==q))return Ee in n?Ne(g,n):Re.call(g,n);o=n,d=ke(r,t);var h=n.byteLength;if(void 0===i){if(h%t)throw W(Ce);if(a=h-d,a<0)throw W(Ce)}else if(a=m(i)*t,a+d>h)throw W(Ce);s=a/t}else s=Pe(n,!0),a=s*t,o=new J(a);for(f(e,"_d",{b:o,o:d,l:a,e:s,v:new Y(o)});p>1,l=23===t?P(2,-24)-P(2,-77):0,p=0,f=e<0||0===e&&1/e<0?1:0;for(e=A(e),e!=e||e===T?(i=e!=e?1:0,r=u):(r=k(I(e)/F),e*(o=P(2,-r))<1&&(r--,o*=2),e+=r+c>=1?l/o:l*P(2,1-c),e*o>=2&&(r++,o/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(e*o-1)*P(2,t),r+=c):(i=e*P(2,c-1)*P(2,t),r=0));t>=8;a[p++]=255&i,i/=256,t-=8);for(r=r<0;a[p++]=255&r,r/=256,s-=8);return a[--p]|=128*f,a},U=function(e,t,n){var r,i=8*n-t-1,o=(1<>1,s=i-7,u=n-1,c=e[u--],l=127&c;for(c>>=7;s>0;l=256*l+e[u],u--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=t;s>0;r=256*r+e[u],u--,s-=8);if(0===l)l=1-a;else{if(l===o)return r?NaN:c?-T:T;r+=P(2,t),l-=a}return(c?-1:1)*r*P(2,l-t)},V=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},G=function(e){return[255&e]},W=function(e){return[255&e,e>>8&255]},Q=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},H=function(e){return B(e,52,8)},z=function(e){return B(e,23,4)},q=function(e,t,n){h(e[x],t,{get:function(){return this[n]}})},$=function(e,t,n,r){var i=+n,o=p(i);if(i!=o||o<0||o+t>e[L])throw C(_);var a=e[R]._b,s=o+e[M],u=a.slice(s,s+t);return r?u:u.reverse()},X=function(e,t,n,r,i,o){var a=+n,s=p(a);if(a!=s||s<0||s+t>e[L])throw C(_);for(var u=e[R]._b,c=s+e[M],l=r(+i),f=0;fee;)(J=Z[ee++])in w||s(w,J,D[J]);o||(Y.constructor=w)}var te=new E(new w(2)),ne=E[x].setInt8;te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||u(E[x],{setInt8:function(e,t){ne.call(this,e,t<<24>>24)},setUint8:function(e,t){ne.call(this,e,t<<24>>24)}},!0)}else w=function(e){var t=K(this,e);this._b=m.call(Array(t),0),this[L]=t},E=function(e,t,n){l(this,E,y),l(e,w,y);var r=e[L],i=p(t);if(i<0||i>r)throw C("Wrong offset!");if(n=void 0===n?r-i:f(n),i+n>r)throw C(b);this[R]=e,this[M]=i,this[L]=n},i&&(q(w,N,"_l"),q(E,O,"_b"),q(E,N,"_l"),q(E,j,"_o")),u(E[x],{getInt8:function(e){return $(this,1,e)[0]<<24>>24},getUint8:function(e){return $(this,1,e)[0]},getInt16:function(e){var t=$(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=$(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return V($(this,4,e,arguments[1]))},getUint32:function(e){return V($(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return U($(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return U($(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){X(this,1,e,G,t)},setUint8:function(e,t){X(this,1,e,G,t)},setInt16:function(e,t){X(this,2,e,W,t,arguments[2])},setUint16:function(e,t){X(this,2,e,W,t,arguments[2])},setInt32:function(e,t){X(this,4,e,Q,t,arguments[2])},setUint32:function(e,t){X(this,4,e,Q,t,arguments[2])},setFloat32:function(e,t){X(this,4,e,z,t,arguments[2])},setFloat64:function(e,t){X(this,8,e,H,t,arguments[2])}});g(w,v),g(E,y),s(E[x],a.VIEW,!0),n[v]=w,n[y]=E},{106:106,108:108,113:113,28:28,34:34,38:38,40:40,58:58,6:6,67:67,72:72,86:86,9:9,92:92}],113:[function(e,t,n){for(var r,i=e(38),o=e(40),a=e(114),s=a("typed_array"),u=a("view"),c=!(!i.ArrayBuffer||!i.DataView),l=c,p=0,f=9,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");p1?arguments[1]:void 0)}}),e(5)(o)},{12:12,32:32,5:5}],125:[function(e,t,n){"use strict";var r=e(32),i=e(12)(5),o="find",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),e(5)(o)},{12:12,32:32,5:5}],126:[function(e,t,n){"use strict";var r=e(32),i=e(12)(0),o=e(96)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(e){return i(this,e,arguments[1])}})},{12:12,32:32,96:96}],127:[function(e,t,n){"use strict";var r=e(25),i=e(32),o=e(109),a=e(51),s=e(46),u=e(108),c=e(24),l=e(118);i(i.S+i.F*!e(54)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,i,p,f=o(e),d="function"==typeof this?this:Array,h=arguments.length,m=h>1?arguments[1]:void 0,g=void 0!==m,v=0,y=l(f);if(g&&(m=r(m,h>2?arguments[2]:void 0,2)),void 0==y||d==Array&&s(y))for(t=u(f.length),n=new d(t);t>v;v++)c(n,v,g?m(f[v],v):f[v]);else for(p=y.call(f),n=new d;!(i=p.next()).done;v++)c(n,v,g?a(p,m,[i.value,v],!0):i.value);return n.length=v,n}})},{108:108,109:109,118:118,24:24,25:25,32:32,46:46,51:51,54:54}],128:[function(e,t,n){"use strict";var r=e(32),i=e(11)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!e(96)(o)),"Array",{indexOf:function(e){return a?o.apply(this,arguments)||0:i(this,e,arguments[1])}})},{11:11,32:32,96:96}],129:[function(e,t,n){var r=e(32);r(r.S,"Array",{isArray:e(47)})},{32:32,47:47}],130:[function(e,t,n){"use strict";var r=e(5),i=e(55),o=e(56),a=e(107);t.exports=e(53)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,n):"values"==t?i(0,e[n]):i(0,[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},{107:107,5:5,53:53,55:55,56:56}],131:[function(e,t,n){"use strict";var r=e(32),i=e(107),o=[].join;r(r.P+r.F*(e(45)!=Object||!e(96)(o)),"Array",{join:function(e){return o.call(i(this),void 0===e?",":e)}})},{107:107,32:32,45:45,96:96}],132:[function(e,t,n){"use strict";var r=e(32),i=e(107),o=e(106),a=e(108),s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!e(96)(s)),"Array",{lastIndexOf:function(e){if(u)return s.apply(this,arguments)||0;var t=i(this),n=a(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},{106:106,107:107,108:108,32:32,96:96}],133:[function(e,t,n){"use strict";var r=e(32),i=e(12)(1);r(r.P+r.F*!e(96)([].map,!0),"Array",{map:function(e){return i(this,e,arguments[1])}})},{12:12,32:32,96:96}],134:[function(e,t,n){"use strict";var r=e(32),i=e(24);r(r.S+r.F*e(34)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},{24:24,32:32,34:34}],135:[function(e,t,n){"use strict";var r=e(32),i=e(13);r(r.P+r.F*!e(96)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},{13:13,32:32,96:96}],136:[function(e,t,n){"use strict";var r=e(32),i=e(13);r(r.P+r.F*!e(96)([].reduce,!0),"Array",{reduce:function(e){return i(this,e,arguments.length,arguments[1],!1)}})},{13:13,32:32,96:96}],137:[function(e,t,n){"use strict";var r=e(32),i=e(41),o=e(18),a=e(105),s=e(108),u=[].slice;r(r.P+r.F*e(34)(function(){i&&u.call(i)}),"Array",{slice:function(e,t){var n=s(this.length),r=o(this);if(t=void 0===t?n:t,"Array"==r)return u.call(this,e,t);for(var i=a(e,n),c=a(t,n),l=s(c-i),p=Array(l),f=0;f9?e:"0"+e};r(r.P+r.F*(i(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!i(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}})},{32:32,34:34}],143:[function(e,t,n){"use strict";var r=e(32),i=e(109),o=e(110);r(r.P+r.F*e(34)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=i(this),n=o(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},{109:109,110:110,32:32,34:34}],144:[function(e,t,n){var r=e(117)("toPrimitive"),i=Date.prototype;r in i||e(40)(i,r,e(26))},{117:117,26:26,40:40}],145:[function(e,t,n){var r=Date.prototype,i="Invalid Date",o="toString",a=r[o],s=r.getTime;new Date(NaN)+""!=i&&e(87)(r,o,function(){var e=s.call(this);return e===e?a.call(this):i})},{87:87}],146:[function(e,t,n){var r=e(32);r(r.P,"Function",{bind:e(16)})},{16:16,32:32}],147:[function(e,t,n){"use strict";var r=e(49),i=e(74),o=e(117)("hasInstance"),a=Function.prototype;o in a||e(67).f(a,o,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},{117:117,49:49,67:67,74:74}],148:[function(e,t,n){var r=e(67).f,i=e(85),o=e(39),a=Function.prototype,s=/^\s*function ([^ (]*)/,u="name",c=Object.isExtensible||function(){return!0};u in a||e(28)&&r(a,u,{configurable:!0,get:function(){try{var e=this,t=(""+e).match(s)[1];return o(e,u)||!c(e)||r(e,u,i(5,t)),t}catch(e){return""}}})},{28:28,39:39,67:67,85:85}],149:[function(e,t,n){"use strict";var r=e(19);t.exports=e(22)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(this,e);return t&&t.v},set:function(e,t){return r.def(this,0===e?0:e,t)}},r,!0)},{19:19,22:22}],150:[function(e,t,n){var r=e(32),i=e(60),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+o(e-1)*o(e+1))}})},{32:32,60:60}],151:[function(e,t,n){function r(e){return isFinite(e=+e)&&0!=e?e<0?-r(-e):Math.log(e+Math.sqrt(e*e+1)):e}var i=e(32),o=Math.asinh;i(i.S+i.F*!(o&&1/o(0)>0),"Math",{ asinh:r})},{32:32}],152:[function(e,t,n){var r=e(32),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},{32:32}],153:[function(e,t,n){var r=e(32),i=e(61);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},{32:32,61:61}],154:[function(e,t,n){var r=e(32);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},{32:32}],155:[function(e,t,n){var r=e(32),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},{32:32}],156:[function(e,t,n){var r=e(32),i=e(59);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},{32:32,59:59}],157:[function(e,t,n){var r=e(32),i=e(61),o=Math.pow,a=o(2,-52),s=o(2,-23),u=o(2,127)*(2-s),c=o(2,-126),l=function(e){return e+1/a-1/a};r(r.S,"Math",{fround:function(e){var t,n,r=Math.abs(e),o=i(e);return ru||n!=n?o*(1/0):o*n)}})},{32:32,61:61}],158:[function(e,t,n){var r=e(32),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,o=0,a=0,s=arguments.length,u=0;a0?(r=n/u,o+=r*r):o+=n;return u===1/0?1/0:u*Math.sqrt(o)}})},{32:32}],159:[function(e,t,n){var r=e(32),i=Math.imul;r(r.S+r.F*e(34)(function(){return i(4294967295,5)!=-5||2!=i.length}),"Math",{imul:function(e,t){var n=65535,r=+e,i=+t,o=n&r,a=n&i;return 0|o*a+((n&r>>>16)*a+o*(n&i>>>16)<<16>>>0)}})},{32:32,34:34}],160:[function(e,t,n){var r=e(32);r(r.S,"Math",{log10:function(e){return Math.log(e)/Math.LN10}})},{32:32}],161:[function(e,t,n){var r=e(32);r(r.S,"Math",{log1p:e(60)})},{32:32,60:60}],162:[function(e,t,n){var r=e(32);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},{32:32}],163:[function(e,t,n){var r=e(32);r(r.S,"Math",{sign:e(61)})},{32:32,61:61}],164:[function(e,t,n){var r=e(32),i=e(59),o=Math.exp;r(r.S+r.F*e(34)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},{32:32,34:34,59:59}],165:[function(e,t,n){var r=e(32),i=e(59),o=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(o(e)+o(-e))}})},{32:32,59:59}],166:[function(e,t,n){var r=e(32);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},{32:32}],167:[function(e,t,n){"use strict";var r=e(38),i=e(39),o=e(18),a=e(43),s=e(110),u=e(34),c=e(72).f,l=e(70).f,p=e(67).f,f=e(102).trim,d="Number",h=r[d],m=h,g=h.prototype,v=o(e(66)(g))==d,y="trim"in String.prototype,x=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){t=y?t.trim():f(t,3);var n,r,i,o=t.charCodeAt(0);if(43===o||45===o){if(n=t.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var a,u=t.slice(2),c=0,l=u.length;ci)return NaN;return parseInt(u,r)}}return+t};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof h&&(v?u(function(){g.valueOf.call(n)}):o(n)!=d)?a(new m(x(t)),n,h):x(t)};for(var b,_=e(28)?c(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;_.length>w;w++)i(m,b=_[w])&&!i(h,b)&&p(h,b,l(m,b));h.prototype=g,g.constructor=h,e(87)(r,d,h)}},{102:102,110:110,18:18,28:28,34:34,38:38,39:39,43:43,66:66,67:67,70:70,72:72,87:87}],168:[function(e,t,n){var r=e(32);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},{32:32}],169:[function(e,t,n){var r=e(32),i=e(38).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},{32:32,38:38}],170:[function(e,t,n){var r=e(32);r(r.S,"Number",{isInteger:e(48)})},{32:32,48:48}],171:[function(e,t,n){var r=e(32);r(r.S,"Number",{isNaN:function(e){return e!=e}})},{32:32}],172:[function(e,t,n){var r=e(32),i=e(48),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},{32:32,48:48}],173:[function(e,t,n){var r=e(32);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{32:32}],174:[function(e,t,n){var r=e(32);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},{32:32}],175:[function(e,t,n){var r=e(32),i=e(81);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},{32:32,81:81}],176:[function(e,t,n){var r=e(32),i=e(82);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},{32:32,82:82}],177:[function(e,t,n){"use strict";var r=e(32),i=e(106),o=e(4),a=e(101),s=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",p="0",f=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*c[n],c[n]=r%1e7,r=u(r/1e7)},d=function(e){for(var t=6,n=0;--t>=0;)n+=c[t],c[t]=u(n/e),n=n%e*1e7},h=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==c[e]){var n=String(c[e]);t=""===t?n:t+a.call(p,7-n.length)+n}return t},m=function(e,t,n){return 0===t?n:t%2===1?m(e,t-1,n*e):m(e*e,t/2,n)},g=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!e(34)(function(){s.call({})})),"Number",{toFixed:function(e){var t,n,r,s,u=o(this,l),c=i(e),v="",y=p;if(c<0||c>20)throw RangeError(l);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(v="-",u=-u),u>1e-21)if(t=g(u*m(2,69,1))-69,n=t<0?u*m(2,-t,1):u/m(2,t,1),n*=4503599627370496,t=52-t,t>0){for(f(0,n),r=c;r>=7;)f(1e7,0),r-=7;for(f(m(10,r,1),0),r=t-1;r>=23;)d(1<<23),r-=23;d(1<0?(s=y.length,y=v+(s<=c?"0."+a.call(p,c-s)+y:y.slice(0,s-c)+"."+y.slice(s-c))):y=v+y,y}})},{101:101,106:106,32:32,34:34,4:4}],178:[function(e,t,n){"use strict";var r=e(32),i=e(34),o=e(4),a=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==a.call(1,void 0)})||!i(function(){a.call({})})),"Number",{toPrecision:function(e){var t=o(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},{32:32,34:34,4:4}],179:[function(e,t,n){var r=e(32);r(r.S+r.F,"Object",{assign:e(65)})},{32:32,65:65}],180:[function(e,t,n){var r=e(32);r(r.S,"Object",{create:e(66)})},{32:32,66:66}],181:[function(e,t,n){var r=e(32);r(r.S+r.F*!e(28),"Object",{defineProperties:e(68)})},{28:28,32:32,68:68}],182:[function(e,t,n){var r=e(32);r(r.S+r.F*!e(28),"Object",{defineProperty:e(67).f})},{28:28,32:32,67:67}],183:[function(e,t,n){var r=e(49),i=e(62).onFreeze;e(78)("freeze",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},{49:49,62:62,78:78}],184:[function(e,t,n){var r=e(107),i=e(70).f;e(78)("getOwnPropertyDescriptor",function(){return function(e,t){return i(r(e),t)}})},{107:107,70:70,78:78}],185:[function(e,t,n){e(78)("getOwnPropertyNames",function(){return e(71).f})},{71:71,78:78}],186:[function(e,t,n){var r=e(109),i=e(74);e(78)("getPrototypeOf",function(){return function(e){return i(r(e))}})},{109:109,74:74,78:78}],187:[function(e,t,n){var r=e(49);e(78)("isExtensible",function(e){return function(t){return!!r(t)&&(!e||e(t))}})},{49:49,78:78}],188:[function(e,t,n){var r=e(49);e(78)("isFrozen",function(e){return function(t){return!r(t)||!!e&&e(t)}})},{49:49,78:78}],189:[function(e,t,n){var r=e(49);e(78)("isSealed",function(e){return function(t){return!r(t)||!!e&&e(t)}})},{49:49,78:78}],190:[function(e,t,n){var r=e(32);r(r.S,"Object",{is:e(89)})},{32:32,89:89}],191:[function(e,t,n){var r=e(109),i=e(76);e(78)("keys",function(){return function(e){return i(r(e))}})},{109:109,76:76,78:78}],192:[function(e,t,n){var r=e(49),i=e(62).onFreeze;e(78)("preventExtensions",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},{49:49,62:62,78:78}],193:[function(e,t,n){var r=e(49),i=e(62).onFreeze;e(78)("seal",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},{49:49,62:62,78:78}],194:[function(e,t,n){var r=e(32);r(r.S,"Object",{setPrototypeOf:e(90).set})},{32:32,90:90}],195:[function(e,t,n){"use strict";var r=e(17),i={};i[e(117)("toStringTag")]="z",i+""!="[object z]"&&e(87)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},{117:117,17:17,87:87}],196:[function(e,t,n){var r=e(32),i=e(81);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},{32:32,81:81}],197:[function(e,t,n){var r=e(32),i=e(82);r(r.G+r.F*(parseInt!=i),{parseInt:i})},{32:32,82:82}],198:[function(e,t,n){"use strict";var r,i,o,a=e(58),s=e(38),u=e(25),c=e(17),l=e(32),p=e(49),f=e(3),d=e(6),h=e(37),m=e(95),g=e(104).set,v=e(64)(),y="Promise",x=s.TypeError,b=s.process,_=s[y],b=s.process,w="process"==c(b),E=function(){},S=!!function(){try{var t=_.resolve(1),n=(t.constructor={})[e(117)("species")]=function(e){e(E,E)};return(w||"function"==typeof PromiseRejectionEvent)&&t.then(E)instanceof n}catch(e){}}(),C=function(e,t){return e===t||e===_&&t===o},T=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},D=function(e){return C(_,e)?new A(e):new i(e)},A=i=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw x("Bad Promise constructor");t=e,n=r}),this.resolve=f(t),this.reject=f(n)},P=function(e){try{e()}catch(e){return{error:e}}},k=function(e,t){if(!e._n){e._n=!0;var n=e._c;v(function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a=i?t.ok:t.fail,s=t.resolve,u=t.reject,c=t.domain;try{a?(i||(2==e._h&&O(e),e._h=1),a===!0?n=r:(c&&c.enter(),n=a(r),c&&c.exit()),n===t.promise?u(x("Promise-chain cycle")):(o=T(n))?o.call(n,s,u):s(n)):u(r)}catch(e){u(e)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&I(e)})}},I=function(e){g.call(s,function(){var t,n,r,i=e._v;if(F(e)&&(t=P(function(){w?b.emit("unhandledRejection",i,e):(n=s.onunhandledrejection)?n({promise:e,reason:i}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=w||F(e)?2:1),e._a=void 0,t)throw t.error})},F=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if(t=n[r++],t.fail||!F(t.promise))return!1;return!0},O=function(e){g.call(s,function(){var t;w?b.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})})},N=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),k(t,!0))},j=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw x("Promise can't be resolved itself");(t=T(e))?v(function(){var r={_w:n,_d:!1};try{t.call(e,u(j,r,1),u(N,r,1))}catch(e){N.call(r,e)}}):(n._v=e,n._s=1,k(n,!1))}catch(e){N.call({_w:n,_d:!1},e)}}};S||(_=function(e){d(this,_,y,"_h"),f(e),r.call(this);try{e(u(j,this,1),u(N,this,1))}catch(e){N.call(this,e)}},r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=e(86)(_.prototype,{then:function(e,t){var n=D(m(this,_));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=w?b.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&k(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),A=function(){var e=new r;this.promise=e,this.resolve=u(j,e,1),this.reject=u(N,e,1)}),l(l.G+l.W+l.F*!S,{Promise:_}),e(92)(_,y),e(91)(y),o=e(23)[y],l(l.S+l.F*!S,y,{reject:function(e){var t=D(this),n=t.reject;return n(e),t.promise}}),l(l.S+l.F*(a||!S),y,{resolve:function(e){if(e instanceof _&&C(e.constructor,this))return e;var t=D(this),n=t.resolve;return n(e),t.promise}}),l(l.S+l.F*!(S&&e(54)(function(e){_.all(e).catch(E)})),y,{all:function(e){var t=this,n=D(t),r=n.resolve,i=n.reject,o=P(function(){var n=[],o=0,a=1;h(e,!1,function(e){var s=o++,u=!1;n.push(void 0),a++,t.resolve(e).then(function(e){u||(u=!0,n[s]=e,--a||r(n))},i)}),--a||r(n)});return o&&i(o.error),n.promise},race:function(e){var t=this,n=D(t),r=n.reject,i=P(function(){h(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},{104:104,117:117,17:17,23:23,25:25,3:3,32:32,37:37,38:38,49:49,54:54,58:58,6:6,64:64,86:86,91:91,92:92,95:95}],199:[function(e,t,n){var r=e(32),i=e(3),o=e(7),a=(e(38).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!e(34)(function(){a(function(){})}),"Reflect",{apply:function(e,t,n){var r=i(e),u=o(n);return a?a(r,t,u):s.call(r,t,u)}})},{3:3,32:32,34:34,38:38,7:7}],200:[function(e,t,n){var r=e(32),i=e(66),o=e(3),a=e(7),s=e(49),u=e(34),c=e(16),l=(e(38).Reflect||{}).construct,p=u(function(){function e(){}return!(l(function(){},[],e)instanceof e)}),f=!u(function(){l(function(){})});r(r.S+r.F*(p||f),"Reflect",{construct:function(e,t){o(e),a(t);var n=arguments.length<3?e:o(arguments[2]);if(f&&!p)return l(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(c.apply(e,r))}var u=n.prototype,d=i(s(u)?u:Object.prototype),h=Function.apply.call(e,d,t);return s(h)?h:d}})},{16:16,3:3,32:32,34:34,38:38,49:49,66:66,7:7}],201:[function(e,t,n){var r=e(67),i=e(32),o=e(7),a=e(110);i(i.S+i.F*e(34)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(e,t,n){o(e),t=a(t,!0),o(n);try{return r.f(e,t,n),!0}catch(e){return!1}}})},{110:110,32:32,34:34,67:67,7:7}],202:[function(e,t,n){var r=e(32),i=e(70).f,o=e(7);r(r.S,"Reflect",{deleteProperty:function(e,t){var n=i(o(e),t);return!(n&&!n.configurable)&&delete e[t]}})},{32:32,7:7,70:70}],203:[function(e,t,n){"use strict";var r=e(32),i=e(7),o=function(e){this._t=i(e),this._i=0;var t,n=this._k=[];for(t in e)n.push(t)};e(52)(o,"Object",function(){var e,t=this,n=t._k;do if(t._i>=n.length)return{value:void 0,done:!0};while(!((e=n[t._i++])in t._t));return{value:e,done:!1}}),r(r.S,"Reflect",{enumerate:function(e){return new o(e)}})},{32:32,52:52,7:7}],204:[function(e,t,n){var r=e(70),i=e(32),o=e(7);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(o(e),t)}})},{32:32,7:7,70:70}],205:[function(e,t,n){var r=e(32),i=e(74),o=e(7);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(o(e))}})},{32:32,7:7,74:74}],206:[function(e,t,n){function r(e,t){var n,s,l=arguments.length<3?e:arguments[2];return c(e)===l?e[t]:(n=i.f(e,t))?a(n,"value")?n.value:void 0!==n.get?n.get.call(l):void 0:u(s=o(e))?r(s,t,l):void 0}var i=e(70),o=e(74),a=e(39),s=e(32),u=e(49),c=e(7);s(s.S,"Reflect",{get:r})},{32:32,39:39,49:49,7:7,70:70,74:74}],207:[function(e,t,n){var r=e(32);r(r.S,"Reflect",{has:function(e,t){return t in e}})},{32:32}],208:[function(e,t,n){var r=e(32),i=e(7),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!o||o(e)}})},{32:32,7:7}],209:[function(e,t,n){var r=e(32);r(r.S,"Reflect",{ownKeys:e(80)})},{32:32,80:80}],210:[function(e,t,n){var r=e(32),i=e(7),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return o&&o(e),!0}catch(e){return!1}}})},{32:32,7:7}],211:[function(e,t,n){var r=e(32),i=e(90);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(e){return!1}}})},{32:32,90:90}],212:[function(e,t,n){function r(e,t,n){var u,f,d=arguments.length<4?e:arguments[3],h=o.f(l(e),t);if(!h){if(p(f=a(e)))return r(f,t,n,d);h=c(0)}return s(h,"value")?!(h.writable===!1||!p(d))&&(u=o.f(d,t)||c(0),u.value=n,i.f(d,t,u),!0):void 0!==h.set&&(h.set.call(d,n),!0)}var i=e(67),o=e(70),a=e(74),s=e(39),u=e(32),c=e(85),l=e(7),p=e(49);u(u.S,"Reflect",{set:r})},{32:32,39:39,49:49,67:67,7:7,70:70,74:74,85:85}],213:[function(e,t,n){var r=e(38),i=e(43),o=e(67).f,a=e(72).f,s=e(50),u=e(36),c=r.RegExp,l=c,p=c.prototype,f=/a/g,d=/a/g,h=new c(f)!==f;if(e(28)&&(!h||e(34)(function(){return d[e(117)("match")]=!1,c(f)!=f||c(d)==d||"/a/i"!=c(f,"i")}))){c=function(e,t){var n=this instanceof c,r=s(e),o=void 0===t;return!n&&r&&e.constructor===c&&o?e:i(h?new l(r&&!o?e.source:e,t):l((r=e instanceof c)?e.source:e,r&&o?u.call(e):t),n?this:p,c)};for(var m=(function(e){e in c||o(c,e,{configurable:!0,get:function(){return l[e]},set:function(t){l[e]=t}})}),g=a(l),v=0;g.length>v;)m(g[v++]);p.constructor=c,c.prototype=p,e(87)(r,"RegExp",c)}e(91)("RegExp")},{117:117,28:28,34:34,36:36,38:38,43:43,50:50,67:67,72:72,87:87,91:91}],214:[function(e,t,n){e(28)&&"g"!=/./g.flags&&e(67).f(RegExp.prototype,"flags",{configurable:!0,get:e(36)})},{28:28,36:36,67:67}],215:[function(e,t,n){e(35)("match",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},{35:35}],216:[function(e,t,n){e(35)("replace",2,function(e,t,n){return[function(r,i){"use strict";var o=e(this),a=void 0==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},n]})},{35:35}],217:[function(e,t,n){e(35)("search",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},{35:35}],218:[function(e,t,n){e(35)("split",2,function(t,n,r){"use strict";var i=e(50),o=r,a=[].push,s="split",u="length",c="lastIndex";if("c"=="abbc"[s](/(b)*/)[1]||4!="test"[s](/(?:)/,-1)[u]||2!="ab"[s](/(?:ab)*/)[u]||4!="."[s](/(.?)(.?)/)[u]||"."[s](/()()/)[u]>1||""[s](/.?/)[u]){var l=void 0===/()??/.exec("")[1];r=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!i(e))return o.call(n,e,t);var r,s,p,f,d,h=[],m=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),g=0,v=void 0===t?4294967295:t>>>0,y=new RegExp(e.source,m+"g");for(l||(r=new RegExp("^"+y.source+"$(?!\\s)",m));(s=y.exec(n))&&(p=s.index+s[0][u],!(p>g&&(h.push(n.slice(g,s.index)),!l&&s[u]>1&&s[0].replace(r,function(){for(d=1;d1&&s.index=v)));)y[c]===s.index&&y[c]++;return g===n[u]?!f&&y.test("")||h.push(""):h.push(n.slice(g)),h[u]>v?h.slice(0,v):h}}else"0"[s](void 0,0)[u]&&(r=function(e,t){return void 0===e&&0===t?[]:o.call(this,e,t)});return[function(e,i){var o=t(this),a=void 0==e?void 0:e[n];return void 0!==a?a.call(e,o,i):r.call(String(o),e,i)},r]})},{35:35,50:50}],219:[function(e,t,n){"use strict";e(214);var r=e(7),i=e(36),o=e(28),a="toString",s=/./[a],u=function(t){e(87)(RegExp.prototype,a,t,!0)};e(34)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?u(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)}):s.name!=a&&u(function(){return s.call(this)})},{214:214,28:28,34:34,36:36,7:7,87:87}],220:[function(e,t,n){"use strict";var r=e(19);t.exports=e(22)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e=0===e?0:e,e)}},r)},{19:19,22:22}],221:[function(e,t,n){"use strict";e(99)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},{99:99}],222:[function(e,t,n){"use strict";e(99)("big",function(e){return function(){return e(this,"big","","")}})},{99:99}],223:[function(e,t,n){"use strict";e(99)("blink",function(e){return function(){return e(this,"blink","","")}})},{99:99}],224:[function(e,t,n){"use strict";e(99)("bold",function(e){return function(){return e(this,"b","","")}})},{99:99}],225:[function(e,t,n){"use strict";var r=e(32),i=e(97)(!1);r(r.P,"String",{codePointAt:function(e){return i(this,e)}})},{32:32,97:97}],226:[function(e,t,n){"use strict";var r=e(32),i=e(108),o=e(98),a="endsWith",s=""[a];r(r.P+r.F*e(33)(a),"String",{endsWith:function(e){var t=o(this,e,a),n=arguments.length>1?arguments[1]:void 0,r=i(t.length),u=void 0===n?r:Math.min(i(n),r),c=String(e);return s?s.call(t,c,u):t.slice(u-c.length,u)===c}})},{108:108,32:32,33:33,98:98}],227:[function(e,t,n){"use strict";e(99)("fixed",function(e){return function(){return e(this,"tt","","")}})},{99:99}],228:[function(e,t,n){"use strict";e(99)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},{99:99}],229:[function(e,t,n){"use strict";e(99)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},{99:99}],230:[function(e,t,n){var r=e(32),i=e(105),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(((t-=65536)>>10)+55296,t%1024+56320))}return n.join("")}})},{105:105,32:32}],231:[function(e,t,n){"use strict";var r=e(32),i=e(98),o="includes";r(r.P+r.F*e(33)(o),"String",{includes:function(e){return!!~i(this,e,o).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},{32:32,33:33,98:98}],232:[function(e,t,n){"use strict";e(99)("italics",function(e){return function(){return e(this,"i","","")}})},{99:99}],233:[function(e,t,n){"use strict";var r=e(97)(!0);e(53)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},{53:53,97:97}],234:[function(e,t,n){"use strict";e(99)("link",function(e){return function(t){return e(this,"a","href",t)}})},{99:99}],235:[function(e,t,n){var r=e(32),i=e(107),o=e(108);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s1?arguments[1]:void 0,t.length)),r=String(e);return s?s.call(t,r,n):t.slice(n,n+r.length)===r}})},{108:108,32:32,33:33,98:98}],239:[function(e,t,n){"use strict";e(99)("strike",function(e){return function(){return e(this,"strike","","")}})},{99:99}],240:[function(e,t,n){"use strict";e(99)("sub",function(e){return function(){return e(this,"sub","","")}})},{99:99}],241:[function(e,t,n){"use strict";e(99)("sup",function(e){return function(){return e(this,"sup","","")}})},{99:99}],242:[function(e,t,n){"use strict";e(102)("trim",function(e){return function(){return e(this,3)}})},{102:102}],243:[function(e,t,n){"use strict";var r=e(38),i=e(39),o=e(28),a=e(32),s=e(87),u=e(62).KEY,c=e(34),l=e(94),p=e(92),f=e(114),d=e(117),h=e(116),m=e(115),g=e(57),v=e(31),y=e(47),x=e(7),b=e(107),_=e(110),w=e(85),E=e(66),S=e(71),C=e(70),T=e(67),D=e(76),A=C.f,P=T.f,k=S.f,I=r.Symbol,F=r.JSON,O=F&&F.stringify,N="prototype",j=d("_hidden"),R=d("toPrimitive"),L={}.propertyIsEnumerable,M=l("symbol-registry"),B=l("symbols"),U=l("op-symbols"),V=Object[N],G="function"==typeof I,W=r.QObject,Q=!W||!W[N]||!W[N].findChild,H=o&&c(function(){return 7!=E(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=A(V,t);r&&delete V[t],P(e,t,n),r&&e!==V&&P(V,t,r)}:P,z=function(e){var t=B[e]=E(I[N]);return t._k=e,t},q=G&&"symbol"==typeof I.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof I},$=function(e,t,n){return e===V&&$(U,t,n),x(e),t=_(t,!0),x(n),i(B,t)?(n.enumerable?(i(e,j)&&e[j][t]&&(e[j][t]=!1),n=E(n,{enumerable:w(0,!1)})):(i(e,j)||P(e,j,w(1,{})),e[j][t]=!0),H(e,t,n)):P(e,t,n)},X=function(e,t){x(e);for(var n,r=v(t=b(t)),i=0,o=r.length;o>i;)$(e,n=r[i++],t[n]);return e},K=function(e,t){return void 0===t?E(e):X(E(e),t)},J=function(e){var t=L.call(this,e=_(e,!0));return!(this===V&&i(B,e)&&!i(U,e))&&(!(t||!i(this,e)||!i(B,e)||i(this,j)&&this[j][e])||t)},Y=function(e,t){if(e=b(e),t=_(t,!0),e!==V||!i(B,t)||i(U,t)){var n=A(e,t);return!n||!i(B,t)||i(e,j)&&e[j][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=k(b(e)),r=[],o=0;n.length>o;)i(B,t=n[o++])||t==j||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===V,r=k(n?U:b(e)),o=[],a=0;r.length>a;)!i(B,t=r[a++])||n&&!i(V,t)||o.push(B[t]);return o};G||(I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===V&&t.call(U,n),i(this,j)&&i(this[j],e)&&(this[j][e]=!1),H(this,e,w(1,n))};return o&&Q&&H(V,e,{configurable:!0,set:t}),z(e)},s(I[N],"toString",function(){return this._k}),C.f=Y,T.f=$,e(72).f=S.f=Z,e(77).f=J,e(73).f=ee,o&&!e(58)&&s(V,"propertyIsEnumerable",J,!0),h.f=function(e){return z(d(e))}),a(a.G+a.W+a.F*!G,{Symbol:I});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)d(te[ne++]);for(var te=D(d.store),ne=0;te.length>ne;)m(te[ne++]);a(a.S+a.F*!G,"Symbol",{for:function(e){return i(M,e+="")?M[e]:M[e]=I(e)},keyFor:function(e){if(q(e))return g(M,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){Q=!0},useSimple:function(){Q=!1}}),a(a.S+a.F*!G,"Object",{create:K,defineProperty:$,defineProperties:X,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Z,getOwnPropertySymbols:ee}),F&&a(a.S+a.F*(!G||c(function(){var e=I();return"[null]"!=O([e])||"{}"!=O({a:e})||"{}"!=O(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!q(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return t=r[1],"function"==typeof t&&(n=t),!n&&y(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!q(t))return t}),r[1]=t,O.apply(F,r)}}}),I[N][R]||e(40)(I[N],R,I[N].valueOf),p(I,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},{107:107,110:110,114:114,115:115,116:116,117:117,28:28,31:31,32:32,34:34,38:38,39:39,40:40,47:47,57:57,58:58,62:62,66:66,67:67,7:7,70:70,71:71,72:72,73:73,76:76,77:77,85:85,87:87,92:92,94:94}],244:[function(e,t,n){"use strict";var r=e(32),i=e(113),o=e(112),a=e(7),s=e(105),u=e(108),c=e(49),l=e(38).ArrayBuffer,p=e(95),f=o.ArrayBuffer,d=o.DataView,h=i.ABV&&l.isView,m=f.prototype.slice,g=i.VIEW,v="ArrayBuffer";r(r.G+r.W+r.F*(l!==f),{ArrayBuffer:f}),r(r.S+r.F*!i.CONSTR,v,{isView:function(e){return h&&h(e)||c(e)&&g in e}}),r(r.P+r.U+r.F*e(34)(function(){return!new f(2).slice(1,void 0).byteLength}),v,{slice:function(e,t){if(void 0!==m&&void 0===t)return m.call(a(this),e);for(var n=a(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),o=new(p(this,f))(u(i-r)),c=new d(this),l=new d(o),h=0;r0?arguments[0]:void 0)}},m={get:function(e){if(c(e)){var t=l(e);return t===!0?f(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(this,e,t)}},g=t.exports=e(22)("WeakMap",h,m,u,!0,!0);7!=(new g).set((Object.freeze||Object)(d),7).get(d)&&(r=u.getConstructor(h),s(r.prototype,m),a.NEED=!0,i(["delete","has","get","set"],function(e){var t=g.prototype,n=t[e];o(t,e,function(t,i){if(c(t)&&!p(t)){this._f||(this._f=new r);var o=this._f[e](t,i);return"set"==e?this:o}return n.call(this,t,i)})}))},{12:12,21:21,22:22,49:49,62:62,65:65,87:87}],256:[function(e,t,n){"use strict";var r=e(21);e(22)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e,!0)}},r,!1,!0)},{21:21,22:22}],257:[function(e,t,n){"use strict";var r=e(32),i=e(11)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),e(5)("includes")},{11:11,32:32,5:5}],258:[function(e,t,n){var r=e(32),i=e(64)(),o=e(38).process,a="process"==e(18)(o);r(r.G,{asap:function(e){var t=a&&o.domain;i(t?t.bind(e):e)}})},{18:18,32:32,38:38,64:64}],259:[function(e,t,n){var r=e(32),i=e(18);r(r.S,"Error",{isError:function(e){return"Error"===i(e)}})},{18:18,32:32}],260:[function(e,t,n){var r=e(32);r(r.P+r.R,"Map",{toJSON:e(20)("Map")})},{20:20,32:32}],261:[function(e,t,n){var r=e(32);r(r.S,"Math",{iaddh:function(e,t,n,r){var i=e>>>0,o=t>>>0,a=n>>>0;return o+(r>>>0)+((i&a|(i|a)&~(i+a>>>0))>>>31)|0}})},{32:32}],262:[function(e,t,n){var r=e(32);r(r.S,"Math",{imulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,a=i&n,s=r>>16,u=i>>16,c=(s*a>>>0)+(o*a>>>16);return s*u+(c>>16)+((o*u>>>0)+(c&n)>>16)}})},{32:32}],263:[function(e,t,n){var r=e(32);r(r.S,"Math",{isubh:function(e,t,n,r){var i=e>>>0,o=t>>>0,a=n>>>0;return o-(r>>>0)-((~i&a|~(i^a)&i-a>>>0)>>>31)|0}})},{32:32}],264:[function(e,t,n){var r=e(32);r(r.S,"Math",{umulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,a=i&n,s=r>>>16,u=i>>>16,c=(s*a>>>0)+(o*a>>>16);return s*u+(c>>>16)+((o*u>>>0)+(c&n)>>>16)}})},{32:32}],265:[function(e,t,n){"use strict";var r=e(32),i=e(109),o=e(3),a=e(67);e(28)&&r(r.P+e(69),"Object",{__defineGetter__:function(e,t){a.f(i(this),e,{get:o(t),enumerable:!0,configurable:!0})}})},{109:109,28:28,3:3,32:32,67:67,69:69}],266:[function(e,t,n){"use strict";var r=e(32),i=e(109),o=e(3),a=e(67);e(28)&&r(r.P+e(69),"Object",{__defineSetter__:function(e,t){a.f(i(this),e,{set:o(t),enumerable:!0,configurable:!0})}})},{109:109,28:28,3:3,32:32,67:67,69:69}],267:[function(e,t,n){var r=e(32),i=e(79)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},{32:32,79:79}],268:[function(e,t,n){var r=e(32),i=e(80),o=e(107),a=e(70),s=e(24);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n=o(e),r=a.f,u=i(n),c={},l=0;u.length>l;)s(c,t=u[l++],r(n,t));return c}})},{107:107,24:24,32:32,70:70,80:80}],269:[function(e,t,n){"use strict";var r=e(32),i=e(109),o=e(110),a=e(74),s=e(70).f;e(28)&&r(r.P+e(69),"Object",{__lookupGetter__:function(e){var t,n=i(this),r=o(e,!0);do if(t=s(n,r))return t.get;while(n=a(n))}})},{109:109,110:110,28:28,32:32,69:69,70:70,74:74}],270:[function(e,t,n){"use strict";var r=e(32),i=e(109),o=e(110),a=e(74),s=e(70).f;e(28)&&r(r.P+e(69),"Object",{__lookupSetter__:function(e){var t,n=i(this),r=o(e,!0);do if(t=s(n,r))return t.set;while(n=a(n))}})},{109:109,110:110,28:28,32:32,69:69,70:70,74:74}],271:[function(e,t,n){var r=e(32),i=e(79)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},{32:32,79:79}],272:[function(e,t,n){"use strict";var r=e(32),i=e(38),o=e(23),a=e(64)(),s=e(117)("observable"),u=e(3),c=e(7),l=e(6),p=e(86),f=e(40),d=e(37),h=d.RETURN,m=function(e){return null==e?void 0:u(e)},g=function(e){var t=e._c;t&&(e._c=void 0,t())},v=function(e){return void 0===e._o},y=function(e){v(e)||(e._o=void 0,g(e))},x=function(e,t){c(e),this._c=void 0,this._o=e,e=new b(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(t){return void e.error(t)}v(this)&&g(this)};x.prototype=p({},{unsubscribe:function(){y(this)}});var b=function(e){this._s=e};b.prototype=p({},{next:function(e){var t=this._s;if(!v(t)){var n=t._o;try{var r=m(n.next);if(r)return r.call(n,e)}catch(e){try{y(t)}finally{throw e}}}},error:function(e){var t=this._s;if(v(t))throw e;var n=t._o;t._o=void 0;try{var r=m(n.error);if(!r)throw e;e=r.call(n,e); }catch(e){try{g(t)}finally{throw e}}return g(t),e},complete:function(e){var t=this._s;if(!v(t)){var n=t._o;t._o=void 0;try{var r=m(n.complete);e=r?r.call(n,e):void 0}catch(e){try{g(t)}finally{throw e}}return g(t),e}}});var _=function(e){l(this,_,"Observable","_f")._f=u(e)};p(_.prototype,{subscribe:function(e){return new x(e,this._f)},forEach:function(e){var t=this;return new(o.Promise||i.Promise)(function(n,r){u(e);var i=t.subscribe({next:function(t){try{return e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n})})}}),p(_,{from:function(e){var t="function"==typeof this?this:_,n=m(c(e)[s]);if(n){var r=c(n.call(e));return r.constructor===t?r:new t(function(e){return r.subscribe(e)})}return new t(function(t){var n=!1;return a(function(){if(!n){try{if(d(e,!1,function(e){if(t.next(e),n)return h})===h)return}catch(e){if(n)throw e;return void t.error(e)}t.complete()}}),function(){n=!0}})},of:function(){for(var e=0,t=arguments.length,n=Array(t);e1?arguments[1]:void 0,!1)}})},{100:100,32:32}],286:[function(e,t,n){"use strict";var r=e(32),i=e(100);r(r.P,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},{100:100,32:32}],287:[function(e,t,n){"use strict";e(102)("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},{102:102}],288:[function(e,t,n){"use strict";e(102)("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},{102:102}],289:[function(e,t,n){e(115)("asyncIterator")},{115:115}],290:[function(e,t,n){e(115)("observable")},{115:115}],291:[function(e,t,n){var r=e(32);r(r.S,"System",{global:e(38)})},{32:32,38:38}],292:[function(e,t,n){for(var r=e(130),i=e(87),o=e(38),a=e(40),s=e(56),u=e(117),c=u("iterator"),l=u("toStringTag"),p=s.Array,f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],d=0;d<5;d++){var h,m=f[d],g=o[m],v=g&&g.prototype;if(v){v[c]||a(v,c,p),v[l]||a(v,l,m),s[m]=p;for(h in r)v[h]||i(v,h,r[h],!0)}}},{117:117,130:130,38:38,40:40,56:56,87:87}],293:[function(e,t,n){var r=e(32),i=e(104);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},{104:104,32:32}],294:[function(e,t,n){var r=e(38),i=e(32),o=e(44),a=e(83),s=r.navigator,u=!!s&&/MSIE .\./.test(s.userAgent),c=function(e){return u?function(t,n){return e(o(a,[].slice.call(arguments,2),"function"==typeof t?t:Function(t)),n)}:e};i(i.G+i.B+i.F*u,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},{32:32,38:38,44:44,83:83}],295:[function(e,t,n){e(243),e(180),e(182),e(181),e(184),e(186),e(191),e(185),e(183),e(193),e(192),e(188),e(189),e(187),e(179),e(190),e(194),e(195),e(146),e(148),e(147),e(197),e(196),e(167),e(177),e(178),e(168),e(169),e(170),e(171),e(172),e(173),e(174),e(175),e(176),e(150),e(151),e(152),e(153),e(154),e(155),e(156),e(157),e(158),e(159),e(160),e(161),e(162),e(163),e(164),e(165),e(166),e(230),e(235),e(242),e(233),e(225),e(226),e(231),e(236),e(238),e(221),e(222),e(223),e(224),e(227),e(228),e(229),e(232),e(234),e(237),e(239),e(240),e(241),e(141),e(143),e(142),e(145),e(144),e(129),e(127),e(134),e(131),e(137),e(139),e(126),e(133),e(123),e(138),e(121),e(136),e(135),e(128),e(132),e(120),e(122),e(125),e(124),e(140),e(130),e(213),e(219),e(214),e(215),e(216),e(217),e(218),e(198),e(149),e(220),e(255),e(256),e(244),e(245),e(250),e(253),e(254),e(248),e(251),e(249),e(252),e(246),e(247),e(199),e(200),e(201),e(202),e(203),e(206),e(204),e(205),e(207),e(208),e(209),e(210),e(212),e(211),e(257),e(283),e(286),e(285),e(287),e(288),e(284),e(289),e(290),e(268),e(271),e(267),e(265),e(266),e(269),e(270),e(260),e(282),e(291),e(259),e(261),e(263),e(262),e(264),e(273),e(274),e(276),e(275),e(278),e(277),e(279),e(280),e(281),e(258),e(272),e(294),e(293),e(292),t.exports=e(23)},{120:120,121:121,122:122,123:123,124:124,125:125,126:126,127:127,128:128,129:129,130:130,131:131,132:132,133:133,134:134,135:135,136:136,137:137,138:138,139:139,140:140,141:141,142:142,143:143,144:144,145:145,146:146,147:147,148:148,149:149,150:150,151:151,152:152,153:153,154:154,155:155,156:156,157:157,158:158,159:159,160:160,161:161,162:162,163:163,164:164,165:165,166:166,167:167,168:168,169:169,170:170,171:171,172:172,173:173,174:174,175:175,176:176,177:177,178:178,179:179,180:180,181:181,182:182,183:183,184:184,185:185,186:186,187:187,188:188,189:189,190:190,191:191,192:192,193:193,194:194,195:195,196:196,197:197,198:198,199:199,200:200,201:201,202:202,203:203,204:204,205:205,206:206,207:207,208:208,209:209,210:210,211:211,212:212,213:213,214:214,215:215,216:216,217:217,218:218,219:219,220:220,221:221,222:222,223:223,224:224,225:225,226:226,227:227,228:228,229:229,23:23,230:230,231:231,232:232,233:233,234:234,235:235,236:236,237:237,238:238,239:239,240:240,241:241,242:242,243:243,244:244,245:245,246:246,247:247,248:248,249:249,250:250,251:251,252:252,253:253,254:254,255:255,256:256,257:257,258:258,259:259,260:260,261:261,262:262,263:263,264:264,265:265,266:266,267:267,268:268,269:269,270:270,271:271,272:272,273:273,274:274,275:275,276:276,277:277,278:278,279:279,280:280,281:281,282:282,283:283,284:284,285:285,286:286,287:287,288:288,289:289,290:290,291:291,292:292,293:293,294:294}],296:[function(e,t,n){(function(e){!function(e){"use strict";function n(e,t,n,r){var o=t&&t.prototype instanceof i?t:i,a=Object.create(o.prototype),s=new f(r||[]);return a._invoke=c(e,n,s),a}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function i(){}function o(){}function a(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e){function t(n,i,o,a){var s=r(e[n],e,i);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&v.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,o,a)},function(e){t("throw",e,o,a)}):Promise.resolve(c).then(function(e){u.value=e,o(u)},a)}a(s.arg)}function n(e,n){function r(){return new Promise(function(r,i){t(e,n,r,i)})}return i=i?i.then(r,r):r()}"object"==typeof process&&process.domain&&(t=process.domain.bind(t));var i;this._invoke=n}function c(e,t,n){var i=E;return function(o,a){if(i===C)throw new Error("Generator is already running");if(i===T){if("throw"===o)throw a;return h()}for(;;){var s=n.delegate;if(s){if("return"===o||"throw"===o&&s.iterator[o]===m){n.delegate=null;var u=s.iterator.return;if(u){var c=r(u,s.iterator,a);if("throw"===c.type){o="throw",a=c.arg;continue}}if("return"===o)continue}var c=r(s.iterator[o],s.iterator,a);if("throw"===c.type){n.delegate=null,o="throw",a=c.arg;continue}o="next",a=m;var l=c.arg;if(!l.done)return i=S,l;n[s.resultName]=l.value,n.next=s.nextLoc,n.delegate=null}if("next"===o)n.sent=n._sent=a;else if("throw"===o){if(i===E)throw i=T,a;n.dispatchException(a)&&(o="next",a=m)}else"return"===o&&n.abrupt("return",a);i=C;var c=r(e,t,n);if("normal"===c.type){i=n.done?T:S;var l={value:c.arg,done:n.done};if(c.arg!==D)return l;n.delegate&&"next"===o&&(a=m)}else"throw"===c.type&&(i=T,o="throw",a=c.arg)}}}function l(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function p(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(l,this),this.reset(!0)}function d(e){if(e){var t=e[x];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=v.call(i,"catchLoc"),s=v.call(i,"finallyLoc");if(a&&s){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&v.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),p(n),D}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;p(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},D}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);e=function t(n,r,i){function o(s,u){if(!r[s]){if(!n[s]){var c="function"==typeof e&&e;if(!u&&c)return c(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var p=r[s]={exports:{}};n[s][0].call(p.exports,function(e){var t=n[s][1][e];return o(t?t:e)},p,p.exports,t,n,r,i)}return r[s].exports}for(var a="function"==typeof e&&e,s=0;s...",!0,!0),n.jsxName=new e.TokenType("jsxName"),n.jsxText=new e.TokenType("jsxText",{beforeExpr:!0}),n.jsxTagStart=new e.TokenType("jsxTagStart"),n.jsxTagEnd=new e.TokenType("jsxTagEnd"),n.jsxTagStart.updateContext=function(){this.context.push(a.j_expr),this.context.push(a.j_oTag),this.exprAllowed=!1},n.jsxTagEnd.updateContext=function(e){var t=this.context.pop();t===a.j_oTag&&e===n.slash||t===a.j_cTag?(this.context.pop(),this.exprAllowed=this.curContext()===a.j_expr):this.exprAllowed=!0};var s=e.Parser.prototype;return s.jsx_readToken=function(){for(var t="",r=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");var i=this.input.charCodeAt(this.pos);switch(i){case 60:case 123:return this.pos===this.start?60===i&&this.exprAllowed?(++this.pos,this.finishToken(n.jsxTagStart)):this.getTokenFromCode(i):(t+=this.input.slice(r,this.pos),this.finishToken(n.jsxText,t));case 38:t+=this.input.slice(r,this.pos),t+=this.jsx_readEntity(),r=this.pos;break;default:e.isNewLine(i)?(t+=this.input.slice(r,this.pos),t+=this.jsx_readNewLine(!0),r=this.pos):++this.pos}}},s.jsx_readNewLine=function(e){var t,n=this.input.charCodeAt(this.pos);return++this.pos,13===n&&10===this.input.charCodeAt(this.pos)?(++this.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(n),this.options.locations&&(++this.curLine,this.lineStart=this.pos),t},s.jsx_readString=function(t){for(var r="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var o=this.input.charCodeAt(this.pos);if(o===t)break;38===o?(r+=this.input.slice(i,this.pos),r+=this.jsx_readEntity(),i=this.pos):e.isNewLine(o)?(r+=this.input.slice(i,this.pos),r+=this.jsx_readNewLine(!1),i=this.pos):++this.pos}return r+=this.input.slice(i,this.pos++),this.finishToken(n.string,r)},s.jsx_readEntity=function(){var e,t="",n=0,a=this.input[this.pos];"&"!==a&&this.raise(this.pos,"Entity must start with an ampersand");for(var s=++this.pos;this.pos")}return i.openingElement=a,i.closingElement=s,i.children=o,this.type===n.relational&&"<"===this.value&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(i,"JSXElement")},s.jsx_parseElement=function(){var e=this.start,t=this.startLoc;return this.next(),this.jsx_parseElementAt(e,t)},e.plugins.jsx=function(t,r){r&&("object"!=typeof r&&(r={}),t.options.plugins.jsx={allowNamespaces:r.allowNamespaces!==!1,allowNamespacedObjects:!!r.allowNamespacedObjects},t.extend("parseExprAtom",function(e){return function(t){return this.type===n.jsxText?this.parseLiteral(this.value):this.type===n.jsxTagStart?this.jsx_parseElement():e.call(this,t)}}),t.extend("readToken",function(t){return function(r){var i=this.curContext();if(i===a.j_expr)return this.jsx_readToken();if(i===a.j_oTag||i===a.j_cTag){if(e.isIdentifierStart(r))return this.jsx_readWord();if(62==r)return++this.pos,this.finishToken(n.jsxTagEnd);if((34===r||39===r)&&i==a.j_oTag)return this.jsx_readString(r)}return 60===r&&this.exprAllowed?(++this.pos,this.finishToken(n.jsxTagStart)):t.call(this,r)}}),t.extend("updateContext",function(e){return function(t){if(this.type==n.braceL){var r=this.curContext();r==a.j_oTag?this.context.push(a.b_expr):r==a.j_expr?this.context.push(a.b_tmpl):e.call(this,t),this.exprAllowed=!0}else{if(this.type!==n.slash||t!==n.jsxTagStart)return e.call(this,t);this.context.length-=2,this.context.push(a.j_cTag),this.exprAllowed=!1}}}))},e}},{"./xhtml":2}],2:[function(e,t,n){t.exports={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},{}],3:[function(e,t,n){!function(e,r){"object"==typeof n&&"undefined"!=typeof t?r(n):"function"==typeof define&&define.amd?define(["exports"],r):r(e.acorn=e.acorn||{})}(this,function(e){"use strict";function t(e,t){for(var n=65536,r=0;re)return!1;if(n+=t[r+1],n>=e)return!0}}function n(e,n){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&S.test(String.fromCharCode(e)):n!==!1&&t(e,T)))}function r(e,n){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&C.test(String.fromCharCode(e)):n!==!1&&(t(e,T)||t(e,D)))))}function i(e,t){return new A(e,{beforeExpr:!0,binop:t})}function o(e,t){return void 0===t&&(t={}),t.keyword=e,I[e]=new A(e,t)}function a(e){return 10===e||13===e||8232===e||8233===e}function s(e,t){return M.call(e,t)}function u(e,t){for(var n=1,r=0;;){N.lastIndex=r;var i=N.exec(e);if(!(i&&i.index=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),U(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return U(t.onComment)&&(t.onComment=l(t,t.onComment)),t}function l(e,t){return function(n,r,i,o,a,s){var u={type:n?"Block":"Line",value:r,start:i,end:o};e.locations&&(u.loc=new G(this,a,s)),e.ranges&&(u.range=[i,o]),t.push(u)}}function p(e){return new RegExp("^("+e.replace(/ /g,"|")+")$")}function f(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}function d(e,t,n,r){try{return new RegExp(e,t)}catch(e){if(void 0!==n)throw e instanceof SyntaxError&&r.raise(n,"Error parsing regular expression: "+e.message),e}}function h(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(1023&e)+56320))}function m(e,t){return new H(t,e).parse()}function g(e,t,n){var r=new H(n,e,t);return r.nextToken(),r.parseExpression()}function v(e,t){return new H(t,e)}function y(t,n,r){e.parse_dammit=t,e.LooseParser=n,e.pluginsLoose=r}var x={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},b="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",_={5:b,6:b+" const class extends export import super"},w="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",E="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",S=new RegExp("["+w+"]"),C=new RegExp("["+w+E+"]");w=E=null;var T=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],D=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],A=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null},P={beforeExpr:!0},k={startsExpr:!0},I={},F={num:new A("num",k),regexp:new A("regexp",k),string:new A("string",k),name:new A("name",k),eof:new A("eof"),bracketL:new A("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new A("]"),braceL:new A("{",{beforeExpr:!0,startsExpr:!0}),braceR:new A("}"),parenL:new A("(",{beforeExpr:!0,startsExpr:!0}),parenR:new A(")"),comma:new A(",",P),semi:new A(";",P),colon:new A(":",P),dot:new A("."),question:new A("?",P),arrow:new A("=>",P),template:new A("template"),ellipsis:new A("...",P),backQuote:new A("`",k),dollarBraceL:new A("${",{beforeExpr:!0,startsExpr:!0}),eq:new A("=",{beforeExpr:!0,isAssign:!0}),assign:new A("_=",{beforeExpr:!0,isAssign:!0}),incDec:new A("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new A("prefix",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:i("||",1),logicalAND:i("&&",2),bitwiseOR:i("|",3),bitwiseXOR:i("^",4),bitwiseAND:i("&",5),equality:i("==/!=",6),relational:i("",7),bitShift:i("<>",8),plusMin:new A("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:i("%",10),star:i("*",10),slash:i("/",10),starstar:new A("**",{beforeExpr:!0}),_break:o("break"),_case:o("case",P),_catch:o("catch"),_continue:o("continue"),_debugger:o("debugger"),_default:o("default",P),_do:o("do",{isLoop:!0,beforeExpr:!0}),_else:o("else",P),_finally:o("finally"),_for:o("for",{isLoop:!0}),_function:o("function",k),_if:o("if"),_return:o("return",P), _switch:o("switch"),_throw:o("throw",P),_try:o("try"),_var:o("var"),_const:o("const"),_while:o("while",{isLoop:!0}),_with:o("with"),_new:o("new",{beforeExpr:!0,startsExpr:!0}),_this:o("this",k),_super:o("super",k),_class:o("class"),_extends:o("extends",P),_export:o("export"),_import:o("import"),_null:o("null",k),_true:o("true",k),_false:o("false",k),_in:o("in",{beforeExpr:!0,binop:7}),_instanceof:o("instanceof",{beforeExpr:!0,binop:7}),_typeof:o("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:o("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:o("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},O=/\r\n?|\n|\u2028|\u2029/,N=new RegExp(O.source,"g"),j=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,R=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,L=Object.prototype,M=L.hasOwnProperty,B=L.toString,U=Array.isArray||function(e){return"[object Array]"===B.call(e)},V=function(e,t){this.line=e,this.column=t};V.prototype.offset=function(e){return new V(this.line,this.column+e)};var G=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)},W={ecmaVersion:7,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,plugins:{}},Q={},H=function(e,t,n){this.options=e=c(e),this.sourceFile=e.sourceFile,this.keywords=p(_[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var i=e.ecmaVersion;!(r=x[i]);i--);"module"==e.sourceType&&(r+=" await")}this.reservedWords=p(r);var o=(r?r+" ":"")+x.strict;this.reservedWordsStrict=p(o),this.reservedWordsStrictBind=p(o+" "+x.strictBind),this.input=String(t),this.containsEsc=!1,this.loadPlugins(e.plugins),n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(O).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=F.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};H.prototype.isKeyword=function(e){return this.keywords.test(e)},H.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},H.prototype.extend=function(e,t){this[e]=t(this[e])},H.prototype.loadPlugins=function(e){var t=this;for(var n in e){var r=Q[n];if(!r)throw new Error("Plugin '"+n+"' not found");r(t,e[n])}},H.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var z=H.prototype,q=/^(?:'((?:[^']|\.)*)'|"((?:[^"]|\.)*)"|;)/;z.strictDirective=function(e){for(var t=this;;){R.lastIndex=e,e+=R.exec(t.input)[0].length;var n=q.exec(t.input.slice(e));if(!n)return!1;if("use strict"==(n[1]||n[2]))return!0;e+=n[0].length}},z.eat=function(e){return this.type===e&&(this.next(),!0)},z.isContextual=function(e){return this.type===F.name&&this.value===e},z.eatContextual=function(e){return this.value===e&&this.eat(F.name)},z.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},z.canInsertSemicolon=function(){return this.type===F.eof||this.type===F.braceR||O.test(this.input.slice(this.lastTokEnd,this.start))},z.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},z.semicolon=function(){this.eat(F.semi)||this.insertSemicolon()||this.unexpected()},z.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},z.expect=function(e){this.eat(e)||this.unexpected()},z.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var $=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1};z.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},z.checkExpressionErrors=function(e,t){var n=e?e.shorthandAssign:-1;return t?void(n>-1&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")):n>=0},z.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var K={kind:"loop"},J={kind:"switch"};X.isLet=function(){if(this.type!==F.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;R.lastIndex=this.pos;var e=R.exec(this.input),t=this.pos+e[0].length,i=this.input.charCodeAt(t);if(91===i||123==i)return!0;if(n(i,!0)){for(var o=t+1;r(this.input.charCodeAt(o),!0);)++o;var a=this.input.slice(t,o);if(!this.isKeyword(a))return!0}return!1},X.isAsyncFunction=function(){if(this.type!==F.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;R.lastIndex=this.pos;var e=R.exec(this.input),t=this.pos+e[0].length;return!(O.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!=this.input.length&&r(this.input.charAt(t+8)))},X.parseStatement=function(e,t,n){var r,i=this.type,o=this.startNode();switch(this.isLet()&&(i=F._var,r="let"),i){case F._break:case F._continue:return this.parseBreakContinueStatement(o,i.keyword);case F._debugger:return this.parseDebuggerStatement(o);case F._do:return this.parseDoStatement(o);case F._for:return this.parseForStatement(o);case F._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(o,!1);case F._class:return e||this.unexpected(),this.parseClass(o,!0);case F._if:return this.parseIfStatement(o);case F._return:return this.parseReturnStatement(o);case F._switch:return this.parseSwitchStatement(o);case F._throw:return this.parseThrowStatement(o);case F._try:return this.parseTryStatement(o);case F._const:case F._var:return r=r||this.value,e||"var"==r||this.unexpected(),this.parseVarStatement(o,r);case F._while:return this.parseWhileStatement(o);case F._with:return this.parseWithStatement(o);case F.braceL:return this.parseBlock();case F.semi:return this.parseEmptyStatement(o);case F._export:case F._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===F._import?this.parseImport(o):this.parseExport(o,n);default:if(this.isAsyncFunction()&&e)return this.next(),this.parseFunctionStatement(o,!0);var a=this.value,s=this.parseExpression();return i===F.name&&"Identifier"===s.type&&this.eat(F.colon)?this.parseLabeledStatement(o,a,s):this.parseExpressionStatement(o,s)}},X.parseBreakContinueStatement=function(e,t){var n=this,r="break"==t;this.next(),this.eat(F.semi)||this.insertSemicolon()?e.label=null:this.type!==F.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i=6?this.eat(F.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},X.parseForStatement=function(e){if(this.next(),this.labels.push(K),this.enterLexicalScope(),this.expect(F.parenL),this.type===F.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===F._var||this.type===F._const||t){var n=this.startNode(),r=t?"let":this.value;return this.next(),this.parseVar(n,!0,r),this.finishNode(n,"VariableDeclaration"),!(this.type===F._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||"var"!==r&&n.declarations[0].init?this.parseFor(e,n):this.parseForIn(e,n)}var i=new $,o=this.parseExpression(!0,i);return this.type===F._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(o),this.checkLVal(o),this.checkPatternErrors(i,!0),this.parseForIn(e,o)):(this.checkExpressionErrors(i,!0),this.parseFor(e,o))},X.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},X.isFunction=function(){return this.type===F._function||this.isAsyncFunction()},X.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.isFunction()),e.alternate=this.eat(F._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(e,"IfStatement")},X.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(F.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},X.parseSwitchStatement=function(e){var t=this;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(F.braceL),this.labels.push(J),this.enterLexicalScope();for(var n,r=!1;this.type!=F.braceR;)if(t.type===F._case||t.type===F._default){var i=t.type===F._case;n&&t.finishNode(n,"SwitchCase"),e.cases.push(n=t.startNode()),n.consequent=[],t.next(),i?n.test=t.parseExpression():(r&&t.raiseRecoverable(t.lastTokStart,"Multiple default clauses"),r=!0,n.test=null),t.expect(F.colon)}else n||t.unexpected(),n.consequent.push(t.parseStatement(!0));return this.exitLexicalScope(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},X.parseThrowStatement=function(e){return this.next(),O.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Y=[];X.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===F._catch){var t=this.startNode();this.next(),this.expect(F.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,"let"),this.expect(F.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(F._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},X.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},X.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(K),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},X.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},X.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},X.parseLabeledStatement=function(e,t,n){for(var r=this,i=0;i=0;a--){var s=r.labels[a];if(s.statementStart!=e.start)break;s.statementStart=r.start,s.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(!0),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!=e.body.kind||"FunctionDeclaration"==e.body.type&&(this.strict||e.body.generator))&&this.raiseRecoverable(e.body.start,"Invalid labeled declaration"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},X.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},X.parseBlock=function(e){var t=this;void 0===e&&(e=!0);var n=this.startNode();for(n.body=[],this.expect(F.braceL),e&&this.enterLexicalScope();!this.eat(F.braceR);){var r=t.parseStatement(!0);n.body.push(r)}return e&&this.exitLexicalScope(),this.finishNode(n,"BlockStatement")},X.parseFor=function(e,t){return e.init=t,this.expect(F.semi),e.test=this.type===F.semi?null:this.parseExpression(),this.expect(F.semi),e.update=this.type===F.parenR?null:this.parseExpression(),this.expect(F.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},X.parseForIn=function(e,t){var n=this.type===F._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(F.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},X.parseVar=function(e,t,n){var r=this;for(e.declarations=[],e.kind=n;;){var i=r.startNode();if(r.parseVarId(i,n),r.eat(F.eq)?i.init=r.parseMaybeAssign(t):"const"!==n||r.type===F._in||r.options.ecmaVersion>=6&&r.isContextual("of")?"Identifier"==i.id.type||t&&(r.type===F._in||r.isContextual("of"))?i.init=null:r.raise(r.lastTokEnd,"Complex binding patterns require an initialization value"):r.unexpected(),e.declarations.push(r.finishNode(i,"VariableDeclarator")),!r.eat(F.comma))break}return e},X.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},X.parseFunction=function(e,t,n,r){this.initFunction(e),this.options.ecmaVersion>=6&&!r&&(e.generator=this.eat(F.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&&(e.id="nullableID"===t&&this.type!=F.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,"var"));var i=this.inGenerator,o=this.inAsync,a=this.yieldPos,s=this.awaitPos,u=this.inFunction;return this.inGenerator=e.generator,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),t||(e.id=this.type==F.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=i,this.inAsync=o,this.yieldPos=a,this.awaitPos=s,this.inFunction=u,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},X.parseFunctionParams=function(e){this.expect(F.parenL),e.params=this.parseBindingList(F.parenR,!1,this.options.ecmaVersion>=8,!0),this.checkYieldAwaitInDefaultParams()},X.parseClass=function(e,t){var n=this;this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var r=this.startNode(),i=!1;for(r.body=[],this.expect(F.braceL);!this.eat(F.braceR);)if(!n.eat(F.semi)){var o=n.startNode(),a=n.eat(F.star),s=!1,u=n.type===F.name&&"static"===n.value;n.parsePropertyName(o),o.static=u&&n.type!==F.parenL,o.static&&(a&&n.unexpected(),a=n.eat(F.star),n.parsePropertyName(o)),n.options.ecmaVersion>=8&&!a&&!o.computed&&"Identifier"===o.key.type&&"async"===o.key.name&&n.type!==F.parenL&&!n.canInsertSemicolon()&&(s=!0,n.parsePropertyName(o)),o.kind="method";var c=!1;if(!o.computed){var l=o.key;a||s||"Identifier"!==l.type||n.type===F.parenL||"get"!==l.name&&"set"!==l.name||(c=!0,o.kind=l.name,l=n.parsePropertyName(o)),!o.static&&("Identifier"===l.type&&"constructor"===l.name||"Literal"===l.type&&"constructor"===l.value)&&(i&&n.raise(l.start,"Duplicate constructor in the same class"),c&&n.raise(l.start,"Constructor can't have get/set modifier"),a&&n.raise(l.start,"Constructor can't be a generator"),s&&n.raise(l.start,"Constructor can't be an async method"),o.kind="constructor",i=!0)}if(n.parseClassMethod(r,o,a,s),c){var p="get"===o.kind?0:1;if(o.value.params.length!==p){var f=o.value.start;"get"===o.kind?n.raiseRecoverable(f,"getter should have no params"):n.raiseRecoverable(f,"setter should have exactly one param")}else"set"===o.kind&&"RestElement"===o.value.params[0].type&&n.raiseRecoverable(o.value.params[0].start,"Setter cannot use rest params")}}return e.body=this.finishNode(r,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},X.parseClassMethod=function(e,t,n,r){t.value=this.parseMethod(n,r),e.body.push(this.finishNode(t,"MethodDefinition"))},X.parseClassId=function(e,t){e.id=this.type===F.name?this.parseIdent():t===!0?this.unexpected():null},X.parseClassSuper=function(e){e.superClass=this.eat(F._extends)?this.parseExprSubscripts():null},X.parseExport=function(e,t){var n=this;if(this.next(),this.eat(F.star))return this.expectContextual("from"),e.source=this.type===F.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(F._default)){this.checkExport(t,"default",this.lastTokStart);var r;if(this.type===F._function||(r=this.isAsyncFunction())){var i=this.startNode();this.next(),r&&this.next(),e.declaration=this.parseFunction(i,"nullableID",!1,r)}else if(this.type===F._class){var o=this.startNode();e.declaration=this.parseClass(o,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))e.source=this.type===F.string?this.parseExprAtom():this.unexpected();else{for(var a=0;a=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Can not use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var r=0;r=6&&(e.computed||e.method||e.shorthand))){var n,r=e.key;switch(r.type){case"Identifier":n=r.name;break;case"Literal":n=String(r.value);break;default:return}var i=e.kind;if(this.options.ecmaVersion>=6)return void("__proto__"===n&&"init"===i&&(t.proto&&this.raiseRecoverable(r.start,"Redefinition of __proto__ property"),t.proto=!0));n="$"+n;var o=t[n];if(o){var a;a="init"===i?this.strict&&o.init||o.get||o.set:o.init||o[i],a&&this.raiseRecoverable(r.start,"Redefinition of property")}else o=t[n]={init:!1,get:!1,set:!1};o[i]=!0}},ee.parseExpression=function(e,t){var n=this,r=this.start,i=this.startLoc,o=this.parseMaybeAssign(e,t);if(this.type===F.comma){var a=this.startNodeAt(r,i);for(a.expressions=[o];this.eat(F.comma);)a.expressions.push(n.parseMaybeAssign(e,t));return this.finishNode(a,"SequenceExpression")}return o},ee.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var r=!1,i=-1,o=-1;t?(i=t.parenthesizedAssign,o=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new $,r=!0);var a=this.start,s=this.startLoc;this.type!=F.parenL&&this.type!=F.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,a,s)),this.type.isAssign){this.checkPatternErrors(t,!0),r||$.call(t);var c=this.startNodeAt(a,s);return c.operator=this.value,c.left=this.type===F.eq?this.toAssignable(u):u,t.shorthandAssign=-1,this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),o>-1&&(t.trailingComma=o),u},ee.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(F.question)){var o=this.startNodeAt(n,r);return o.test=i,o.consequent=this.parseMaybeAssign(),this.expect(F.colon),o.alternate=this.parseMaybeAssign(e),this.finishNode(o,"ConditionalExpression")}return i},ee.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start==n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},ee.parseExprOp=function(e,t,n,r,i){var o=this.type.binop;if(null!=o&&(!i||this.type!==F._in)&&o>r){var a=this.type===F.logicalOR||this.type===F.logicalAND,s=this.value;this.next();var u=this.start,c=this.startLoc,l=this.parseExprOp(this.parseMaybeUnary(null,!1),u,c,o,i),p=this.buildBinary(t,n,e,l,s,a);return this.parseExprOp(p,t,n,r,i)}return e},ee.buildBinary=function(e,t,n,r,i,o){var a=this.startNodeAt(e,t);return a.left=n,a.operator=i,a.right=r,this.finishNode(a,o?"LogicalExpression":"BinaryExpression")},ee.parseMaybeUnary=function(e,t){var n,r=this,i=this.start,o=this.startLoc;if(this.inAsync&&this.isContextual("await"))n=this.parseAwait(e),t=!0;else if(this.type.prefix){var a=this.startNode(),s=this.type===F.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),s?this.checkLVal(a.argument):this.strict&&"delete"===a.operator&&"Identifier"===a.argument.type?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(a,s?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var u=r.startNodeAt(i,o);u.operator=r.value,u.prefix=!1,u.argument=n,r.checkLVal(n),r.next(),n=r.finishNode(u,"UpdateExpression")}}return!t&&this.eat(F.starstar)?this.buildBinary(i,o,n,this.parseMaybeUnary(null,!1),"**",!1):n},ee.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,r=this.parseExprAtom(e),i="ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return r;var o=this.parseSubscripts(r,t,n);return e&&"MemberExpression"===o.type&&(e.parenthesizedAssign>=o.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=o.start&&(e.parenthesizedBind=-1)),o},ee.parseSubscripts=function(e,t,n,r){for(var i,o=this,a=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon();;)if((i=o.eat(F.bracketL))||o.eat(F.dot)){var s=o.startNodeAt(t,n);s.object=e,s.property=i?o.parseExpression():o.parseIdent(!0),s.computed=!!i,i&&o.expect(F.bracketR),e=o.finishNode(s,"MemberExpression")}else if(!r&&o.eat(F.parenL)){var u=new $,c=o.yieldPos,l=o.awaitPos;o.yieldPos=0,o.awaitPos=0;var p=o.parseExprList(F.parenR,o.options.ecmaVersion>=8,!1,u);if(a&&!o.canInsertSemicolon()&&o.eat(F.arrow))return o.checkPatternErrors(u,!1),o.checkYieldAwaitInDefaultParams(),o.yieldPos=c,o.awaitPos=l,o.parseArrowExpression(o.startNodeAt(t,n),p,!0);o.checkExpressionErrors(u,!0),o.yieldPos=c||o.yieldPos,o.awaitPos=l||o.awaitPos;var f=o.startNodeAt(t,n);f.callee=e,f.arguments=p,e=o.finishNode(f,"CallExpression")}else{if(o.type!==F.backQuote)return e;var d=o.startNodeAt(t,n);d.tag=e,d.quasi=o.parseTemplate(),e=o.finishNode(d,"TaggedTemplateExpression")}},ee.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case F._super:this.inFunction||this.raise(this.start,"'super' outside of function or class");case F._this:var r=this.type===F._this?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,r);case F.name:var i=this.start,o=this.startLoc,a=this.parseIdent(this.type!==F.name);if(this.options.ecmaVersion>=8&&"async"===a.name&&!this.canInsertSemicolon()&&this.eat(F._function))return this.parseFunction(this.startNodeAt(i,o),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(F.arrow))return this.parseArrowExpression(this.startNodeAt(i,o),[a],!1);if(this.options.ecmaVersion>=8&&"async"===a.name&&this.type===F.name)return a=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(F.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(i,o),[a],!0)}return a;case F.regexp:var s=this.value;return t=this.parseLiteral(s.value),t.regex={pattern:s.pattern,flags:s.flags},t;case F.num:case F.string:return this.parseLiteral(this.value);case F._null:case F._true:case F._false:return t=this.startNode(),t.value=this.type===F._null?null:this.type===F._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case F.parenL: var u=this.start,c=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),c;case F.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(F.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case F.braceL:return this.parseObj(!1,e);case F._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case F._class:return this.parseClass(this.startNode(),!1);case F._new:return this.parseNew();case F.backQuote:return this.parseTemplate();default:this.unexpected()}},ee.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},ee.parseParenExpression=function(){this.expect(F.parenL);var e=this.parseExpression();return this.expect(F.parenR),e},ee.parseParenAndDistinguishExpression=function(e){var t,n=this,r=this.start,i=this.startLoc,o=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a,s,u=this.start,c=this.startLoc,l=[],p=!0,f=!1,d=new $,h=this.yieldPos,m=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==F.parenR;){if(p?p=!1:n.expect(F.comma),o&&n.afterTrailingComma(F.parenR,!0)){f=!0;break}if(n.type===F.ellipsis){a=n.start,l.push(n.parseParenItem(n.parseRest())),n.type===F.comma&&n.raise(n.start,"Comma is not permitted after the rest element");break}n.type!==F.parenL||s||(s=n.start),l.push(n.parseMaybeAssign(!1,d,n.parseParenItem))}var g=this.start,v=this.startLoc;if(this.expect(F.parenR),e&&!this.canInsertSemicolon()&&this.eat(F.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),s&&this.unexpected(s),this.yieldPos=h,this.awaitPos=m,this.parseParenArrowList(r,i,l);l.length&&!f||this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(d,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=m||this.awaitPos,l.length>1?(t=this.startNodeAt(u,c),t.expressions=l,this.finishNodeAt(t,"SequenceExpression",g,v)):t=l[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(r,i);return y.expression=t,this.finishNode(y,"ParenthesizedExpression")}return t},ee.parseParenItem=function(e){return e},ee.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var te=[];ee.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(F.dot))return e.meta=t,e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inFunction||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty");var n=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,r,!0),this.eat(F.parenL)?e.arguments=this.parseExprList(F.parenR,this.options.ecmaVersion>=8,!1):e.arguments=te,this.finishNode(e,"NewExpression")},ee.parseTemplateElement=function(){var e=this.startNode();return e.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),e.tail=this.type===F.backQuote,this.finishNode(e,"TemplateElement")},ee.parseTemplate=function(){var e=this,t=this.startNode();this.next(),t.expressions=[];var n=this.parseTemplateElement();for(t.quasis=[n];!n.tail;)e.expect(F.dollarBraceL),t.expressions.push(e.parseExpression()),e.expect(F.braceR),t.quasis.push(n=e.parseTemplateElement());return this.next(),this.finishNode(t,"TemplateLiteral")},ee.parseObj=function(e,t){var n=this,r=this.startNode(),i=!0,o={};for(r.properties=[],this.next();!this.eat(F.braceR);){if(i)i=!1;else if(n.expect(F.comma),n.afterTrailingComma(F.braceR))break;var a,s,u,c,l=n.startNode();n.options.ecmaVersion>=6&&(l.method=!1,l.shorthand=!1,(e||t)&&(u=n.start,c=n.startLoc),e||(a=n.eat(F.star))),n.parsePropertyName(l),e||!(n.options.ecmaVersion>=8)||a||l.computed||"Identifier"!==l.key.type||"async"!==l.key.name||n.type===F.parenL||n.type===F.colon||n.canInsertSemicolon()?s=!1:(s=!0,n.parsePropertyName(l,t)),n.parsePropertyValue(l,e,a,s,u,c,t),n.checkPropClash(l,o),r.properties.push(n.finishNode(l,"Property"))}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")},ee.parsePropertyValue=function(e,t,n,r,i,o,a){if((n||r)&&this.type===F.colon&&this.unexpected(),this.eat(F.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===F.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r);else if(this.options.ecmaVersion>=5&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&this.type!=F.comma&&this.type!=F.braceR){(n||r||t)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var s="get"===e.kind?0:1;if(e.value.params.length!==s){var u=e.value.start;"get"===e.kind?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((this.keywords.test(e.key.name)||(this.strict?this.reservedWordsStrict:this.reservedWords).test(e.key.name)||this.inGenerator&&"yield"==e.key.name||this.inAsync&&"await"==e.key.name)&&this.raiseRecoverable(e.key.start,"'"+e.key.name+"' can not be used as shorthand property"),e.kind="init",t?e.value=this.parseMaybeDefault(i,o,e.key):this.type===F.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,o,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected()},ee.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(F.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(F.bracketR),e.key;e.computed=!1}return e.key=this.type===F.num||this.type===F.string?this.parseExprAtom():this.parseIdent(!0)},ee.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},ee.parseMethod=function(e,t){var n=this.startNode(),r=this.inGenerator,i=this.inAsync,o=this.yieldPos,a=this.awaitPos,s=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(F.parenL),n.params=this.parseBindingList(F.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=r,this.inAsync=i,this.yieldPos=o,this.awaitPos=a,this.inFunction=s,this.finishNode(n,"FunctionExpression")},ee.parseArrowExpression=function(e,t,n){var r=this.inGenerator,i=this.inAsync,o=this.yieldPos,a=this.awaitPos,s=this.inFunction;return this.enterFunctionScope(),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inGenerator=!1,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=r,this.inAsync=i,this.yieldPos=o,this.awaitPos=a,this.inFunction=s,this.finishNode(e,"ArrowFunctionExpression")},ee.parseFunctionBody=function(e,t){var n=t&&this.type!==F.braceL,r=this.strict,i=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);r&&!o||(i=this.strictDirective(this.end),i&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var a=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!r&&!i&&!t&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.labels=a}this.exitFunctionScope(),this.strict&&e.id&&this.checkLVal(e.id,"none"),this.strict=r},ee.isSimpleParamList=function(e){for(var t=0;t=6||this.input.slice(this.start,this.end).indexOf("\\")==-1)&&this.raiseRecoverable(this.start,"The keyword '"+this.value+"' is reserved"),this.inGenerator&&"yield"===this.value&&this.raiseRecoverable(this.start,"Can not use 'yield' as identifier inside a generator"),this.inAsync&&"await"===this.value&&this.raiseRecoverable(this.start,"Can not use 'await' as identifier inside an async function"),t.name=this.value):e&&this.type.keyword?t.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"Identifier")},ee.parseYield=function(){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type==F.semi||this.canInsertSemicolon()||this.type!=F.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(F.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")},ee.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var ne=H.prototype;ne.raise=function(e,t){var n=u(this.input,e);t+=" ("+n.line+":"+n.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},ne.raiseRecoverable=ne.raise,ne.curPosition=function(){if(this.options.locations)return new V(this.curLine,this.pos-this.lineStart)};var re=H.prototype,ie=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var r=0;r=0;t--)if(e.context[t].generator)return!0;return!1},ce.updateContext=function(e){var t,n=this.type;n.keyword&&e==F.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},F.parenR.updateContext=F.braceR.updateContext=function(){if(1==this.context.length)return void(this.exprAllowed=!0);var e,t=this.context.pop();t===ue.b_stat&&(e=this.curContext())&&"function"===e.token?(this.context.pop(),this.exprAllowed=!1):t===ue.b_tmpl?this.exprAllowed=!0:this.exprAllowed=!t.isExpr},F.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?ue.b_stat:ue.b_expr),this.exprAllowed=!0},F.dollarBraceL.updateContext=function(){this.context.push(ue.b_tmpl),this.exprAllowed=!0},F.parenL.updateContext=function(e){var t=e===F._if||e===F._for||e===F._with||e===F._while;this.context.push(t?ue.p_stat:ue.p_expr),this.exprAllowed=!0},F.incDec.updateContext=function(){},F._function.updateContext=function(e){e.beforeExpr&&e!==F.semi&&e!==F._else&&(e!==F.colon&&e!==F.braceL||this.curContext()!==ue.b_stat)&&this.context.push(ue.f_expr),this.exprAllowed=!1},F.backQuote.updateContext=function(){this.curContext()===ue.q_tmpl?this.context.pop():this.context.push(ue.q_tmpl),this.exprAllowed=!1},F.star.updateContext=function(e){e==F._function&&(this.curContext()===ue.f_expr?this.context[this.context.length-1]=ue.f_expr_gen:this.context.push(ue.f_gen)),this.exprAllowed=!0},F.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&("of"==this.value&&!this.exprAllowed||"yield"==this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var le=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new G(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},pe=H.prototype,fe="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);pe.next=function(){this.options.onToken&&this.options.onToken(new le(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},pe.getToken=function(){return this.next(),new le(this)},"undefined"!=typeof Symbol&&(pe[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===F.eof,value:t}}}}),pe.curContext=function(){return this.context[this.context.length-1]},pe.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(F.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},pe.readToken=function(e){return n(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},pe.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=57344)return e;var t=this.input.charCodeAt(this.pos+1);return(e<<10)+t-56613888},pe.skipBlockComment=function(){var e=this,t=this.options.onComment&&this.curPosition(),n=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations){N.lastIndex=n;for(var i;(i=N.exec(this.input))&&i.index8&&t<14||t>=5760&&j.test(String.fromCharCode(t))))break e;++e.pos}}},pe.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},pe.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(F.ellipsis)):(++this.pos,this.finishToken(F.dot))},pe.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(F.assign,2):this.finishOp(F.slash,1)},pe.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?F.star:F.modulo;return this.options.ecmaVersion>=7&&42===t&&(++n,r=F.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(F.assign,n+1):this.finishOp(r,n)},pe.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?F.logicalOR:F.logicalAND,2):61===t?this.finishOp(F.assign,2):this.finishOp(124===e?F.bitwiseOR:F.bitwiseAND,1)},pe.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(F.assign,2):this.finishOp(F.bitwiseXOR,1)},pe.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45==t&&62==this.input.charCodeAt(this.pos+2)&&O.test(this.input.slice(this.lastTokEnd,this.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(F.incDec,2):61===t?this.finishOp(F.assign,2):this.finishOp(F.plusMin,1)},pe.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(F.assign,n+1):this.finishOp(F.bitShift,n)):33==t&&60==e&&45==this.input.charCodeAt(this.pos+2)&&45==this.input.charCodeAt(this.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(n=2),this.finishOp(F.relational,n))},pe.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(F.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(F.arrow)):this.finishOp(61===e?F.eq:F.prefix,1)},pe.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(F.parenL);case 41:return++this.pos,this.finishToken(F.parenR);case 59:return++this.pos,this.finishToken(F.semi);case 44:return++this.pos,this.finishToken(F.comma);case 91:return++this.pos,this.finishToken(F.bracketL);case 93:return++this.pos,this.finishToken(F.bracketR);case 123:return++this.pos,this.finishToken(F.braceL);case 125:return++this.pos,this.finishToken(F.braceR);case 58:return++this.pos,this.finishToken(F.colon);case 63:return++this.pos,this.finishToken(F.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(F.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(F.prefix,1)}this.raise(this.pos,"Unexpected character '"+h(e)+"'")},pe.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var de=!!d("￿","u");pe.readRegexp=function(){for(var e,t,n=this,r=this.pos;;){n.pos>=n.input.length&&n.raise(r,"Unterminated regular expression");var i=n.input.charAt(n.pos);if(O.test(i)&&n.raise(r,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++n.pos}var o=this.input.slice(r,this.pos);++this.pos;var a=this.readWord1(),s=o,u="";if(a){var c=/^[gim]*$/;this.options.ecmaVersion>=6&&(c=/^[gimuy]*$/),c.test(a)||this.raise(r,"Invalid regular expression flag"),a.indexOf("u")>=0&&(de?u="u":(s=s.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t,i){return t=Number("0x"+t),t>1114111&&n.raise(r+i+3,"Code point out of bounds"),"x"}),s=s.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"),u=u.replace("u","")))}var l=null;return fe||(d(s,u,r,this),l=d(o,a)),this.finishToken(F.regexp,{pattern:o,flags:a,value:l})},pe.readInt=function(e,t){for(var n=this,r=this.pos,i=0,o=0,a=null==t?1/0:t;o=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0,s>=e)break;++n.pos,i=i*e+s}return this.pos===r||null!=t&&this.pos-r!==t?null:i},pe.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(F.num,t)},pe.readNumber=function(e){var t=this.pos,r=!1,i=48===this.input.charCodeAt(this.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number"),i&&this.pos==t+1&&(i=!1);var o=this.input.charCodeAt(this.pos);46!==o||i||(++this.pos,this.readInt(10),r=!0,o=this.input.charCodeAt(this.pos)),69!==o&&101!==o||i||(o=this.input.charCodeAt(++this.pos),43!==o&&45!==o||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),r=!0),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a,s=this.input.slice(t,this.pos);return r?a=parseFloat(s):i&&1!==s.length?/[89]/.test(s)||this.strict?this.raise(t,"Invalid number"):a=parseInt(s,8):a=parseInt(s,10),this.finishToken(F.num,a)},pe.readCodePoint=function(){var e,t=this.input.charCodeAt(this.pos);if(123===t){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.raise(n,"Code point out of bounds")}else e=this.readHexChar(4);return e},pe.readString=function(e){for(var t=this,n="",r=++this.pos;;){t.pos>=t.input.length&&t.raise(t.start,"Unterminated string constant");var i=t.input.charCodeAt(t.pos);if(i===e)break;92===i?(n+=t.input.slice(r,t.pos),n+=t.readEscapedChar(!1),r=t.pos):(a(i)&&t.raise(t.start,"Unterminated string constant"),++t.pos)}return n+=this.input.slice(r,this.pos++),this.finishToken(F.string,n)},pe.readTmplToken=function(){for(var e=this,t="",n=this.pos;;){e.pos>=e.input.length&&e.raise(e.start,"Unterminated template");var r=e.input.charCodeAt(e.pos);if(96===r||36===r&&123===e.input.charCodeAt(e.pos+1))return e.pos===e.start&&e.type===F.template?36===r?(e.pos+=2,e.finishToken(F.dollarBraceL)):(++e.pos,e.finishToken(F.backQuote)):(t+=e.input.slice(n,e.pos),e.finishToken(F.template,t));if(92===r)t+=e.input.slice(n,e.pos),t+=e.readEscapedChar(!0),n=e.pos;else if(a(r)){switch(t+=e.input.slice(n,e.pos),++e.pos,r){case 13:10===e.input.charCodeAt(e.pos)&&++e.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(r)}e.options.locations&&(++e.curLine,e.lineStart=e.pos),n=e.pos}else++e.pos}},pe.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return h(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);return r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),"0"!==n&&(this.strict||e)&&this.raise(this.pos-2,"Octal literal in strict mode"),this.pos+=n.length-1,String.fromCharCode(r)}return String.fromCharCode(t)}},pe.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.raise(t,"Bad character escape sequence"),n},pe.readWord1=function(){var e=this;this.containsEsc=!1;for(var t="",i=!0,o=this.pos,a=this.options.ecmaVersion>=6;this.pos0)){for(i.trailingComments.length>0?i.trailingComments[0].range[0]>=e.range[1]?(n=i.trailingComments,i.trailingComments=[]):i.trailingComments.length=0:i.bottomRightStack.length>0&&i.bottomRightStack[i.bottomRightStack.length-1].trailingComments&&i.bottomRightStack[i.bottomRightStack.length-1].trailingComments[0].range[0]>=e.range[1]&&(n=i.bottomRightStack[i.bottomRightStack.length-1].trailingComments,delete i.bottomRightStack[i.bottomRightStack.length-1].trailingComments);i.bottomRightStack.length>0&&i.bottomRightStack[i.bottomRightStack.length-1].range[0]>=e.range[0];)t=i.bottomRightStack.pop();if(t){if(t.leadingComments)if(t.leadingComments[t.leadingComments.length-1].range[1]<=e.range[0])e.leadingComments=t.leadingComments,delete t.leadingComments;else for(o=t.leadingComments.length-2;o>=0;--o)if(t.leadingComments[o].range[1]<=e.range[0]){e.leadingComments=t.leadingComments.splice(0,o+1);break}}else if(i.leadingComments.length>0)if(i.leadingComments[i.leadingComments.length-1].range[1]<=e.range[0]){if(i.previousNode)for(a=0;a0&&(e.leadingComments=i.leadingComments,i.leadingComments=[])}else{for(o=0;oe.range[0]);o++);e.leadingComments=i.leadingComments.slice(0,o),0===e.leadingComments.length&&delete e.leadingComments,n=i.leadingComments.slice(o),0===n.length&&(n=null)}i.previousNode=e,n&&(e.trailingComments=n),i.bottomRightStack.push(e)}}}},{"./ast-node-types":4}],6:[function(e,t,n){"use strict";function r(e,t){var n=e[0],r=e[e.length-1],i={type:o.Template,value:t.slice(n.start,r.end)};return n.loc&&(i.loc={start:n.loc.start,end:r.loc.end}),n.range&&(i.range=[n.range[0],r.range[1]]),i}function i(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}var o={Boolean:"Boolean",EOF:"",Identifier:"Identifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};i.prototype={constructor:i,translate:function(e,t){var n=e.type,r=this._acornTokTypes;if(n===r.name)e.type=o.Identifier, "static"===e.value&&(e.type=o.Keyword),t.ecmaVersion>5&&("yield"===e.value||"let"===e.value)&&(e.type=o.Keyword);else if(n===r.semi||n===r.comma||n===r.parenL||n===r.parenR||n===r.braceL||n===r.braceR||n===r.dot||n===r.bracketL||n===r.colon||n===r.question||n===r.bracketR||n===r.ellipsis||n===r.arrow||n===r.jsxTagStart||n===r.incDec||n===r.starstar||n===r.jsxTagEnd||n===r.prefix||n.binop&&!n.keyword||n.isAssign)e.type=o.Punctuator,e.value=this._code.slice(e.start,e.end);else if(n===r.jsxName)e.type=o.JSXIdentifier;else if("jsxText"===n.label||n===r.jsxAttrValueToken)e.type=o.JSXText;else if(n.keyword)"true"===n.keyword||"false"===n.keyword?e.type=o.Boolean:"null"===n.keyword?e.type=o.Null:e.type=o.Keyword;else if(n===r.num)e.type=o.Numeric,e.value=this._code.slice(e.start,e.end);else if(n===r.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=o.JSXText):e.type=o.String,e.value=this._code.slice(e.start,e.end);else if(n===r.regexp){e.type=o.RegularExpression;var i=e.value;e.regex={flags:i.flags,pattern:i.pattern},e.value="/"+i.pattern+"/"+i.flags}return e},onToken:function(e,t){function n(){a.push(r(i._tokens,i._code)),i._tokens=[]}var i=this,o=this._acornTokTypes,a=t.tokens,s=this._tokens;return e.type===o.eof?void(this._curlyBrace&&a.push(this.translate(this._curlyBrace,t))):e.type===o.backQuote?(this._curlyBrace&&(a.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(e),void(s.length>1&&n())):e.type===o.dollarBraceL?(s.push(e),void n()):e.type===o.braceR?(this._curlyBrace&&a.push(this.translate(this._curlyBrace,t)),void(this._curlyBrace=e)):e.type===o.template?(this._curlyBrace&&(s.push(this._curlyBrace),this._curlyBrace=null),void s.push(e)):(this._curlyBrace&&(a.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),void a.push(this.translate(e,t)))}},t.exports=i},{}],7:[function(e,t,n){"use strict";t.exports={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"],JSXIdentifier:[],JSXNamespacedName:["namespace","name"],JSXMemberExpression:["object","property"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXElement:["openingElement","closingElement","children"],JSXClosingElement:["name"],JSXOpeningElement:["name","attributes"],JSXAttribute:["name","value"],JSXText:null,JSXSpreadAttribute:["argument"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"]}},{}],8:[function(e,t,n){t.exports={_args:[[{raw:"espree@^3.4.3",scope:null,escapedName:"espree",name:"espree",rawSpec:"^3.4.3",spec:">=3.4.3 <4.0.0",type:"range"},"C:\\eslintgithub\\eslint"]],_from:"espree@>=3.4.3 <4.0.0",_id:"espree@3.4.3",_inCache:!0,_location:"/espree",_nodeVersion:"4.4.7",_npmOperationalInternal:{host:"packages-18-east.internal.npmjs.com",tmp:"tmp/espree-3.4.3.tgz_1494016113798_0.18147883261553943"},_npmUser:{name:"eslint",email:"nicholas+eslint@nczconsulting.com"},_npmVersion:"2.15.8",_phantomChildren:{},_requested:{raw:"espree@^3.4.3",scope:null,escapedName:"espree",name:"espree",rawSpec:"^3.4.3",spec:">=3.4.3 <4.0.0",type:"range"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/espree/-/espree-3.4.3.tgz",_shasum:"2910b5ccd49ce893c2ffffaab4fd8b3a31b82374",_shrinkwrap:null,_spec:"espree@^3.4.3",_where:"C:\\eslintgithub\\eslint",author:{name:"Nicholas C. Zakas",email:"nicholas+npm@nczconsulting.com"},bugs:{url:"http://github.com/eslint/espree.git"},dependencies:{acorn:"^5.0.1","acorn-jsx":"^3.0.0"},description:"An Esprima-compatible JavaScript parser built on Acorn",devDependencies:{browserify:"^7.0.0",chai:"^1.10.0",eslint:"^2.13.1","eslint-config-eslint":"^3.0.0","eslint-release":"^0.10.0",esprima:"latest","esprima-fb":"^8001.2001.0-dev-harmony-fb",istanbul:"~0.2.6","json-diff":"~0.3.1",leche:"^1.0.1",mocha:"^2.0.1",regenerate:"~0.5.4",shelljs:"^0.3.0","shelljs-nodecli":"^0.1.1","unicode-6.3.0":"~0.1.0"},directories:{},dist:{shasum:"2910b5ccd49ce893c2ffffaab4fd8b3a31b82374",tarball:"https://registry.npmjs.org/espree/-/espree-3.4.3.tgz"},engines:{node:">=0.10.0"},files:["lib","espree.js"],gitHead:"ea086113d26c40b91647b2184e5e8aa9190db654",homepage:"https://github.com/eslint/espree",keywords:["ast","ecmascript","javascript","parser","syntax","acorn"],license:"BSD-2-Clause",main:"espree.js",maintainers:[{name:"btmills",email:"mills.brandont@gmail.com"},{name:"eslint",email:"nicholas+eslint@nczconsulting.com"},{name:"gyandeeps",email:"gyandeeps@gmail.com"},{name:"ivolodin",email:"ivolodin@gmail.com"},{name:"kaicataldo",email:"kaicataldo@gmail.com"},{name:"mysticatea",email:"star.ctor@gmail.com"},{name:"not-an-aardvark",email:"notaardvark@gmail.com"},{name:"nzakas",email:"nicholas@nczconsulting.com"},{name:"sharpbites",email:"alberto.email@gmail.com"}],name:"espree",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/eslint/espree.git"},scripts:{alpharelease:"eslint-prelease alpha",betarelease:"eslint-prelease beta",browserify:"node Makefile.js browserify","ci-release":"eslint-ci-release","generate-regex":"node tools/generate-identifier-regex.js","gh-release":"eslint-gh-release",lint:"node Makefile.js lint",release:"eslint-release",test:"npm run-script lint && node Makefile.js test"},version:"3.4.3"}},{}],espree:[function(e,t,n){"use strict";function r(){d={tokens:null,range:!1,loc:!1,comment:!1,comments:[],tolerant:!1,errors:[],strict:!1,ecmaFeatures:{},ecmaVersion:_,isModule:!1}}function i(e){if("number"!=typeof e)return _;var t=e;switch(t>=2015&&(t-=2009),t){case 3:case 5:case 6:case 7:case 8:return t;default:throw new Error("Invalid ecmaVersion.")}}function o(e){var t=d.ecmaFeatures;switch(e.type){case"ExperimentalSpreadProperty":case"ExperimentalRestProperty":return t.experimentalObjectRestSpread;case"ImportDeclaration":case"ExportNamedDeclaration":case"ExportDefaultDeclaration":case"ExportAllDeclaration":return d.isModule;default:return!0}}function a(e){if(o(e)||this.unexpected(e.start),"TryStatement"===e.type?delete e.guardedHandlers:"CatchClause"===e.type&&delete e.guard,"TemplateElement"===e.type){var t="${"===this.input.slice(e.end,e.end+2);e.range&&(e.range[0]--,e.range[1]+=t?2:1),e.loc&&(e.loc.start.column--,e.loc.end.column+=t?2:1)}return"Literal"===e.type&&void 0===e.value&&(e.value=null),d.attachComment&&g.processComment(e),e.type.indexOf("Function")>-1&&!e.generator&&(e.generator=!1),e}function s(e){var t=d.ecmaFeatures,n=e.type;switch(n){case E.jsxName:case E.jsxText:case E.jsxTagStart:case E.jsxTagEnd:return t.jsx;case E.regexp:return!(d.ecmaVersion<6&&e.value.flags&&e.value.flags.indexOf("y")>-1);default:return!0}}function u(e){return function(t,n,r,i){var o=e.call(this,t,n,r,i);return a.call(this,o)}}function c(e,t){var n,o,a,s=new v(E,e);n=String,"string"==typeof e||e instanceof String||(e=n(e)),f=null,t=w({},t);var u={ecmaVersion:_,plugins:{espree:!0}};r(),t.tokens=!0,d.tokens=[],d.range="boolean"==typeof t.range&&t.range,u.ranges=d.range,d.loc="boolean"==typeof t.loc&&t.loc,u.locations=d.loc,d.comment="boolean"==typeof t.comment&&t.comment,d.comment&&(u.onComment=function(){var e=l.apply(this,arguments);d.comments.push(e)}),d.tolerant="boolean"==typeof t.tolerant&&t.tolerant,u.ecmaVersion=d.ecmaVersion=i(t.ecmaVersion),t.ecmaFeatures&&"object"==typeof t.ecmaFeatures&&(d.ecmaFeatures=w({},t.ecmaFeatures),a=d.ecmaFeatures.impliedStrict,d.ecmaFeatures.impliedStrict="boolean"==typeof a&&a);try{for(var c=b.tokenizer(e,u);(f=c.getToken()).type!==E.eof;)s.onToken(f,d);o=d.tokens,d.comment&&(o.comments=d.comments),d.tolerant&&(o.errors=d.errors)}catch(e){throw e}return o}function l(e,t,n,r,i,o){var a={type:e?"Block":"Line",value:t};return"number"==typeof n&&(a.start=n,a.end=r,a.range=[n,r]),"object"==typeof i&&(a.loc={start:i,end:o}),a}function p(e,t){var n,o,a,s=String,u={ecmaVersion:_,plugins:{espree:!0}};return h=null,"string"==typeof e||e instanceof String||(e=s(e)),r(),g.reset(),"undefined"!=typeof t&&(d.range="boolean"==typeof t.range&&t.range,d.loc="boolean"==typeof t.loc&&t.loc,d.attachComment="boolean"==typeof t.attachComment&&t.attachComment,d.loc&&null!==t.source&&void 0!==t.source&&(d.source=s(t.source)),"boolean"==typeof t.tokens&&t.tokens&&(d.tokens=[],o=new v(E,e)),"boolean"==typeof t.comment&&t.comment&&(d.comment=!0,d.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(d.errors=[]),d.attachComment&&(d.range=!0,d.comments=[],g.reset()),u.ecmaVersion=d.ecmaVersion=i(t.ecmaVersion),"module"===t.sourceType&&(d.isModule=!0,u.ecmaVersion<6&&(u.ecmaVersion=6,d.ecmaVersion=6),u.sourceType="module"),t.ecmaFeatures&&"object"==typeof t.ecmaFeatures&&(d.ecmaFeatures=w({},t.ecmaFeatures),a=d.ecmaFeatures.impliedStrict,d.ecmaFeatures.impliedStrict="boolean"==typeof a&&a,t.ecmaFeatures.globalReturn&&(u.allowReturnOutsideFunction=!0)),u.onToken=function(e){d.tokens&&o.onToken(e,d),e.type!==E.eof&&(h=e)},(d.attachComment||d.comment)&&(u.onComment=function(){var e=l.apply(this,arguments);d.comments.push(e),d.attachComment&&g.addComment(e)}),d.range&&(u.ranges=!0),d.loc&&(u.locations=!0),d.ecmaFeatures.jsx&&(u.plugins={jsx:!0,espree:!0})),n=b.parse(e,u),n.sourceType=d.isModule?"module":"script",(d.comment||d.attachComment)&&(n.comments=d.comments),d.tokens&&(n.tokens=d.tokens),n.range&&(n.range[0]=n.body.length?n.body[0].range[0]:n.range[0],n.range[1]=h?h.range[1]:n.range[1]),n.loc&&(n.loc.start=n.body.length?n.body[0].loc.start:n.loc.start,n.loc.end=h?h.loc.end:n.loc.end),n}var f,d,h,m=e("./lib/ast-node-types"),g=e("./lib/comment-attachment"),v=e("./lib/token-translator"),y=e("acorn-jsx/inject"),x=e("acorn"),b=y(x),_=5,w=Object.assign||function(e){for(var t=1;t=5&&(this.strict=!0),e.call(this,t)}}),e.extend("toAssignable",function(e){return function(t,n){if(d.ecmaFeatures.experimentalObjectRestSpread&&"ObjectExpression"===t.type){t.type="ObjectPattern";for(var r=0;r=6&&(l.method=!1,l.shorthand=!1,(e||t)&&(u=this.start,c=this.startLoc),e||(a=this.eat(E.star))),this.parsePropertyName(l,t),!(this.options.ecmaVersion>=8)||e||a||l.computed||"Identifier"!==l.key.type||"async"!==l.key.name||this.type===E.parenL||this.type===E.colon||this.canInsertSemicolon()?s=!1:(this.parsePropertyName(l,t),s=!0),this.parsePropertyValue(l,e,a,s,u,c,t),this.checkPropClash(l,o),n.properties.push(this.finishNode(l,"Property")))}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},e.raise=e.raiseRecoverable=function(e,t){var n=S(this.input,e),r=new SyntaxError(t);throw r.index=e,r.lineNumber=n.line,r.column=n.column+1,r},e.unexpected=function(e){var t="Unexpected token";if(null!==e&&void 0!==e){if(this.pos=e,this.options.locations)for(;this.posthis.start&&(t+=" "+this.input.slice(this.start,this.end)),this.raise(this.start,t)},e.extend("jsx_readString",function(e){return function(t){var n=e.call(this,t);return this.type===E.string&&(d.jsxAttrValueToken=!0),n}})},n.version=e("./package.json").version,n.tokenize=c,n.parse=p,n.Syntax=function(){var e,t={};"function"==typeof Object.create&&(t=Object.create(null));for(e in m)m.hasOwnProperty(e)&&(t[e]=m[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}(),n.VisitorKeys=function(){var t,n=e("./lib/visitor-keys"),r={};"function"==typeof Object.create&&(r=Object.create(null));for(t in n)n.hasOwnProperty(t)&&(r[t]=n[t]);return"function"==typeof Object.freeze&&Object.freeze(r),r}()},{"./lib/ast-node-types":4,"./lib/comment-attachment":5,"./lib/token-translator":6,"./lib/visitor-keys":7,"./package.json":8,acorn:3,"acorn-jsx/inject":1}]},{},[]),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.eslint=e()}}(function(){var t;return function t(n,r,i){function o(s,u){if(!r[s]){if(!n[s]){var c="function"==typeof e&&e;if(!u&&c)return c(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var p=r[s]={exports:{}};n[s][0].call(p.exports,function(e){var t=n[s][1][e];return o(t?t:e)},p,p.exports,t,n,r,i)}return r[s].exports}for(var a="function"==typeof e&&e,s=0;s=0;s--)if(u[s]!==c[s])return!1;for(s=u.length-1;s>=0;s--)if(a=u[s],!d(e[a],t[a],n,r))return!1;return!0}function g(e,t,n){d(e,t,!0)&&p(e,t,n,"notDeepStrictEqual",g)}function v(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&t.call({},e)===!0}function y(e){var t;try{e()}catch(e){t=e}return t}function x(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=y(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&p(i,n,"Missing expected exception"+r);var o="string"==typeof r,a=!e&&_.isError(i),s=!e&&i&&!n;if((a&&o&&v(i,n)||s)&&p(i,n,"Got unwanted exception"+r),e&&i&&n&&!v(i,n)||!e&&i)throw i}var b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_=e("util/"),w=Object.prototype.hasOwnProperty,E=Array.prototype.slice,S=function(){return"foo"===function(){}.name}(),C=t.exports=f,T=/\s*function\s+([^\(\s]*)\s*/;C.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=l(this),this.generatedMessage=!0);var t=e.stackStartFunction||p;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=s(t),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},_.inherits(C.AssertionError,Error),C.fail=p,C.ok=f,C.equal=function(e,t,n){e!=t&&p(e,t,n,"==",C.equal)},C.notEqual=function(e,t,n){e==t&&p(e,t,n,"!=",C.notEqual)},C.deepEqual=function(e,t,n){d(e,t,!1)||p(e,t,n,"deepEqual",C.deepEqual)},C.deepStrictEqual=function(e,t,n){d(e,t,!0)||p(e,t,n,"deepStrictEqual",C.deepStrictEqual)},C.notDeepEqual=function(e,t,n){d(e,t,!1)&&p(e,t,n,"notDeepEqual",C.notDeepEqual)},C.notDeepStrictEqual=g,C.strictEqual=function(e,t,n){e!==t&&p(e,t,n,"===",C.strictEqual)},C.notStrictEqual=function(e,t,n){e===t&&p(e,t,n,"!==",C.notStrictEqual)},C.throws=function(e,t,n){x(!0,e,t,n)},C.doesNotThrow=function(e,t,n){x(!1,e,t,n)},C.ifError=function(e){if(e)throw e};var D=Object.keys||function(e){var t=[];for(var n in e)w.call(e,n)&&t.push(n);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":64}],7:[function(e,t,n){(function(r){"use strict";function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r)}}function a(){return"object"===("undefined"==typeof console?"undefined":l(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?n.storage.removeItem("debug"):n.storage.debug=e}catch(e){}}function u(){var e;try{e=n.storage.debug}catch(e){}return!e&&"undefined"!=typeof r&&"env"in r&&(e=r.env.DEBUG),e}function c(){try{return window.localStorage}catch(e){}}var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n=t.exports=e("./debug"),n.log=a,n.formatArgs=o,n.save=s,n.load=u,n.useColors=i,n.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},n.enable(u())}).call(this,e("_process"))},{"./debug":8,_process:58}],8:[function(e,t,n){"use strict";function r(e){var t,r=0;for(t in e)r=(r<<5)-r+e.charCodeAt(t),r|=0;return n.colors[Math.abs(r)%n.colors.length]}function i(e){function t(){if(t.enabled){var e=t,r=+new Date,i=r-(c||r);e.diff=i,e.prev=c,e.curr=r,c=r;for(var o=new Array(arguments.length),a=0;a=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}function o(e){return"param"===e||"argument"===e||"arg"===e}function a(e){return"return"===e||"returns"===e}function s(e){return"property"===e||"prop"===e}function u(e){return o(e)||s(e)||"alias"===e||"this"===e||"mixes"===e||"requires"===e}function c(e){return u(e)||"const"===e||"constant"===e}function l(e){return s(e)||o(e)}function p(e){return s(e)||o(e)}function f(e){return o(e)||a(e)||"define"===e||"enum"===e||"implements"===e||"this"===e||"type"===e||"typedef"===e||s(e)}function d(e){return f(e)||"throws"===e||"const"===e||"constant"===e||"namespace"===e||"member"===e||"var"===e||"module"===e||"constructor"===e||"class"===e||"extends"===e||"augments"===e||"public"===e||"private"===e||"protected"===e}function h(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")}function m(e){var t,n,r,i,o,a=0,s=1,u=2;for(e=e.replace(/^\/\*\*?/,"").replace(/\*\/$/,""),t=0,n=e.length,r=a,i="";t=e)return null;if(t&&91===N.charCodeAt(I)&&(i=!0,a=n()),!b.code.isIdentifierStartES5(N.charCodeAt(I)))return null;if(a+=w(e),r)for(58!==N.charCodeAt(I)||"module"!==a&&"external"!==a&&"event"!==a||(a+=n(),a+=w(e)),91===N.charCodeAt(I)&&93===N.charCodeAt(I+1)&&(a+=n(),a+=n());46===N.charCodeAt(I)||47===N.charCodeAt(I)||35===N.charCodeAt(I)||45===N.charCodeAt(I)||126===N.charCodeAt(I);)a+=n(),a+=w(e);if(i){if(E(e),61===N.charCodeAt(I)){a+=n(),E(e);for(var s,u=1;I=e||93!==N.charCodeAt(I))return null;a+=n()}return a}function C(){for(;I=O)&&(v.assert(64===N.charCodeAt(I)),!0)}function T(e,t){this._options=e,this._title=t.toLowerCase(),this._tag={title:t,description:null},this._options.lineNumbers&&(this._tag.lineNumber=F),this._last=0,this._extra={}}function D(e){var t,i,o;if(!C())return null;for(t=r(),i=new T(e,t),o=i.parse();I",r="",i=e.indexOf(n),o=e.indexOf(r);return i>=0&&o>=0?(this._tag.caption=h(e.substring(i+n.length,o)),this._tag.description=h(e.substring(o+r.length))):this._tag.description=e,!0},T.prototype.parseKind=function(){var e,n;return n={class:!0,constant:!0,event:!0,external:!0,file:!0,function:!0,member:!0,mixin:!0,module:!0,namespace:!0,typedef:!0},e=h(t(N,I,this._last)),this._tag.kind=e,!(!_(n,e)&&!this.addError("Invalid kind name '%0'",e))},T.prototype.parseAccess=function(){var e;return e=h(t(N,I,this._last)),this._tag.access=e,!("private"!==e&&"protected"!==e&&"public"!==e&&!this.addError("Invalid access name '%0'",e))},T.prototype.parseThis=function(){var e=h(t(N,I,this._last));if(e&&"{"===e.charAt(0)){var n=this.parseType();return n&&"NameExpression"===this._tag.type.type?(this._tag.name=this._tag.type.name,!0):this.addError("Invalid name for this")}return this.parseNamePath()},T.prototype.parseVariation=function(){var e,n;return n=h(t(N,I,this._last)),e=parseFloat(n,10),this._tag.variation=e,!(isNaN(e)&&!this.addError("Invalid variation '%0'",n))},T.prototype.ensureEnd=function(){var e=h(t(N,I,this._last));return!(e&&!this.addError("Unknown content '%0'",e))},T.prototype.epilogue=function(){var e;return e=this._tag.description,!(p(this._title)&&!this._tag.type&&e&&"["===e.charAt(0)&&(this._tag.type=this._extra.name,this._tag.name||(this._tag.name=void 0),!R&&!this.addError("Missing or invalid tag name")))},k={access:["parseAccess"],alias:["parseNamePath","ensureEnd"],augments:["parseType","parseNamePathOptional","ensureEnd"],constructor:["parseType","parseNamePathOptional","ensureEnd"],class:["parseType","parseNamePathOptional","ensureEnd"],extends:["parseType","parseNamePathOptional","ensureEnd"],example:["parseCaption"],deprecated:["parseDescription"],global:["ensureEnd"],inner:["ensureEnd"],instance:["ensureEnd"],kind:["parseKind"],mixes:["parseNamePath","ensureEnd"],mixin:["parseNamePathOptional","ensureEnd"],member:["parseType","parseNamePathOptional","ensureEnd"],method:["parseNamePathOptional","ensureEnd"],module:["parseType","parseNamePathOptional","ensureEnd"],func:["parseNamePathOptional","ensureEnd"],function:["parseNamePathOptional","ensureEnd"],var:["parseType","parseNamePathOptional","ensureEnd"],name:["parseNamePath","ensureEnd"],namespace:["parseType","parseNamePathOptional","ensureEnd"],private:["parseType","parseDescription"],protected:["parseType","parseDescription"],public:["parseType","parseDescription"],readonly:["ensureEnd"],requires:["parseNamePath","ensureEnd"],since:["parseDescription"],static:["ensureEnd"],summary:["parseDescription"],this:["parseThis","ensureEnd"],todo:["parseDescription"],typedef:["parseType","parseNamePathOptional"],variation:["parseVariation"],version:["parseDescription"]},T.prototype.parse=function(){var e,t,n,r;if(!this._title&&!this.addError("Missing or invalid title"))return null;for(this._last=s(this._title),n=_(k,this._title)?k[this._title]:["parseType","parseName","parseDescription","epilogue"],e=0,t=n.length;e<(){}[],:*|?!=".indexOf(String.fromCharCode(e))===-1&&!B.code.isWhiteSpace(e)&&!B.code.isLineTerminator(e)}function r(e,t,n,r){this._previous=e,this._index=t,this._token=n,this._value=r}function i(){var e=O.charAt(j);return j+=1,e}function o(e){var t,n,r,o=0;for(n="u"===e?4:2,t=0;t=0&&j=N)return F.ILLEGAL;if(n=O.charCodeAt(j+1),60===n)break}M+=i()}return F.NAME}function c(){var e;for(R=j;j=N)return L=F.EOF;switch(e=O.charCodeAt(j)){case 39:case 34:return L=a();case 58:return i(),L=F.COLON;case 44:return i(),L=F.COMMA;case 40:return i(),L=F.LPAREN;case 41:return i(),L=F.RPAREN;case 91:return i(),L=F.LBRACK;case 93:return i(),L=F.RBRACK;case 123:return i(),L=F.LBRACE;case 125:return i(),L=F.RBRACE;case 46:if(j+1=2.0.0 <3.0.0",type:"range"},"C:\\eslintgithub\\eslint"]],_from:"doctrine@>=2.0.0 <3.0.0",_id:"doctrine@2.0.0",_inCache:!0,_location:"/doctrine",_nodeVersion:"4.4.2",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/doctrine-2.0.0.tgz_1479232728285_0.34204454137943685"},_npmUser:{name:"nzakas",email:"nicholas@nczconsulting.com"},_npmVersion:"2.15.0",_phantomChildren:{},_requested:{raw:"doctrine@^2.0.0",scope:null,escapedName:"doctrine",name:"doctrine",rawSpec:"^2.0.0",spec:">=2.0.0 <3.0.0",type:"range"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz",_shasum:"c73d8d2909d22291e1a007a395804da8b665fe63",_shrinkwrap:null,_spec:"doctrine@^2.0.0",_where:"C:\\eslintgithub\\eslint",bugs:{url:"https://github.com/eslint/doctrine/issues"},dependencies:{esutils:"^2.0.2",isarray:"^1.0.0"},description:"JSDoc parser",devDependencies:{coveralls:"^2.11.2",dateformat:"^1.0.11",eslint:"^1.10.3","eslint-release":"^0.10.0",istanbul:"^0.4.1",linefix:"^0.1.1",mocha:"^2.3.3","npm-license":"^0.3.1",semver:"^5.0.3",shelljs:"^0.5.3","shelljs-nodecli":"^0.1.1",should:"^5.0.1"},directories:{lib:"./lib"},dist:{shasum:"c73d8d2909d22291e1a007a395804da8b665fe63",tarball:"https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz"},engines:{node:">=0.10.0"},files:["lib","LICENSE.BSD","LICENSE.closure-compiler","LICENSE.esprima","README.md"],gitHead:"46c600f27f54b3ab6b0b8a9ac9f97c807ffa95ef",homepage:"https://github.com/eslint/doctrine",license:"Apache-2.0",main:"lib/doctrine.js",maintainers:[{name:"constellation",email:"utatane.tea@gmail.com"},{name:"eslint",email:"nicholas+eslint@nczconsulting.com"},{name:"nzakas",email:"nicholas@nczconsulting.com"}],name:"doctrine",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/eslint/doctrine.git"},scripts:{alpharelease:"eslint-prerelease alpha",betarelease:"eslint-prerelease beta","ci-release":"eslint-ci-release",lint:"eslint lib/",release:"eslint-release",test:"npm run lint && node Makefile.js test"},version:"2.0.0"}},{}],13:[function(e,t,n){"use strict";function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=e("./variable"),s=function e(t,n,r,i,a,s){o(this,e),this.type=t,this.name=n,this.node=r,this.parent=i,this.index=a,this.kind=s},u=function(e){function t(e,n,i,s){o(this,t);var u=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a.Parameter,e,n,null,i,null));return u.rest=s,u}return i(t,e),t}(s);t.exports={ParameterDefinition:u,Definition:s}},{"./variable":20}],14:[function(e,t,n){"use strict";function r(){return{optimistic:!1,directive:!1,nodejsScope:!1,impliedStrict:!1,sourceType:"script",ecmaVersion:5,childVisitorKeys:null,fallback:"iteration"}}function i(e,t){function n(e){return"object"===("undefined"==typeof e?"undefined":a(e))&&e instanceof Object&&!(e instanceof Array)&&!(e instanceof RegExp)}for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];n(o)?n(e[r])?i(e[r],o):e[r]=i({},o):e[r]=o}return e}function o(e,t){var n=i(r(),t),o=new u(n),a=new c(n,o);return a.visit(e),s(null===o.__currentScope,"currentScope should be null."),o}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=e("assert"),u=e("./scope-manager"),c=e("./referencer"),l=e("./reference"),p=e("./variable"),f=e("./scope").Scope,d=e("../package.json").version;t.exports={version:d,Reference:l,Variable:p,Scope:f,ScopeManager:u,analyze:o}},{"../package.json":21,"./reference":16,"./referencer":17,"./scope":19,"./scope-manager":18,"./variable":20,assert:6}],15:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){return e[e.length-1]||null}var s=function(){function e(e,t){for(var n=0;n=5}},{key:"__get",value:function(e){return this.__nodeToScope.get(e)}},{key:"getDeclaredVariables",value:function(e){return this.__declaredVariables.get(e)||[]}},{key:"acquire",value:function(e,t){function n(e){return("function"!==e.type||!e.functionExpressionScope)&&"TDZ"!==e.type}var r=this.__get(e);if(!r||0===r.length)return null;if(1===r.length)return r[0];if(t)for(var i=r.length-1;i>=0;--i){var o=r[i];if(n(o))return o}else for(var a=0,s=r.length;a=6}}]),e}();t.exports=y},{"./scope":19,assert:6}],19:[function(e,t,n){"use strict";function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n,r){var i=void 0;if(e.upper&&e.upper.isStrict)return!0;if(t.type===p.ArrowFunctionExpression)return!0;if(n)return!0;if("class"===e.type||"module"===e.type)return!0;if("block"===e.type||"switch"===e.type)return!1;if("function"===e.type){if(i=t.type===p.Program?t:t.body,!i)return!1}else{if("global"!==e.type)return!1;i=t}if(r)for(var o=0,a=i.body.length;o0&&r.every(u)}},{key:"__staticCloseRef",value:function(e){this.__resolve(e)||this.__delegateToUpperScope(e)}},{key:"__dynamicCloseRef",value:function(e){var t=this;do t.through.push(e),t=t.upper;while(t)}},{key:"__globalCloseRef",value:function(e){this.__shouldStaticallyCloseForGlobal(e)?this.__staticCloseRef(e):this.__dynamicCloseRef(e)}},{key:"__close",value:function(e){var t=void 0;t=this.__shouldStaticallyClose(e)?this.__staticCloseRef:"global"!==this.type?this.__dynamicCloseRef:this.__globalCloseRef;for(var n=0,r=this.__left.length;n=3.7.1 <4.0.0",type:"range"},"C:\\eslintgithub\\eslint"]],_from:"eslint-scope@>=3.7.1 <4.0.0",_id:"eslint-scope@3.7.1",_inCache:!0,_location:"/eslint-scope",_nodeVersion:"4.3.1",_npmOperationalInternal:{host:"packages-18-east.internal.npmjs.com",tmp:"tmp/eslint-scope-3.7.1.tgz_1492031610481_0.544424896594137"},_npmUser:{name:"ivolodin",email:"ivolodin@gmail.com"},_npmVersion:"2.14.12",_phantomChildren:{},_requested:{raw:"eslint-scope@^3.7.1",scope:null,escapedName:"eslint-scope",name:"eslint-scope",rawSpec:"^3.7.1",spec:">=3.7.1 <4.0.0",type:"range"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz",_shasum:"3d63c3edfda02e06e01a452ad88caacc7cdcb6e8",_shrinkwrap:null,_spec:"eslint-scope@^3.7.1",_where:"C:\\eslintgithub\\eslint",bugs:{url:"https://github.com/eslint/eslint-scope/issues"},dependencies:{esrecurse:"^4.1.0",estraverse:"^4.1.1"},description:"ECMAScript scope analyzer for ESLint",devDependencies:{chai:"^3.4.1",eslint:"^3.15.0","eslint-config-eslint":"^4.0.0","eslint-release":"^0.10.1",espree:"^3.1.1",istanbul:"^0.4.5",mocha:"^3.2.0","npm-license":"^0.3.3",shelljs:"^0.7.6",typescript:"~2.0.10","typescript-eslint-parser":"^1.0.0"},directories:{},dist:{shasum:"3d63c3edfda02e06e01a452ad88caacc7cdcb6e8",tarball:"https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz"},engines:{node:">=4.0.0"},files:["LICENSE","README.md","lib"],gitHead:"bec1febf351ae7137a62241c18eb78876ee4fb7f",homepage:"http://github.com/eslint/eslint-scope",license:"BSD-2-Clause",main:"lib/index.js",maintainers:[{name:"eslint",email:"nicholas+eslint@nczconsulting.com"},{name:"ivolodin",email:"ivolodin@gmail.com"},{name:"nzakas",email:"nicholas@nczconsulting.com"}],name:"eslint-scope",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/eslint/eslint-scope.git"},scripts:{alpharelease:"eslint-prerelease alpha",betarelease:"eslint-prerelease beta","ci-release":"eslint-ci-release","gh-release":"eslint-gh-release",lint:"node Makefile.js lint",release:"eslint-release",test:"node Makefile.js test"},version:"3.7.1"}},{}],22:[function(e,n,r){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){function r(){function e(e,t){var n,r=t.split(".");for(n=0;n":return g>a.value.value;case">=":return g>=a.value.value}case"sibling":return n(o,a.right,s)&&r(o,a.left,s,u)||a.left.subject&&n(o,a.left,s)&&r(o,a.right,s,c);case"adjacent":return n(o,a.right,s)&&p(o,a.left,s,u)||a.right.subject&&n(o,a.left,s)&&p(o,a.right,s,c);case"nth-child":return n(o,a.right,s)&&f(o,s,function(e){return a.index.value-1});case"nth-last-child":return n(o,a.right,s)&&f(o,s,function(e){return e-a.index.value});case"class":if(!o.type)return!1;switch(a.name.toLowerCase()){case"statement":if("Statement"===o.type.slice(-9))return!0;case"declaration":return"Declaration"===o.type.slice(-11);case"pattern":if("Pattern"===o.type.slice(-7))return!0;case"expression":return"Expression"===o.type.slice(-10)||"Literal"===o.type||"Identifier"===o.type;case"function":return"Function"===o.type.slice(0,8)||"ArrowFunctionExpression"===o.type}throw new Error("Unknown class name: "+a.name)}throw new Error("Unknown selector type: "+a.type)}function r(e,t,r,i){var a,c,l,p,f,d,h,m,g=r[0];if(!g)return!1;for(l=o.VisitorKeys[g.type],p=0,f=l.length;p0&&n(a[d-1],t,r))return!0;if(i===c&&d=0&&c===n(r.length)))return!0;return!1}function d(e,t){var n,r;if(null==e||"object"!=("undefined"==typeof e?"undefined":i(e)))return[];null==t&&(t=e),n=e.subject?[t]:[];for(r in e)({}).hasOwnProperty.call(e,r)&&[].push.apply(n,d(e[r],"left"===r?e[r]:t));return n}function h(e,t){var r,i,a,s,u,c=[],l=[];return t?(r=d(t),o.traverse(e,{enter:function(e,o){if(null!=o&&c.unshift(o),n(e,t,c))if(r.length)for(i=0,a=r.length;iU&&(U=M,V=[]),V.push(e))}function i(){var e="start@"+M,t=G[e];if(t)return M=t.nextPos,t.result;var n,r,i,a,s;return a=M,s=M,n=o(),null!==n?(r=u(),null!==r?(i=o(),null!==i?n=[n,r,i]:(n=null,M=s)):(n=null,M=s)):(n=null,M=s),null!==n&&(n=function(e,t){return 1===t.length?t[0]:{type:"matches",selectors:t}}(a,n[1])),null===n&&(M=a),null===n&&(a=M,n=o(),null!==n&&(n=function(e){}(a)),null===n&&(M=a)),G[e]={nextPos:M,result:n},n}function o(){var e="_@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,o;for(i=[],32===t.charCodeAt(M)?(o=" ",M++):(o=null,0===B&&r('" "'));null!==o;)i.push(o),32===t.charCodeAt(M)?(o=" ",M++):(o=null,0===B&&r('" "'));return G[e]={nextPos:M,result:i},i}function a(){var e="identifierName@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,o,a;if(a=M,/^[^ [\],():#!=><~+.]/.test(t.charAt(M))?(o=t.charAt(M),M++):(o=null,0===B&&r("[^ [\\],():#!=><~+.]")),null!==o)for(i=[];null!==o;)i.push(o),/^[^ [\],():#!=><~+.]/.test(t.charAt(M))?(o=t.charAt(M),M++):(o=null,0===B&&r("[^ [\\],():#!=><~+.]"));else i=null;return null!==i&&(i=function(e,t){return t.join("")}(a,i)),null===i&&(M=a),G[e]={nextPos:M,result:i},i}function s(){var e="binaryOp@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,a,s,u,c;return u=M,c=M,i=o(),null!==i?(62===t.charCodeAt(M)?(a=">",M++):(a=null,0===B&&r('">"')),null!==a?(s=o(),null!==s?i=[i,a,s]:(i=null,M=c)):(i=null,M=c)):(i=null,M=c),null!==i&&(i=function(e){return"child"}(u)),null===i&&(M=u),null===i&&(u=M,c=M,i=o(),null!==i?(126===t.charCodeAt(M)?(a="~",M++):(a=null,0===B&&r('"~"')),null!==a?(s=o(),null!==s?i=[i,a,s]:(i=null,M=c)):(i=null,M=c)):(i=null,M=c),null!==i&&(i=function(e){return"sibling"}(u)),null===i&&(M=u),null===i&&(u=M,c=M,i=o(),null!==i?(43===t.charCodeAt(M)?(a="+",M++):(a=null,0===B&&r('"+"')),null!==a?(s=o(),null!==s?i=[i,a,s]:(i=null,M=c)):(i=null,M=c)):(i=null,M=c),null!==i&&(i=function(e){return"adjacent"}(u)),null===i&&(M=u),null===i&&(u=M,c=M,32===t.charCodeAt(M)?(i=" ",M++):(i=null,0===B&&r('" "')),null!==i?(a=o(),null!==a?i=[i,a]:(i=null,M=c)):(i=null,M=c),null!==i&&(i=function(e){return"descendant"}(u)),null===i&&(M=u)))),G[e]={nextPos:M,result:i},i}function u(){var e="selectors@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,a,s,u,l,p,f,d,h;if(f=M,d=M,i=c(),null!==i){for(a=[],h=M,s=o(),null!==s?(44===t.charCodeAt(M)?(u=",",M++):(u=null,0===B&&r('","')),null!==u?(l=o(),null!==l?(p=c(),null!==p?s=[s,u,l,p]:(s=null,M=h)):(s=null,M=h)):(s=null,M=h)):(s=null,M=h);null!==s;)a.push(s),h=M,s=o(),null!==s?(44===t.charCodeAt(M)?(u=",",M++):(u=null,0===B&&r('","')),null!==u?(l=o(),null!==l?(p=c(),null!==p?s=[s,u,l,p]:(s=null,M=h)):(s=null,M=h)):(s=null,M=h)):(s=null,M=h);null!==a?i=[i,a]:(i=null,M=d)}else i=null,M=d;return null!==i&&(i=function(e,t,n){return[t].concat(n.map(function(e){return e[3]}))}(f,i[0],i[1])),null===i&&(M=f),G[e]={nextPos:M,result:i},i}function c(){var e="selector@"+M,t=G[e];if(t)return M=t.nextPos,t.result;var n,r,i,o,a,u,c;if(a=M,u=M,n=l(),null!==n){for(r=[],c=M,i=s(),null!==i?(o=l(),null!==o?i=[i,o]:(i=null,M=c)):(i=null,M=c);null!==i;)r.push(i),c=M,i=s(),null!==i?(o=l(),null!==o?i=[i,o]:(i=null,M=c)):(i=null,M=c);null!==r?n=[n,r]:(n=null,M=u)}else n=null,M=u;return null!==n&&(n=function(e,t,n){return n.reduce(function(e,t){return{type:t[0],left:e,right:t[1]}},t)}(a,n[0],n[1])),null===n&&(M=a),G[e]={nextPos:M,result:n},n}function l(){var e="sequence@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,o,a,s,u;if(s=M,u=M,33===t.charCodeAt(M)?(i="!",M++):(i=null,0===B&&r('"!"')),i=null!==i?i:"",null!==i){if(a=p(),null!==a)for(o=[];null!==a;)o.push(a),a=p();else o=null;null!==o?i=[i,o]:(i=null,M=u)}else i=null,M=u;return null!==i&&(i=function(e,t,n){var r=1===n.length?n[0]:{type:"compound",selectors:n};return t&&(r.subject=!0),r}(s,i[0],i[1])),null===i&&(M=s),G[e]={nextPos:M,result:i},i}function p(){var e="atom@"+M,t=G[e];if(t)return M=t.nextPos,t.result;var n;return n=f(),null===n&&(n=d(),null===n&&(n=h(),null===n&&(n=S(),null===n&&(n=C(),null===n&&(n=T(),null===n&&(n=D(),null===n&&(n=A(),null===n&&(n=P(),null===n&&(n=k(),null===n&&(n=I())))))))))),G[e]={nextPos:M,result:n},n}function f(){var e="wildcard@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,o;return o=M,42===t.charCodeAt(M)?(i="*",M++):(i=null,0===B&&r('"*"')),null!==i&&(i=function(e,t){return{type:"wildcard",value:t}}(o,i)),null===i&&(M=o),G[e]={nextPos:M,result:i},i}function d(){var e="identifier@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,o,s,u;return s=M,u=M,35===t.charCodeAt(M)?(i="#",M++):(i=null,0===B&&r('"#"')),i=null!==i?i:"",null!==i?(o=a(),null!==o?i=[i,o]:(i=null,M=u)):(i=null,M=u),null!==i&&(i=function(e,t){return{type:"identifier",value:t}}(s,i[1])),null===i&&(M=s),G[e]={nextPos:M,result:i},i}function h(){var e="attr@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,a,s,u,c,l,p;return l=M,p=M,91===t.charCodeAt(M)?(i="[",M++):(i=null,0===B&&r('"["')),null!==i?(a=o(),null!==a?(s=y(),null!==s?(u=o(),null!==u?(93===t.charCodeAt(M)?(c="]",M++):(c=null,0===B&&r('"]"')),null!==c?i=[i,a,s,u,c]:(i=null,M=p)):(i=null,M=p)):(i=null,M=p)):(i=null,M=p)):(i=null,M=p),null!==i&&(i=function(e,t){return t}(l,i[2])),null===i&&(M=l),G[e]={nextPos:M,result:i},i}function m(){var e="attrOps@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,o,a,s;return a=M,s=M,/^[><]/.test(t.charAt(M))?(i=t.charAt(M),M++):(i=null,0===B&&r("[><]"))),G[e]={nextPos:M,result:i},i}function g(){var e="attrEqOps@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,o,a,s;return a=M,s=M,33===t.charCodeAt(M)?(i="!",M++):(i=null,0===B&&r('"!"')),i=null!==i?i:"",null!==i?(61===t.charCodeAt(M)?(o="=",M++):(o=null,0===B&&r('"="')),null!==o?i=[i,o]:(i=null,M=s)):(i=null,M=s),null!==i&&(i=function(e,t){return t+"="}(a,i[0])),null===i&&(M=a),G[e]={nextPos:M,result:i},i}function v(){var e="attrName@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,o,s;if(s=M,o=a(),null===o&&(46===t.charCodeAt(M)?(o=".",M++):(o=null,0===B&&r('"."'))),null!==o)for(i=[];null!==o;)i.push(o),o=a(),null===o&&(46===t.charCodeAt(M)?(o=".",M++):(o=null,0===B&&r('"."')));else i=null;return null!==i&&(i=function(e,t){return t.join("")}(s,i)),null===i&&(M=s),G[e]={nextPos:M,result:i},i}function y(){var e="attrValue@"+M,t=G[e];if(t)return M=t.nextPos,t.result;var n,r,i,a,s,u,c;return u=M,c=M,n=v(),null!==n?(r=o(),null!==r?(i=g(),null!==i?(a=o(),null!==a?(s=w(),null===s&&(s=E()),null!==s?n=[n,r,i,a,s]:(n=null,M=c)):(n=null,M=c)):(n=null,M=c)):(n=null,M=c)):(n=null,M=c),null!==n&&(n=function(e,t,n,r){return{type:"attribute",name:t,operator:n,value:r}}(u,n[0],n[2],n[4])),null===n&&(M=u),null===n&&(u=M,c=M,n=v(),null!==n?(r=o(),null!==r?(i=m(),null!==i?(a=o(),null!==a?(s=x(),null===s&&(s=b(),null===s&&(s=_())),null!==s?n=[n,r,i,a,s]:(n=null,M=c)):(n=null,M=c)):(n=null,M=c)):(n=null,M=c)):(n=null,M=c),null!==n&&(n=function(e,t,n,r){return{type:"attribute",name:t,operator:n,value:r}}(u,n[0],n[2],n[4])),null===n&&(M=u),null===n&&(u=M,n=v(),null!==n&&(n=function(e,t){return{type:"attribute",name:t}}(u,n)),null===n&&(M=u))),G[e]={nextPos:M,result:n},n}function x(){var e="string@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,o,a,s,u,c,l,p;if(u=M,c=M,34===t.charCodeAt(M)?(i='"',M++):(i=null,0===B&&r('"\\""')),null!==i){for(o=[],/^[^\\"]/.test(t.charAt(M))?(a=t.charAt(M),M++):(a=null,0===B&&r('[^\\\\"]')),null===a&&(l=M,p=M,92===t.charCodeAt(M)?(a="\\",M++):(a=null,0===B&&r('"\\\\"')),null!==a?(t.length>M?(s=t.charAt(M),M++):(s=null,0===B&&r("any character")),null!==s?a=[a,s]:(a=null,M=p)):(a=null,M=p),null!==a&&(a=function(e,t,n){return t+n}(l,a[0],a[1])),null===a&&(M=l));null!==a;)o.push(a),/^[^\\"]/.test(t.charAt(M))?(a=t.charAt(M),M++):(a=null,0===B&&r('[^\\\\"]')),null===a&&(l=M,p=M,92===t.charCodeAt(M)?(a="\\",M++):(a=null,0===B&&r('"\\\\"')),null!==a?(t.length>M?(s=t.charAt(M),M++):(s=null,0===B&&r("any character")),null!==s?a=[a,s]:(a=null,M=p)):(a=null,M=p),null!==a&&(a=function(e,t,n){return t+n}(l,a[0],a[1])),null===a&&(M=l));null!==o?(34===t.charCodeAt(M)?(a='"',M++):(a=null,0===B&&r('"\\""')),null!==a?i=[i,o,a]:(i=null,M=c)):(i=null,M=c)}else i=null,M=c;if(null!==i&&(i=function(e,t){return{type:"literal",value:R(t.join(""))}}(u,i[1])),null===i&&(M=u),null===i){if(u=M,c=M,39===t.charCodeAt(M)?(i="'",M++):(i=null,0===B&&r('"\'"')),null!==i){for(o=[],/^[^\\']/.test(t.charAt(M))?(a=t.charAt(M),M++):(a=null,0===B&&r("[^\\\\']")),null===a&&(l=M,p=M,92===t.charCodeAt(M)?(a="\\",M++):(a=null,0===B&&r('"\\\\"')),null!==a?(t.length>M?(s=t.charAt(M),M++):(s=null,0===B&&r("any character")),null!==s?a=[a,s]:(a=null,M=p)):(a=null,M=p),null!==a&&(a=function(e,t,n){return t+n}(l,a[0],a[1])),null===a&&(M=l));null!==a;)o.push(a),/^[^\\']/.test(t.charAt(M))?(a=t.charAt(M),M++):(a=null,0===B&&r("[^\\\\']")),null===a&&(l=M,p=M,92===t.charCodeAt(M)?(a="\\",M++):(a=null,0===B&&r('"\\\\"')),null!==a?(t.length>M?(s=t.charAt(M),M++):(s=null,0===B&&r("any character")),null!==s?a=[a,s]:(a=null,M=p)):(a=null,M=p),null!==a&&(a=function(e,t,n){return t+n}(l,a[0],a[1])),null===a&&(M=l));null!==o?(39===t.charCodeAt(M)?(a="'",M++):(a=null,0===B&&r('"\'"')),null!==a?i=[i,o,a]:(i=null,M=c)):(i=null,M=c)}else i=null,M=c;null!==i&&(i=function(e,t){return{type:"literal",value:R(t.join(""))}}(u,i[1])),null===i&&(M=u)}return G[e]={nextPos:M,result:i},i}function b(){var e="number@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,o,a,s,u,c;for(s=M,u=M,c=M,i=[],/^[0-9]/.test(t.charAt(M))?(o=t.charAt(M),M++):(o=null,0===B&&r("[0-9]"));null!==o;)i.push(o),/^[0-9]/.test(t.charAt(M))?(o=t.charAt(M),M++):(o=null,0===B&&r("[0-9]"));if(null!==i?(46===t.charCodeAt(M)?(o=".",M++):(o=null,0===B&&r('"."')),null!==o?i=[i,o]:(i=null,M=c)):(i=null,M=c),i=null!==i?i:"",null!==i){if(/^[0-9]/.test(t.charAt(M))?(a=t.charAt(M),M++):(a=null,0===B&&r("[0-9]")),null!==a)for(o=[];null!==a;)o.push(a),/^[0-9]/.test(t.charAt(M))?(a=t.charAt(M), M++):(a=null,0===B&&r("[0-9]"));else o=null;null!==o?i=[i,o]:(i=null,M=u)}else i=null,M=u;return null!==i&&(i=function(e,t,n){return{type:"literal",value:parseFloat((t?t.join(""):"")+n.join(""))}}(s,i[0],i[1])),null===i&&(M=s),G[e]={nextPos:M,result:i},i}function _(){var e="path@"+M,t=G[e];if(t)return M=t.nextPos,t.result;var n,r;return r=M,n=a(),null!==n&&(n=function(e,t){return{type:"literal",value:t}}(r,n)),null===n&&(M=r),G[e]={nextPos:M,result:n},n}function w(){var e="type@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,a,s,u,c,l,p;if(l=M,p=M,"type("===t.substr(M,5)?(i="type(",M+=5):(i=null,0===B&&r('"type("')),null!==i)if(a=o(),null!==a){if(/^[^ )]/.test(t.charAt(M))?(u=t.charAt(M),M++):(u=null,0===B&&r("[^ )]")),null!==u)for(s=[];null!==u;)s.push(u),/^[^ )]/.test(t.charAt(M))?(u=t.charAt(M),M++):(u=null,0===B&&r("[^ )]"));else s=null;null!==s?(u=o(),null!==u?(41===t.charCodeAt(M)?(c=")",M++):(c=null,0===B&&r('")"')),null!==c?i=[i,a,s,u,c]:(i=null,M=p)):(i=null,M=p)):(i=null,M=p)}else i=null,M=p;else i=null,M=p;return null!==i&&(i=function(e,t){return{type:"type",value:t.join("")}}(l,i[2])),null===i&&(M=l),G[e]={nextPos:M,result:i},i}function E(){var e="regex@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,o,a,s,u;if(s=M,u=M,47===t.charCodeAt(M)?(i="/",M++):(i=null,0===B&&r('"/"')),null!==i){if(/^[^\/]/.test(t.charAt(M))?(a=t.charAt(M),M++):(a=null,0===B&&r("[^\\/]")),null!==a)for(o=[];null!==a;)o.push(a),/^[^\/]/.test(t.charAt(M))?(a=t.charAt(M),M++):(a=null,0===B&&r("[^\\/]"));else o=null;null!==o?(47===t.charCodeAt(M)?(a="/",M++):(a=null,0===B&&r('"/"')),null!==a?i=[i,o,a]:(i=null,M=u)):(i=null,M=u)}else i=null,M=u;return null!==i&&(i=function(e,t){return{type:"regexp",value:new RegExp(t.join(""))}}(s,i[1])),null===i&&(M=s),G[e]={nextPos:M,result:i},i}function S(){var e="field@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,o,s,u,c,l,p,f;if(l=M,p=M,46===t.charCodeAt(M)?(i=".",M++):(i=null,0===B&&r('"."')),null!==i)if(o=a(),null!==o){for(s=[],f=M,46===t.charCodeAt(M)?(u=".",M++):(u=null,0===B&&r('"."')),null!==u?(c=a(),null!==c?u=[u,c]:(u=null,M=f)):(u=null,M=f);null!==u;)s.push(u),f=M,46===t.charCodeAt(M)?(u=".",M++):(u=null,0===B&&r('"."')),null!==u?(c=a(),null!==c?u=[u,c]:(u=null,M=f)):(u=null,M=f);null!==s?i=[i,o,s]:(i=null,M=p)}else i=null,M=p;else i=null,M=p;return null!==i&&(i=function(e,t,n){return{type:"field",name:n.reduce(function(e,t){return e+t[0]+t[1]},t)}}(l,i[1],i[2])),null===i&&(M=l),G[e]={nextPos:M,result:i},i}function C(){var e="negation@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,a,s,c,l,p,f;return p=M,f=M,":not("===t.substr(M,5)?(i=":not(",M+=5):(i=null,0===B&&r('":not("')),null!==i?(a=o(),null!==a?(s=u(),null!==s?(c=o(),null!==c?(41===t.charCodeAt(M)?(l=")",M++):(l=null,0===B&&r('")"')),null!==l?i=[i,a,s,c,l]:(i=null,M=f)):(i=null,M=f)):(i=null,M=f)):(i=null,M=f)):(i=null,M=f),null!==i&&(i=function(e,t){return{type:"not",selectors:t}}(p,i[2])),null===i&&(M=p),G[e]={nextPos:M,result:i},i}function T(){var e="matches@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,a,s,c,l,p,f;return p=M,f=M,":matches("===t.substr(M,9)?(i=":matches(",M+=9):(i=null,0===B&&r('":matches("')),null!==i?(a=o(),null!==a?(s=u(),null!==s?(c=o(),null!==c?(41===t.charCodeAt(M)?(l=")",M++):(l=null,0===B&&r('")"')),null!==l?i=[i,a,s,c,l]:(i=null,M=f)):(i=null,M=f)):(i=null,M=f)):(i=null,M=f)):(i=null,M=f),null!==i&&(i=function(e,t){return{type:"matches",selectors:t}}(p,i[2])),null===i&&(M=p),G[e]={nextPos:M,result:i},i}function D(){var e="firstChild@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,o;return o=M,":first-child"===t.substr(M,12)?(i=":first-child",M+=12):(i=null,0===B&&r('":first-child"')),null!==i&&(i=function(e){return N(1)}(o)),null===i&&(M=o),G[e]={nextPos:M,result:i},i}function A(){var e="lastChild@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,o;return o=M,":last-child"===t.substr(M,11)?(i=":last-child",M+=11):(i=null,0===B&&r('":last-child"')),null!==i&&(i=function(e){return j(1)}(o)),null===i&&(M=o),G[e]={nextPos:M,result:i},i}function P(){var e="nthChild@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,a,s,u,c,l,p;if(l=M,p=M,":nth-child("===t.substr(M,11)?(i=":nth-child(",M+=11):(i=null,0===B&&r('":nth-child("')),null!==i)if(a=o(),null!==a){if(/^[0-9]/.test(t.charAt(M))?(u=t.charAt(M),M++):(u=null,0===B&&r("[0-9]")),null!==u)for(s=[];null!==u;)s.push(u),/^[0-9]/.test(t.charAt(M))?(u=t.charAt(M),M++):(u=null,0===B&&r("[0-9]"));else s=null;null!==s?(u=o(),null!==u?(41===t.charCodeAt(M)?(c=")",M++):(c=null,0===B&&r('")"')),null!==c?i=[i,a,s,u,c]:(i=null,M=p)):(i=null,M=p)):(i=null,M=p)}else i=null,M=p;else i=null,M=p;return null!==i&&(i=function(e,t){return N(parseInt(t.join(""),10))}(l,i[2])),null===i&&(M=l),G[e]={nextPos:M,result:i},i}function k(){var e="nthLastChild@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,a,s,u,c,l,p;if(l=M,p=M,":nth-last-child("===t.substr(M,16)?(i=":nth-last-child(",M+=16):(i=null,0===B&&r('":nth-last-child("')),null!==i)if(a=o(),null!==a){if(/^[0-9]/.test(t.charAt(M))?(u=t.charAt(M),M++):(u=null,0===B&&r("[0-9]")),null!==u)for(s=[];null!==u;)s.push(u),/^[0-9]/.test(t.charAt(M))?(u=t.charAt(M),M++):(u=null,0===B&&r("[0-9]"));else s=null;null!==s?(u=o(),null!==u?(41===t.charCodeAt(M)?(c=")",M++):(c=null,0===B&&r('")"')),null!==c?i=[i,a,s,u,c]:(i=null,M=p)):(i=null,M=p)):(i=null,M=p)}else i=null,M=p;else i=null,M=p;return null!==i&&(i=function(e,t){return j(parseInt(t.join(""),10))}(l,i[2])),null===i&&(M=l),G[e]={nextPos:M,result:i},i}function I(){var e="class@"+M,n=G[e];if(n)return M=n.nextPos,n.result;var i,o,a,s;return a=M,s=M,58===t.charCodeAt(M)?(i=":",M++):(i=null,0===B&&r('":"')),null!==i?("statement"===t.substr(M,9).toLowerCase()?(o=t.substr(M,9),M+=9):(o=null,0===B&&r('"statement"')),null===o&&("expression"===t.substr(M,10).toLowerCase()?(o=t.substr(M,10),M+=10):(o=null,0===B&&r('"expression"')),null===o&&("declaration"===t.substr(M,11).toLowerCase()?(o=t.substr(M,11),M+=11):(o=null,0===B&&r('"declaration"')),null===o&&("function"===t.substr(M,8).toLowerCase()?(o=t.substr(M,8),M+=8):(o=null,0===B&&r('"function"')),null===o&&("pattern"===t.substr(M,7).toLowerCase()?(o=t.substr(M,7),M+=7):(o=null,0===B&&r('"pattern"')))))),null!==o?i=[i,o]:(i=null,M=s)):(i=null,M=s),null!==i&&(i=function(e,t){return{type:"class",name:t}}(a,i[1])),null===i&&(M=a),G[e]={nextPos:M,result:i},i}function F(e){e.sort();for(var t=null,n=[],r=0;r>>1,o=i+n,t(e[o])?r=n:(i=o+1,r-=n+1);return i}function u(e,t){var n,r,i,o;for(r=e.length,i=0;r;)n=r>>>1,o=i+n,t(e[o])?(i=o+1,r-=n+1):r=n;return i}function c(e,t){var n,r,i,o=S(t);for(r=0,i=o.length;re.range[0]}),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),n-=1,n>=0&&(e.extendedRange[0]=t[n].range[1]),e}function y(e,t,n){var r,i,a,s,u=[];if(!e.range)throw new Error("attachComments needs range information");if(!n.length){if(t.length){for(a=0,i=t.length;ae.range[0]));)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),u.splice(s,1)):s+=1;return s===u.length?_.Break:u[s].extendedRange[0]>e.range[1]?_.Skip:void 0}}),s=0,m(e,{leave:function(e){for(var t;se.range[1]?_.Skip:void 0}}),e}var x,b,_,w,E,S,C,T,D;return b=Array.isArray,b||(b=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),i(a),i(u),E=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}(),S=Object.keys||function(e){var t,n=[];for(t in e)n.push(t);return n},x={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},w={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},C={},T={},D={},_={Break:C,Skip:T,Remove:D},l.prototype.replace=function(e){this.parent[this.key]=e},l.prototype.remove=function(){return b(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){function e(e,t){if(b(t))for(r=0,i=t.length;r=0;)if(u=f[c],m=o[u])if(b(m)){for(l=m.length;(l-=1)>=0;)if(m[l]){if(h(a,f[c]))i=new p(m[l],[u,l],"Property",null);else{if(!d(m[l]))continue;i=new p(m[l],[u,l],null,null)}n.push(i)}}else d(m)&&n.push(new p(m,u,null,null))}}else if(i=r.pop(),s=this.__execute(t.leave,i),this.__state===C||s===C)return},f.prototype.replace=function(e,t){function n(e){var t,n,i,o;if(e.ref.remove())for(n=e.ref.key,o=e.ref.parent,t=r.length;t--;)if(i=r[t],i.ref&&i.ref.parent===o){if(i.ref.key=0;)if(x=m[c],g=o[x])if(b(g)){for(f=g.length;(f-=1)>=0;)if(g[f]){if(h(a,m[c]))u=new p(g[f],[x,f],"Property",new l(g,f));else{if(!d(g[f]))continue;u=new p(g[f],[x,f],null,new l(g,f))}r.push(u)}}else d(g)&&r.push(new p(g,x,null,new l(o,x)))}}else if(u=i.pop(),s=this.__execute(t.leave,u),void 0!==s&&s!==C&&s!==T&&s!==D&&u.ref.replace(s),this.__state!==D&&s!==D||n(u),this.__state===C||s===C)return y.root;return y.root},n.version=e("./package.json").version,n.Syntax=x,n.traverse=m,n.replace=g,n.attachComments=y,n.VisitorKeys=w,n.VisitorOption=_,n.Controller=f,n.cloneEnvironment=function(){return t({})},n}(n)},{"./package.json":26}],26:[function(e,t,n){t.exports={_args:[[{raw:"estraverse@~4.1.0",scope:null,escapedName:"estraverse",name:"estraverse",rawSpec:"~4.1.0",spec:">=4.1.0 <4.2.0",type:"range"},"C:\\eslintgithub\\eslint\\node_modules\\esrecurse"]],_from:"estraverse@>=4.1.0 <4.2.0",_id:"estraverse@4.1.1",_inCache:!0,_location:"/esrecurse/estraverse",_nodeVersion:"4.1.1",_npmUser:{name:"constellation",email:"utatane.tea@gmail.com"},_npmVersion:"2.14.4",_phantomChildren:{},_requested:{raw:"estraverse@~4.1.0",scope:null,escapedName:"estraverse",name:"estraverse",rawSpec:"~4.1.0",spec:">=4.1.0 <4.2.0",type:"range"},_requiredBy:["/esrecurse"],_resolved:"https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz",_shasum:"f6caca728933a850ef90661d0e17982ba47111a2",_shrinkwrap:null,_spec:"estraverse@~4.1.0",_where:"C:\\eslintgithub\\eslint\\node_modules\\esrecurse",bugs:{url:"https://github.com/estools/estraverse/issues"},dependencies:{},description:"ECMAScript JS AST traversal functions",devDependencies:{chai:"^2.1.1","coffee-script":"^1.8.0",espree:"^1.11.0",gulp:"^3.8.10","gulp-bump":"^0.2.2","gulp-filter":"^2.0.0","gulp-git":"^1.0.1","gulp-tag-version":"^1.2.1",jshint:"^2.5.6",mocha:"^2.1.0"},directories:{},dist:{shasum:"f6caca728933a850ef90661d0e17982ba47111a2",tarball:"https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz"},engines:{node:">=0.10.0"},gitHead:"bbcccbfe98296585e4311c8755e1d00dcd581e3c",homepage:"https://github.com/estools/estraverse",license:"BSD-2-Clause",main:"estraverse.js",maintainers:[{name:"constellation",email:"utatane.tea@gmail.com"},{name:"michaelficarra",email:"npm@michael.ficarra.me"},{name:"nzakas",email:"nicholas@nczconsulting.com"}],name:"estraverse",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+ssh://git@github.com/estools/estraverse.git"},scripts:{lint:"jshint estraverse.js",test:"npm run-script lint && npm run-script unit-test","unit-test":"mocha --compilers coffee:coffee-script/register"},version:"4.1.1"}},{}],27:[function(e,t,n){t.exports={_args:[[{raw:"esrecurse@^4.1.0",scope:null,escapedName:"esrecurse",name:"esrecurse",rawSpec:"^4.1.0",spec:">=4.1.0 <5.0.0",type:"range"},"C:\\eslintgithub\\eslint\\node_modules\\eslint-scope"]],_from:"esrecurse@>=4.1.0 <5.0.0",_id:"esrecurse@4.1.0",_inCache:!0,_location:"/esrecurse",_nodeVersion:"0.12.9",_npmOperationalInternal:{host:"packages-13-west.internal.npmjs.com",tmp:"tmp/esrecurse-4.1.0.tgz_1457712782215_0.15950557170435786"},_npmUser:{name:"nzakas",email:"nicholas@nczconsulting.com"},_npmVersion:"2.14.9",_phantomChildren:{},_requested:{raw:"esrecurse@^4.1.0",scope:null,escapedName:"esrecurse",name:"esrecurse",rawSpec:"^4.1.0",spec:">=4.1.0 <5.0.0",type:"range"},_requiredBy:["/eslint-scope"],_resolved:"https://registry.npmjs.org/esrecurse/-/esrecurse-4.1.0.tgz",_shasum:"4713b6536adf7f2ac4f327d559e7756bff648220",_shrinkwrap:null,_spec:"esrecurse@^4.1.0",_where:"C:\\eslintgithub\\eslint\\node_modules\\eslint-scope",bugs:{url:"https://github.com/estools/esrecurse/issues"},dependencies:{estraverse:"~4.1.0","object-assign":"^4.0.1"},description:"ECMAScript AST recursive visitor",devDependencies:{chai:"^3.3.0","coffee-script":"^1.9.1",esprima:"^2.1.0",gulp:"^3.9.0","gulp-bump":"^1.0.0","gulp-eslint":"^1.0.0","gulp-filter":"^3.0.1","gulp-git":"^1.1.0","gulp-mocha":"^2.1.3","gulp-tag-version":"^1.2.1",jsdoc:"^3.3.0-alpha10",minimist:"^1.1.0"},directories:{},dist:{shasum:"4713b6536adf7f2ac4f327d559e7756bff648220",tarball:"https://registry.npmjs.org/esrecurse/-/esrecurse-4.1.0.tgz"},engines:{node:">=0.10.0"},gitHead:"63a34714834bd7ad2063054bd4abb24fb82ca667",homepage:"https://github.com/estools/esrecurse",license:"BSD-2-Clause",main:"esrecurse.js",maintainers:[{name:"constellation",email:"utatane.tea@gmail.com"},{name:"michaelficarra",email:"npm@michael.ficarra.me"},{name:"nzakas",email:"nicholas@nczconsulting.com"}],name:"esrecurse",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/estools/esrecurse.git"},scripts:{lint:"gulp lint",test:"gulp travis","unit-test":"gulp test"},version:"4.1.0"}},{}],28:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function t(n){function i(){}function o(e){var t,n,i={};for(t in e)e.hasOwnProperty(t)&&(n=e[t],"object"===("undefined"==typeof n?"undefined":r(n))&&null!==n?i[t]=o(n):i[t]=n);return i}function a(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function s(e,t){var n,r,i,o;for(r=e.length,i=0;r;)n=r>>>1,o=i+n,t(e[o])?r=n:(i=o+1,r-=n+1);return i}function u(e,t){var n,r,i,o;for(r=e.length,i=0;r;)n=r>>>1,o=i+n,t(e[o])?(i=o+1,r-=n+1):r=n;return i}function c(e,t){var n,r,i,o=S(t);for(r=0,i=o.length;re.range[0]}),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),n-=1,n>=0&&(e.extendedRange[0]=t[n].range[1]),e}function y(e,t,n){var r,i,a,s,u=[];if(!e.range)throw new Error("attachComments needs range information");if(!n.length){if(t.length){for(a=0,i=t.length;ae.range[0]));)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),u.splice(s,1)):s+=1;return s===u.length?_.Break:u[s].extendedRange[0]>e.range[1]?_.Skip:void 0}}),s=0,m(e,{leave:function(e){for(var t;se.range[1]?_.Skip:void 0}}),e}var x,b,_,w,E,S,C,T,D;return b=Array.isArray,b||(b=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),i(a),i(u),E=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}(),S=Object.keys||function(e){var t,n=[];for(t in e)n.push(t);return n},x={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},w={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[], TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},C={},T={},D={},_={Break:C,Skip:T,Remove:D},l.prototype.replace=function(e){this.parent[this.key]=e},l.prototype.remove=function(){return b(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){function e(e,t){if(b(t))for(r=0,i=t.length;r=0;)if(u=f[c],m=o[u])if(b(m)){for(l=m.length;(l-=1)>=0;)if(m[l]){if(h(a,f[c]))i=new p(m[l],[u,l],"Property",null);else{if(!d(m[l]))continue;i=new p(m[l],[u,l],null,null)}n.push(i)}}else d(m)&&n.push(new p(m,u,null,null))}}else if(i=r.pop(),s=this.__execute(t.leave,i),this.__state===C||s===C)return},f.prototype.replace=function(e,t){function n(e){var t,n,i,o;if(e.ref.remove())for(n=e.ref.key,o=e.ref.parent,t=r.length;t--;)if(i=r[t],i.ref&&i.ref.parent===o){if(i.ref.key=0;)if(x=m[c],g=o[x])if(b(g)){for(f=g.length;(f-=1)>=0;)if(g[f]){if(h(a,m[c]))u=new p(g[f],[x,f],"Property",new l(g,f));else{if(!d(g[f]))continue;u=new p(g[f],[x,f],null,new l(g,f))}r.push(u)}}else d(g)&&r.push(new p(g,x,null,new l(o,x)))}}else if(u=i.pop(),s=this.__execute(t.leave,u),void 0!==s&&s!==C&&s!==T&&s!==D&&u.ref.replace(s),this.__state!==D&&s!==D||n(u),this.__state===C||s===C)return y.root;return y.root},n.version=e("./package.json").version,n.Syntax=x,n.traverse=m,n.replace=g,n.attachComments=y,n.VisitorKeys=w,n.VisitorOption=_,n.Controller=f,n.cloneEnvironment=function(){return t({})},n}(n)},{"./package.json":29}],29:[function(e,t,n){t.exports={_args:[[{raw:"estraverse@^4.2.0",scope:null,escapedName:"estraverse",name:"estraverse",rawSpec:"^4.2.0",spec:">=4.2.0 <5.0.0",type:"range"},"C:\\eslintgithub\\eslint"]],_from:"estraverse@>=4.2.0 <5.0.0",_id:"estraverse@4.2.0",_inCache:!0,_location:"/estraverse",_nodeVersion:"0.12.9",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/estraverse-4.2.0.tgz_1457646738925_0.7118953282479197"},_npmUser:{name:"nzakas",email:"nicholas@nczconsulting.com"},_npmVersion:"2.14.9",_phantomChildren:{},_requested:{raw:"estraverse@^4.2.0",scope:null,escapedName:"estraverse",name:"estraverse",rawSpec:"^4.2.0",spec:">=4.2.0 <5.0.0",type:"range"},_requiredBy:["/","/eslint-scope","/esquery"],_resolved:"https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",_shasum:"0dee3fed31fcd469618ce7342099fc1afa0bdb13",_shrinkwrap:null,_spec:"estraverse@^4.2.0",_where:"C:\\eslintgithub\\eslint",bugs:{url:"https://github.com/estools/estraverse/issues"},dependencies:{},description:"ECMAScript JS AST traversal functions",devDependencies:{"babel-preset-es2015":"^6.3.13","babel-register":"^6.3.13",chai:"^2.1.1",espree:"^1.11.0",gulp:"^3.8.10","gulp-bump":"^0.2.2","gulp-filter":"^2.0.0","gulp-git":"^1.0.1","gulp-tag-version":"^1.2.1",jshint:"^2.5.6",mocha:"^2.1.0"},directories:{},dist:{shasum:"0dee3fed31fcd469618ce7342099fc1afa0bdb13",tarball:"https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz"},engines:{node:">=0.10.0"},gitHead:"6f6a4e99653908e859c7c10d04d9518bf4844ede",homepage:"https://github.com/estools/estraverse",license:"BSD-2-Clause",main:"estraverse.js",maintainers:[{name:"constellation",email:"utatane.tea@gmail.com"},{name:"michaelficarra",email:"npm@michael.ficarra.me"},{name:"nzakas",email:"nicholas@nczconsulting.com"}],name:"estraverse",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+ssh://git@github.com/estools/estraverse.git"},scripts:{lint:"jshint estraverse.js",test:"npm run-script lint && npm run-script unit-test","unit-test":"mocha --compilers js:babel-register"},version:"4.2.0"}},{}],30:[function(e,t,n){"use strict";!function(){function e(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function n(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function i(e){return r(e)||null!=e&&"FunctionDeclaration"===e.type}function o(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function a(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=o(t)}while(t);return!1}t.exports={isExpression:e,isStatement:r,isIterationStatement:n,isSourceElement:i,isProblematicIfStatement:a,trailingStatement:o}}()},{}],31:[function(e,t,n){"use strict";!function(){function e(e){return 48<=e&&e<=57}function n(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70}function r(e){return e>=48&&e<=55}function i(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&d.indexOf(e)>=0}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e){if(e<=65535)return String.fromCharCode(e);var t=String.fromCharCode(Math.floor((e-65536)/1024)+55296),n=String.fromCharCode((e-65536)%1024+56320);return t+n}function s(e){return e<128?h[e]:f.NonAsciiIdentifierStart.test(a(e))}function u(e){return e<128?m[e]:f.NonAsciiIdentifierPart.test(a(e))}function c(e){return e<128?h[e]:p.NonAsciiIdentifierStart.test(a(e))}function l(e){return e<128?m[e]:p.NonAsciiIdentifierPart.test(a(e))}var p,f,d,h,m,g;for(f={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},p={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ },d=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],h=new Array(128),g=0;g<128;++g)h[g]=g>=97&&g<=122||g>=65&&g<=90||36===g||95===g;for(m=new Array(128),g=0;g<128;++g)m[g]=g>=97&&g<=122||g>=65&&g<=90||g>=48&&g<=57||36===g||95===g;t.exports={isDecimalDigit:e,isHexDigit:n,isOctalDigit:r,isWhiteSpace:i,isLineTerminator:o,isIdentifierStartES5:s,isIdentifierPartES5:u,isIdentifierStartES6:c,isIdentifierPartES6:l}}()},{}],32:[function(e,t,n){"use strict";!function(){function n(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function r(e,t){return!(!t&&"yield"===e)&&i(e,t)}function i(e,t){if(t&&n(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function o(e,t){return"null"===e||"true"===e||"false"===e||r(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||i(e,t)}function s(e){return"eval"===e||"arguments"===e}function u(e){var t,n,r;if(0===e.length)return!1;if(r=e.charCodeAt(0),!d.isIdentifierStartES5(r))return!1;for(t=1,n=e.length;t=n)return!1;if(i=e.charCodeAt(t),!(56320<=i&&i<=57343))return!1;r=c(r,i)}if(!o(r))return!1;o=d.isIdentifierPartES6}return!0}function p(e,t){return u(e)&&!o(e,t)}function f(e,t){return l(e)&&!a(e,t)}var d=e("./code");t.exports={isKeywordES5:r,isKeywordES6:i,isReservedWordES5:o,isReservedWordES6:a,isRestrictedWord:s,isIdentifierNameES5:u,isIdentifierNameES6:l,isIdentifierES5:p,isIdentifierES6:f}}()},{"./code":31}],33:[function(e,t,n){"use strict";!function(){n.ast=e("./ast"),n.code=e("./code"),n.keyword=e("./keyword")}()},{"./ast":30,"./code":31,"./keyword":32}],34:[function(e,t,n){"use strict";function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"number"==typeof e}function a(e){return"object"===("undefined"==typeof e?"undefined":u(e))&&null!==e}function s(e){return void 0===e}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!o(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,o,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(n=this._events[e],s(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),n.apply(this,o)}else if(a(n))for(o=Array.prototype.slice.call(arguments,1),c=n.slice(),r=c.length,u=0;u0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,o,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],i(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],35:[function(e,t,n){"use strict";var r=e("util"),i=/[\{\[]/,o=/[\}\]]/;t.exports=function(){var e=[],t=0,n=function(n){for(var r="";r.length<2*t;)r+=" ";e.push(r+n)},a=function e(a){return a?o.test(a.trim()[0])&&i.test(a[a.length-1])?(t--,n(r.format.apply(r,arguments)),t++,e):i.test(a[a.length-1])?(n(r.format.apply(r,arguments)),t++,e):o.test(a.trim()[0])?(t--,n(r.format.apply(r,arguments)),e):(n(r.format.apply(r,arguments)),e):e};return a.toString=function(){return e.join("\n")},a.toFunction=function(e){var t="return ("+a.toString()+")",n=Object.keys(e||{}).map(function(e){return e}),r=n.map(function(t){return e[t]});return Function.apply(null,n.concat(t)).apply(null,r)},arguments.length&&a.apply(null,arguments),a}},{util:64}],36:[function(e,t,n){"use strict";var r=e("is-property"),i=function(e,t){return r(t)?e+"."+t:e+"["+JSON.stringify(t)+"]"};i.valid=r,i.property=function(e){return r(e)?e:JSON.stringify(e)},t.exports=i},{"is-property":42}],37:[function(e,t,n){t.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es6:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffectReadOnly:!1,AnimationEffectTiming:!1,AnimationEffectTimingReadOnly:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AutocompleteErrorEvent:!1,BarProp:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,blur:!1,btoa:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClientRect:!1,ClientRectList:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConvolverNode:!1,createImageBitmap:!1,Credential:!1,CredentialsContainer:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSFontFaceRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CSSTransition:!1,CSSUnknownRule:!1,CSSViewportRule:!1,customElements:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,Debug:!1,defaultStatus:!1,defaultstatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMParser:!1,DOMSettableTokenList:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,FederatedCredential:!1,fetch:!1,File:!1,FileError:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAppletElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLKeygenElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,ImageBitmap:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,InputMethodContext:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,Intl:!1,KeyboardEvent:!1,KeyframeEffect:!1,KeyframeEffectReadOnly:!1,length:!1,localStorage:!1,location:!1,Location:!1,locationbar:!1,matchMedia:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyEvent:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaSource:!1,MediaRecorder:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,navigator:!1,Navigator:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PasswordCredential:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,Plugin:!1,PluginArray:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,RadioNodeList:!1,Range:!1,ReadableByteStream:!1,ReadableStream:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,resizeTo:!1,Response:!1,RTCIceCandidate:!1,RTCSessionDescription:!1,RTCPeerConnection:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedKeyframeList:!1,SharedWorker:!1,showModalDialog:!1,SiteBoundCredential:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,status:!1,statusbar:!1,stop:!1,Storage:!1,StorageEvent:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,SVGZoomEvent:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeEvent:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,URLSearchParams:!1,ValidityState:!1,VTTCue:!1,WaveShaperNode:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestProgressEvent:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1,XSLTProcessor:!1},worker:{applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,Worker:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,Intl:!1,module:!1,process:!1,require:!1,root:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},commonjs:{exports:!0,module:!1,require:!1,global:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,check:!1,describe:!1,expect:!1,gen:!1,it:!1,fdescribe:!1,fit:!1,jest:!1,pit:!1,require:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,Java:!1,java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,ln:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,target:!1,tempdir:!1,test:!1,touch:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,AccountsClient:!1,AccountsServer:!1,AccountsCommon:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,DDPRateLimiter:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{caches:!1,Cache:!1,CacheStorage:!1,Client:!1,clients:!1,Clients:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,FetchEvent:!1,importScripts:!1,registration:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,skipWaiting:!1,WindowClient:!1},atomtest:{advanceClock:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1},protractor:{$:!1,$$:!1,browser:!1,By:!1,by:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1},webextensions:{browser:!1,chrome:!1,opr:!1},greasemonkey:{GM_addStyle:!1,GM_deleteValue:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_setClipboard:!1,GM_setValue:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1}}},{}],38:[function(e,t,n){"use strict";t.exports=e("./globals.json")},{"./globals.json":37}],39:[function(e,t,n){(function(e){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){return Array.isArray(e)?e:[e]}function i(e,t){var n=m[e];if(n)return n;var r=t?h:d,i=r.reduce(function(t,n){return t.replace(n[0],n[1].bind(e))},e);return m[e]=new RegExp(i,"i")}var o=function(){function e(e,t){for(var n=0;n 9007199254740992 || "+e+" < -9007199254740992)"},p.string=function(e){return"typeof "+e+' === "string"'};var f=function(e){for(var t=[],n=0;n1){var i=(0|e)!==e?Math.pow(10,e.toString().split(".").pop().length):1;n=i>r||Math.round(r*e)%(r*t)}else n=e%t;return!n},h=function e(t,n,a,h,m){var g=m?s(u,m.formats):u,v={unique:f,formats:g,isMultipleOf:d},y=!!m&&!!m.verbose,x=!(!m||void 0===m.greedy)&&m.greedy,b={},_=function(e){return e+(b[e]=(b[e]||0)+1)},w={},E=function(e){if(w[e])return w[e];var t=_("pattern");return v[t]=new RegExp(e),w[e]=t,t},S=["i","j","k","l","m","n","o","p","q","r","s","t","u","v","x","y","z"],C=function(){var e=S.shift();return S.push(e+e[0]),e},T=function t(o,s,f,d){var h=s.properties,b=s.type,w=!1;Array.isArray(s.items)&&(h={},s.items.forEach(function(e,t){h[t]=e}),b="array",w=!0);var S=0,T=function(e,t,n){D("errors++"),f===!0&&(D("if (validate.errors === null) validate.errors = []"),y?D("validate.errors.push({field:%s,message:%s,value:%s,type:%s})",l(t||o),JSON.stringify(e),n||o,JSON.stringify(b)):D("validate.errors.push({field:%s,message:%s})",l(t||o),JSON.stringify(e)))};s.required===!0?(S++,D("if (%s === undefined) {",o),T("is required"),D("} else {")):(S++,D("if (%s !== undefined) {",o));var A=[].concat(b).map(function(e){if(e&&!p.hasOwnProperty(e))throw new Error("Unknown type: "+e);return p[e||"any"](o)}).join(" || ")||"true";if("true"!==A&&(S++,D("if (!(%s)) {",A),T("is the wrong type"),D("} else {")),w)if(s.additionalItems===!1)D("if (%s.length > %d) {",o,s.items.length),T("has additional items"),D("}");else if(s.additionalItems){var P=C();D("for (var %s = %d; %s < %s.length; %s++) {",P,s.items.length,P,o,P),t(o+"["+P+"]",s.additionalItems,f,d),D("}")}if(s.format&&g[s.format]){"string"!==b&&u[s.format]&&D("if (%s) {",p.string(o));var k=_("format");v[k]=g[s.format],"function"==typeof v[k]?D("if (!%s(%s)) {",k,o):D("if (!%s.test(%s)) {",k,o),T("must be "+s.format+" format"),D("}"),"string"!==b&&u[s.format]&&D("}")}if(Array.isArray(s.required)){var I=function(e){var t=i(o,e);D("if (%s === undefined) {",t),T("is required",t),D("missing++"),D("}")};D("if ((%s)) {","object"!==b?p.object(o):"true"),D("var missing = 0"),s.required.map(I),D("}"),x||(D("if (missing === 0) {"),S++)}if(s.uniqueItems&&("array"!==b&&D("if (%s) {",p.array(o)),D("if (!(unique(%s))) {",o),T("must be unique"),D("}"),"array"!==b&&D("}")),s.enum){var F=s.enum.some(function(e){return"object"===("undefined"==typeof e?"undefined":r(e))}),O=F?function(e){return"JSON.stringify("+o+") !== JSON.stringify("+JSON.stringify(e)+")"}:function(e){return o+" !== "+JSON.stringify(e)};D("if (%s) {",s.enum.map(O).join(" && ")||"false"),T("must be an enum value"),D("}")}if(s.dependencies&&("object"!==b&&D("if (%s) {",p.object(o)),Object.keys(s.dependencies).forEach(function(e){var n=s.dependencies[e];"string"==typeof n&&(n=[n]);var a=function(e){return i(o,e)+" !== undefined"};Array.isArray(n)&&(D("if (%s !== undefined && !(%s)) {",i(o,e),n.map(a).join(" && ")||"true"),T("dependencies not set"),D("}")),"object"===("undefined"==typeof n?"undefined":r(n))&&(D("if (%s !== undefined) {",i(o,e)),t(o,n,f,d),D("}"))}),"object"!==b&&D("}")),s.additionalProperties||s.additionalProperties===!1){"object"!==b&&D("if (%s) {",p.object(o));var P=C(),N=_("keys"),j=function(e){return N+"["+P+"] !== "+JSON.stringify(e)},R=function(e){return"!"+E(e)+".test("+N+"["+P+"])"},L=Object.keys(h||{}).map(j).concat(Object.keys(s.patternProperties||{}).map(R)).join(" && ")||"true";D("var %s = Object.keys(%s)",N,o)("for (var %s = 0; %s < %s.length; %s++) {",P,P,N,P)("if (%s) {",L),s.additionalProperties===!1?(d&&D("delete %s",o+"["+N+"["+P+"]]"),T("has additional properties",null,JSON.stringify(o+".")+" + "+N+"["+P+"]")):t(o+"["+N+"["+P+"]]",s.additionalProperties,f,d),D("}")("}"),"object"!==b&&D("}")}if(s.$ref){var M=c(a,m&&m.schemas||{},s.$ref);if(M){var B=n[s.$ref];B||(n[s.$ref]=function(e){return B(e)},B=e(M,n,a,!1,m));var k=_("ref");v[k]=B,D("if (!(%s(%s))) {",k,o),T("referenced schema does not match"),D("}")}}if(s.not){var U=_("prev");D("var %s = errors",U),t(o,s.not,!1,d),D("if (%s === errors) {",U),T("negative schema matches"),D("} else {")("errors = %s",U)("}")}if(s.items&&!w){"array"!==b&&D("if (%s) {",p.array(o));var P=C();D("for (var %s = 0; %s < %s.length; %s++) {",P,P,o,P),t(o+"["+P+"]",s.items,f,d),D("}"),"array"!==b&&D("}")}if(s.patternProperties){"object"!==b&&D("if (%s) {",p.object(o));var N=_("keys"),P=C();D("var %s = Object.keys(%s)",N,o)("for (var %s = 0; %s < %s.length; %s++) {",P,P,N,P),Object.keys(s.patternProperties).forEach(function(e){var n=E(e);D("if (%s.test(%s)) {",n,N+"["+P+"]"),t(o+"["+N+"["+P+"]]",s.patternProperties[e],f,d),D("}")}),D("}"),"object"!==b&&D("}")}if(s.pattern){var V=E(s.pattern);"string"!==b&&D("if (%s) {",p.string(o)),D("if (!(%s.test(%s))) {",V,o),T("pattern mismatch"),D("}"),"string"!==b&&D("}")}if(s.allOf&&s.allOf.forEach(function(e){t(o,e,f,d)}),s.anyOf&&s.anyOf.length){var U=_("prev");s.anyOf.forEach(function(e,n){0===n?D("var %s = errors",U):D("if (errors !== %s) {",U)("errors = %s",U),t(o,e,!1,!1)}),s.anyOf.forEach(function(e,t){t&&D("}")}),D("if (%s !== errors) {",U),T("no schemas match"),D("}")}if(s.oneOf&&s.oneOf.length){var U=_("prev"),G=_("passes");D("var %s = errors",U)("var %s = 0",G),s.oneOf.forEach(function(e,n){t(o,e,!1,!1),D("if (%s === errors) {",U)("%s++",G)("} else {")("errors = %s",U)("}")}),D("if (%s !== 1) {",G),T("no (or more than one) schemas match"),D("}")}for(void 0!==s.multipleOf&&("number"!==b&&"integer"!==b&&D("if (%s) {",p.number(o)),D("if (!isMultipleOf(%s, %d)) {",o,s.multipleOf),T("has a remainder"),D("}"),"number"!==b&&"integer"!==b&&D("}")),void 0!==s.maxProperties&&("object"!==b&&D("if (%s) {",p.object(o)),D("if (Object.keys(%s).length > %d) {",o,s.maxProperties),T("has more properties than allowed"),D("}"),"object"!==b&&D("}")),void 0!==s.minProperties&&("object"!==b&&D("if (%s) {",p.object(o)),D("if (Object.keys(%s).length < %d) {",o,s.minProperties),T("has less properties than allowed"),D("}"),"object"!==b&&D("}")),void 0!==s.maxItems&&("array"!==b&&D("if (%s) {",p.array(o)),D("if (%s.length > %d) {",o,s.maxItems),T("has more items than allowed"),D("}"),"array"!==b&&D("}")),void 0!==s.minItems&&("array"!==b&&D("if (%s) {",p.array(o)),D("if (%s.length < %d) {",o,s.minItems),T("has less items than allowed"),D("}"),"array"!==b&&D("}")),void 0!==s.maxLength&&("string"!==b&&D("if (%s) {",p.string(o)),D("if (%s.length > %d) {",o,s.maxLength),T("has longer length than allowed"),D("}"),"string"!==b&&D("}")),void 0!==s.minLength&&("string"!==b&&D("if (%s) {",p.string(o)),D("if (%s.length < %d) {",o,s.minLength),T("has less length than allowed"),D("}"),"string"!==b&&D("}")),void 0!==s.minimum&&("number"!==b&&"integer"!==b&&D("if (%s) {",p.number(o)),D("if (%s %s %d) {",o,s.exclusiveMinimum?"<=":"<",s.minimum),T("is less than minimum"),D("}"),"number"!==b&&"integer"!==b&&D("}")),void 0!==s.maximum&&("number"!==b&&"integer"!==b&&D("if (%s) {",p.number(o)),D("if (%s %s %d) {",o,s.exclusiveMaximum?">=":">",s.maximum),T("is more than maximum"),D("}"),"number"!==b&&"integer"!==b&&D("}")),h&&Object.keys(h).forEach(function(e){Array.isArray(b)&&b.indexOf("null")!==-1&&D("if (%s !== null) {",o),t(i(o,e),h[e],f,d),Array.isArray(b)&&b.indexOf("null")!==-1&&D("}")});S--;)D("}")},D=o("function validate(data) {")("if (data === undefined) data = null")("validate.errors = null")("var errors = 0");return T("data",t,h,m&&m.filter),D("return errors === 0")("}"),D=D.toFunction(v),D.errors=null,Object.defineProperty&&Object.defineProperty(D,"error",{get:function(){return D.errors?D.errors.map(function(e){return e.field+" "+e.message}).join("\n"):""}}),D.toJSON=function(){return t},D};t.exports=function(e,t){return"string"==typeof e&&(e=JSON.parse(e)),h(e,{},e,!0,t)},t.exports.filter=function(e,n){var r=t.exports(e,s(n,{filter:!0}));return function(e){return r(e),e}}},{"./formats":40,"generate-function":35,"generate-object-property":36,jsonpointer:44,xtend:65}],42:[function(e,t,n){"use strict";function r(e){return/^[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/.test(e)}t.exports=r},{}],43:[function(e,t,n){"use strict";var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],44:[function(e,t,n){"use strict";function r(e){switch(e){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+e)}function i(e){return p.test(e)?e.replace(f,r):e}function o(e,t,n){for(var r,o,a=1,s=t.length;aa,"undefined"==typeof e[r]&&(Array.isArray(e)&&"-"===r&&(r=e.length),o&&(""!==t[a]&&t[a]<1/0||"-"===t[a]?e[r]=[]:e[r]={})),o);)e=e[r];var u=e[r];return void 0===n?delete e[r]:e[r]=n,u}function a(e){if("string"==typeof e){if(e=e.split("/"),""===e[0])return e;throw new Error("Invalid JSON pointer.")}if(Array.isArray(e))return e;throw new Error("Invalid JSON pointer.")}function s(e,t){if("object"!==("undefined"==typeof e?"undefined":l(e)))throw new Error("Invalid input object.");t=a(t);var n=t.length;if(1===n)return e;for(var r=1;r-1}function h(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function B(e,t){for(var n=e.length;n--&&S(t,e[n],0)>-1;);return n}function U(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}function V(e){return"\\"+nr[e]}function G(e,t){return null==e?ie:e[t]}function W(e){return qn.test(e)}function Q(e){return $n.test(e)}function H(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function z(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function q(e,t){return function(n){return e(t(n))}}function $(e,t){for(var n=-1,r=e.length,i=0,o=[];++n>>1,Ve=[["ary",Se],["bind",ve],["bindKey",ye],["curry",be],["curryRight",_e],["flip",Te],["partial",we],["partialRight",Ee],["rearg",Ce]],Ge="[object Arguments]",We="[object Array]",Qe="[object AsyncFunction]",He="[object Boolean]",ze="[object Date]",qe="[object DOMException]",$e="[object Error]",Xe="[object Function]",Ke="[object GeneratorFunction]",Je="[object Map]",Ye="[object Number]",Ze="[object Null]",et="[object Object]",tt="[object Promise]",nt="[object Proxy]",rt="[object RegExp]",it="[object Set]",ot="[object String]",at="[object Symbol]",st="[object Undefined]",ut="[object WeakMap]",ct="[object WeakSet]",lt="[object ArrayBuffer]",pt="[object DataView]",ft="[object Float32Array]",dt="[object Float64Array]",ht="[object Int8Array]",mt="[object Int16Array]",gt="[object Int32Array]",vt="[object Uint8Array]",yt="[object Uint8ClampedArray]",xt="[object Uint16Array]",bt="[object Uint32Array]",_t=/\b__p \+= '';/g,wt=/\b(__p \+=) '' \+/g,Et=/(__e\(.*?\)|\b__t\)) \+\n'';/g,St=/&(?:amp|lt|gt|quot|#39);/g,Ct=/[&<>"']/g,Tt=RegExp(St.source),Dt=RegExp(Ct.source),At=/<%-([\s\S]+?)%>/g,Pt=/<%([\s\S]+?)%>/g,kt=/<%=([\s\S]+?)%>/g,It=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ft=/^\w*$/,Ot=/^\./,Nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jt=/[\\^$.*+?()[\]{}|]/g,Rt=RegExp(jt.source),Lt=/^\s+|\s+$/g,Mt=/^\s+/,Bt=/\s+$/,Ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Vt=/\{\n\/\* \[wrapped with (.+)\] \*/,Gt=/,? & /,Wt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Qt=/\\(\\)?/g,Ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zt=/\w*$/,qt=/^[-+]0x[0-9a-f]+$/i,$t=/^0b[01]+$/i,Xt=/^\[object .+?Constructor\]$/,Kt=/^0o[0-7]+$/i,Jt=/^(?:0|[1-9]\d*)$/,Yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Zt=/($^)/,en=/['\n\r\u2028\u2029\\]/g,tn="\\ud800-\\udfff",nn="\\u0300-\\u036f",rn="\\ufe20-\\ufe2f",on="\\u20d0-\\u20ff",an=nn+rn+on,sn="\\u2700-\\u27bf",un="a-z\\xdf-\\xf6\\xf8-\\xff",cn="\\xac\\xb1\\xd7\\xf7",ln="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pn="\\u2000-\\u206f",fn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",dn="A-Z\\xc0-\\xd6\\xd8-\\xde",hn="\\ufe0e\\ufe0f",mn=cn+ln+pn+fn,gn="['’]",vn="["+tn+"]",yn="["+mn+"]",xn="["+an+"]",bn="\\d+",_n="["+sn+"]",wn="["+un+"]",En="[^"+tn+mn+bn+sn+un+dn+"]",Sn="\\ud83c[\\udffb-\\udfff]",Cn="(?:"+xn+"|"+Sn+")",Tn="[^"+tn+"]",Dn="(?:\\ud83c[\\udde6-\\uddff]){2}",An="[\\ud800-\\udbff][\\udc00-\\udfff]",Pn="["+dn+"]",kn="\\u200d",In="(?:"+wn+"|"+En+")",Fn="(?:"+Pn+"|"+En+")",On="(?:"+gn+"(?:d|ll|m|re|s|t|ve))?",Nn="(?:"+gn+"(?:D|LL|M|RE|S|T|VE))?",jn=Cn+"?",Rn="["+hn+"]?",Ln="(?:"+kn+"(?:"+[Tn,Dn,An].join("|")+")"+Rn+jn+")*",Mn="\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",Bn="\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)",Un=Rn+jn+Ln,Vn="(?:"+[_n,Dn,An].join("|")+")"+Un,Gn="(?:"+[Tn+xn+"?",xn,Dn,An,vn].join("|")+")",Wn=RegExp(gn,"g"),Qn=RegExp(xn,"g"),Hn=RegExp(Sn+"(?="+Sn+")|"+Gn+Un,"g"),zn=RegExp([Pn+"?"+wn+"+"+On+"(?="+[yn,Pn,"$"].join("|")+")",Fn+"+"+Nn+"(?="+[yn,Pn+In,"$"].join("|")+")",Pn+"?"+In+"+"+On,Pn+"+"+Nn,Bn,Mn,bn,Vn].join("|"),"g"),qn=RegExp("["+kn+tn+an+hn+"]"),$n=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Kn=-1,Jn={}; Jn[ft]=Jn[dt]=Jn[ht]=Jn[mt]=Jn[gt]=Jn[vt]=Jn[yt]=Jn[xt]=Jn[bt]=!0,Jn[Ge]=Jn[We]=Jn[lt]=Jn[He]=Jn[pt]=Jn[ze]=Jn[$e]=Jn[Xe]=Jn[Je]=Jn[Ye]=Jn[et]=Jn[rt]=Jn[it]=Jn[ot]=Jn[ut]=!1;var Yn={};Yn[Ge]=Yn[We]=Yn[lt]=Yn[pt]=Yn[He]=Yn[ze]=Yn[ft]=Yn[dt]=Yn[ht]=Yn[mt]=Yn[gt]=Yn[Je]=Yn[Ye]=Yn[et]=Yn[rt]=Yn[it]=Yn[ot]=Yn[at]=Yn[vt]=Yn[yt]=Yn[xt]=Yn[bt]=!0,Yn[$e]=Yn[Xe]=Yn[ut]=!1;var Zn={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},er={"&":"&","<":"<",">":">",'"':""","'":"'"},tr={"&":"&","<":"<",">":">",""":'"',"'":"'"},nr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},rr=parseFloat,ir=parseInt,or="object"==("undefined"==typeof e?"undefined":i(e))&&e&&e.Object===Object&&e,ar="object"==("undefined"==typeof self?"undefined":i(self))&&self&&self.Object===Object&&self,sr=or||ar||Function("return this")(),ur="object"==("undefined"==typeof r?"undefined":i(r))&&r&&!r.nodeType&&r,cr=ur&&"object"==("undefined"==typeof n?"undefined":i(n))&&n&&!n.nodeType&&n,lr=cr&&cr.exports===ur,pr=lr&&or.process,fr=function(){try{return pr&&pr.binding&&pr.binding("util")}catch(e){}}(),dr=fr&&fr.isArrayBuffer,hr=fr&&fr.isDate,mr=fr&&fr.isMap,gr=fr&&fr.isRegExp,vr=fr&&fr.isSet,yr=fr&&fr.isTypedArray,xr=A("length"),br=P(Zn),_r=P(er),wr=P(tr),Er=function e(t){function n(e){if(lu(e)&&!wf(e)&&!(e instanceof P)){if(e instanceof b)return e;if(_l.call(e,"__wrapped__"))return sa(e)}return new b(e)}function r(){}function b(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=ie}function P(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Me,this.__views__=[]}function J(){var e=new P(this.__wrapped__);return e.__actions__=Vi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Vi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Vi(this.__views__),e}function te(){if(this.__filtered__){var e=new P(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function ne(){var e=this.__wrapped__.value(),t=this.__dir__,n=wf(e),r=t<0,i=n?e.length:0,o=Io(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,p=l.length,f=0,d=Jl(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return wi(e,this.__actions__);var h=[];e:for(;u--&&f-1}function fn(e,t){var n=this.__data__,r=Nn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function dn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Vn(e,t,n,r,i,o){var a,s=t&fe,u=t&de,l=t&he;if(n&&(a=i?n(e,r,i,o):n(e)),a!==ie)return a;if(!cu(e))return e;var p=wf(e);if(p){if(a=No(e),!s)return Vi(e,a)}else{var f=Ip(e),d=f==Xe||f==Ke;if(Sf(e))return Pi(e,s);if(f==et||f==Ge||d&&!i){if(a=u||d?{}:jo(e),!s)return u?Qi(e,Ln(a,e)):Wi(e,Rn(a,e))}else{if(!Yn[f])return i?e:{};a=Ro(e,f,Vn,s)}}o||(o=new wn);var h=o.get(e);if(h)return h;o.set(e,a);var m=l?u?Eo:wo:u?zu:Hu,g=p?ie:m(e);return c(g||e,function(r,i){g&&(i=r,r=e[i]),On(a,i,Vn(r,t,n,i,e,o))}),a}function Gn(e){var t=Hu(e);return function(n){return Hn(n,e,t)}}function Hn(e,t,n){var r=n.length;if(null==e)return!r;for(e=fl(e);r--;){var i=n[r],o=t[i],a=e[i];if(a===ie&&!(i in e)||!o(a))return!1}return!0}function zn(e,t,n){if("function"!=typeof e)throw new ml(ue);return Np(function(){e.apply(ie,n)},t)}function qn(e,t,n,r){var i=-1,o=d,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=m(t,j(n))),r?(o=h,a=!1):t.length>=ae&&(o=L,a=!1,t=new xn(t));e:for(;++ii?0:i+n),r=r===ie||r>i?i:Du(r),r<0&&(r+=i),r=n>r?0:Au(r);n0&&n(s)?t>1?nr(s,t-1,n,r,i):g(i,s):r||(i[i.length]=s)}return i}function or(e,t){return e&&_p(e,t,Hu)}function ar(e,t){return e&&wp(e,t,Hu)}function ur(e,t){return f(t,function(t){return au(e[t])})}function cr(e,t){t=Di(t,e);for(var n=0,r=t.length;null!=e&&nt}function Er(e,t){return null!=e&&_l.call(e,t)}function Cr(e,t){return null!=e&&t in fl(e)}function Tr(e,t,n){return e>=Jl(t,n)&&e=120&&l.length>=120)?new xn(a&&l):ie}l=e[0];var p=-1,f=s[0];e:for(;++p-1;)s!==e&&jl.call(s,u,1),jl.call(e,u,1);return e}function ni(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;Bo(i)?jl.call(e,i,1):xi(e,i)}}return e}function ri(e,t){return e+Ql(ep()*(t-e+1))}function ii(e,t,n,r){for(var i=-1,o=Kl(Wl((t-e)/(n||1)),0),a=sl(o);o--;)a[r?o:++i]=e,e+=n;return a}function oi(e,t){var n="";if(!e||t<1||t>je)return n;do t%2&&(n+=e),t=Ql(t/2),t&&(e+=e);while(t);return n}function ai(e,t){return jp(Yo(e,t,jc),e+"")}function si(e){return Pn(ic(e))}function ui(e,t){var n=ic(e);return ra(n,Un(t,0,n.length))}function ci(e,t,n,r){if(!cu(e))return e;t=Di(t,e);for(var i=-1,o=t.length,a=o-1,s=e;null!=s&&++ii?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=sl(i);++r>>1,a=e[o];null!==a&&!_u(a)&&(n?a<=t:a=ae){var c=t?null:Dp(e);if(c)return X(c);a=!1,i=L,u=new xn}else u=t?[]:s;e:for(;++r=r?e:pi(e,t,n)}function Pi(e,t){if(t)return e.slice();var n=e.length,r=Il?Il(n):new e.constructor(n);return e.copy(r),r}function ki(e){var t=new e.constructor(e.byteLength);return new kl(t).set(new kl(e)),t}function Ii(e,t){var n=t?ki(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Fi(e,t,n){var r=t?n(z(e),fe):z(e);return v(r,o,new e.constructor)}function Oi(e){var t=new e.constructor(e.source,zt.exec(e));return t.lastIndex=e.lastIndex,t}function Ni(e,t,n){var r=t?n(X(e),fe):X(e);return v(r,a,new e.constructor)}function ji(e){return gp?fl(gp.call(e)):{}}function Ri(e,t){var n=t?ki(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Li(e,t){if(e!==t){var n=e!==ie,r=null===e,i=e===e,o=_u(e),a=t!==ie,s=null===t,u=t===t,c=_u(t);if(!s&&!c&&!o&&e>t||o&&a&&u&&!s&&!c||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!c&&e=s)return u;var c=n[r];return u*("desc"==c?-1:1)}}return e.index-t.index}function Bi(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,u=t.length,c=Kl(o-a,0),l=sl(u+c),p=!r;++s1?n[i-1]:ie,a=i>2?n[2]:ie;for(o=e.length>3&&"function"==typeof o?(i--,o):ie,a&&Uo(n[0],n[1],a)&&(o=i<3?ie:o,i=1),t=fl(t);++r-1?i[o?t[a]:a]:ie}}function to(e){return _o(function(t){var n=t.length,r=n,i=b.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new ml(ue);if(i&&!a&&"wrapper"==So(o))var a=new b([],!0)}for(r=a?r:n;++r1&&y.reverse(),p&&us))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var l=-1,p=!0,f=n&ge?new xn:ie;for(o.set(e,t),o.set(t,e);++l1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Ut,"{\n/* [wrapped with "+t+"] */\n")}function Mo(e){return wf(e)||_f(e)||!!(Rl&&e&&e[Rl])}function Bo(e,t){return t=null==t?je:t,!!t&&("number"==typeof e||Jt.test(e))&&e>-1&&e%1==0&&e0){if(++t>=Pe)return arguments[0]}else t=0;return e.apply(ie,arguments)}}function ra(e,t){var n=-1,r=e.length,i=r-1;for(t=t===ie?r:t;++n=this.__values__.length,t=e?ie:this.__values__[this.__index__++];return{done:e,value:t}}function ss(){return this}function us(e){for(var t,n=this;n instanceof r;){var i=sa(n);i.__index__=0,i.__values__=ie,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t}function cs(){var e=this.__wrapped__;if(e instanceof P){var t=e;return this.__actions__.length&&(t=new P(this)),t=t.reverse(),t.__actions__.push({func:rs,args:[Oa],thisArg:ie}),new b(t,this.__chain__)}return this.thru(Oa)}function ls(){return wi(this.__wrapped__,this.__actions__)}function ps(e,t,n){var r=wf(e)?p:$n;return n&&Uo(e,t,n)&&(t=ie),r(e,To(t,3))}function fs(e,t){var n=wf(e)?f:tr;return n(e,To(t,3))}function ds(e,t){return nr(xs(e,t),1)}function hs(e,t){return nr(xs(e,t),Ne)}function ms(e,t,n){return n=n===ie?1:Du(n),nr(xs(e,t),n)}function gs(e,t){var n=wf(e)?c:xp;return n(e,To(t,3))}function vs(e,t){var n=wf(e)?l:bp;return n(e,To(t,3))}function ys(e,t,n,r){e=Js(e)?e:ic(e),n=n&&!r?Du(n):0;var i=e.length;return n<0&&(n=Kl(i+n,0)),bu(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&S(e,t,n)>-1}function xs(e,t){var n=wf(e)?m:Hr;return n(e,To(t,3))}function bs(e,t,n,r){return null==e?[]:(wf(t)||(t=null==t?[]:[t]),n=r?ie:n,wf(n)||(n=null==n?[]:[n]),Jr(e,t,n))}function _s(e,t,n){var r=wf(e)?v:k,i=arguments.length<3;return r(e,To(t,4),n,i,xp)}function ws(e,t,n){var r=wf(e)?y:k,i=arguments.length<3;return r(e,To(t,4),n,i,bp)}function Es(e,t){var n=wf(e)?f:tr;return n(e,Ls(To(t,3)))}function Ss(e){var t=wf(e)?Pn:si;return t(e)}function Cs(e,t,n){t=(n?Uo(e,t,n):t===ie)?1:Du(t);var r=wf(e)?kn:ui;return r(e,t)}function Ts(e){var t=wf(e)?In:li;return t(e)}function Ds(e){if(null==e)return 0;if(Js(e))return bu(e)?Z(e):e.length;var t=Ip(e);return t==Je||t==it?e.size:Gr(e).length}function As(e,t,n){var r=wf(e)?x:fi;return n&&Uo(e,t,n)&&(t=ie),r(e,To(t,3))}function Ps(e,t){if("function"!=typeof t)throw new ml(ue);return e=Du(e),function(){if(--e<1)return t.apply(this,arguments)}}function ks(e,t,n){return t=n?ie:t,t=e&&null==t?e.length:t,ho(e,Se,ie,ie,ie,ie,t)}function Is(e,t){var n;if("function"!=typeof t)throw new ml(ue);return e=Du(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=ie),n}}function Fs(e,t,n){t=n?ie:t;var r=ho(e,be,ie,ie,ie,ie,ie,t);return r.placeholder=Fs.placeholder,r}function Os(e,t,n){t=n?ie:t;var r=ho(e,_e,ie,ie,ie,ie,ie,t);return r.placeholder=Os.placeholder,r}function Ns(e,t,n){function r(t){var n=f,r=d;return f=d=ie,y=t,m=e.apply(r,n)}function i(e){return y=e,g=Np(s,t),x?r(e):m}function o(e){var n=e-v,r=e-y,i=t-n;return b?Jl(i,h-r):i}function a(e){var n=e-v,r=e-y;return v===ie||n>=t||n<0||b&&r>=h}function s(){var e=lf();return a(e)?u(e):void(g=Np(s,o(e)))}function u(e){return g=ie,_&&f?r(e):(f=d=ie,m)}function c(){g!==ie&&Tp(g),y=0,f=v=d=g=ie}function l(){return g===ie?m:u(lf())}function p(){var e=lf(),n=a(e);if(f=arguments,d=this,v=e,n){if(g===ie)return i(v);if(b)return g=Np(s,t),r(v)}return g===ie&&(g=Np(s,t)),m}var f,d,h,m,g,v,y=0,x=!1,b=!1,_=!0;if("function"!=typeof e)throw new ml(ue);return t=Pu(t)||0,cu(n)&&(x=!!n.leading,b="maxWait"in n,h=b?Kl(Pu(n.maxWait)||0,t):h,_="trailing"in n?!!n.trailing:_),p.cancel=c,p.flush=l,p}function js(e){return ho(e,Te)}function Rs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ml(ue);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Rs.Cache||dn),n}function Ls(e){if("function"!=typeof e)throw new ml(ue);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Ms(e){return Is(2,e)}function Bs(e,t){if("function"!=typeof e)throw new ml(ue);return t=t===ie?t:Du(t),ai(e,t)}function Us(e,t){if("function"!=typeof e)throw new ml(ue);return t=null==t?0:Kl(Du(t),0),ai(function(n){var r=n[t],i=Ai(n,0,t);return r&&g(i,r),s(e,this,i)})}function Vs(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ml(ue);return cu(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ns(e,t,{leading:r,maxWait:t,trailing:i})}function Gs(e){return ks(e,1)}function Ws(e,t){return gf(Ti(t),e)}function Qs(){if(!arguments.length)return[];var e=arguments[0];return wf(e)?e:[e]}function Hs(e){return Vn(e,he)}function zs(e,t){return t="function"==typeof t?t:ie,Vn(e,he,t)}function qs(e){return Vn(e,fe|he)}function $s(e,t){return t="function"==typeof t?t:ie,Vn(e,fe|he,t)}function Xs(e,t){return null==t||Hn(e,t,Hu(t))}function Ks(e,t){return e===t||e!==e&&t!==t}function Js(e){return null!=e&&uu(e.length)&&!au(e)}function Ys(e){return lu(e)&&Js(e)}function Zs(e){return e===!0||e===!1||lu(e)&&fr(e)==He}function eu(e){return lu(e)&&1===e.nodeType&&!yu(e)}function tu(e){if(null==e)return!0;if(Js(e)&&(wf(e)||"string"==typeof e||"function"==typeof e.splice||Sf(e)||Pf(e)||_f(e)))return!e.length;var t=Ip(e);if(t==Je||t==it)return!e.size;if(Ho(e))return!Gr(e).length;for(var n in e)if(_l.call(e,n))return!1;return!0}function nu(e,t){return Or(e,t)}function ru(e,t,n){n="function"==typeof n?n:ie;var r=n?n(e,t):ie;return r===ie?Or(e,t,ie,n):!!r}function iu(e){if(!lu(e))return!1;var t=fr(e);return t==$e||t==qe||"string"==typeof e.message&&"string"==typeof e.name&&!yu(e)}function ou(e){return"number"==typeof e&&ql(e)}function au(e){if(!cu(e))return!1;var t=fr(e);return t==Xe||t==Ke||t==Qe||t==nt}function su(e){return"number"==typeof e&&e==Du(e)}function uu(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=je}function cu(e){var t="undefined"==typeof e?"undefined":i(e);return null!=e&&("object"==t||"function"==t)}function lu(e){return null!=e&&"object"==("undefined"==typeof e?"undefined":i(e))}function pu(e,t){return e===t||Rr(e,t,Ao(t))}function fu(e,t,n){return n="function"==typeof n?n:ie,Rr(e,t,Ao(t),n)}function du(e){return vu(e)&&e!=+e}function hu(e){if(Fp(e))throw new cl(se);return Lr(e)}function mu(e){return null===e}function gu(e){return null==e}function vu(e){return"number"==typeof e||lu(e)&&fr(e)==Ye}function yu(e){if(!lu(e)||fr(e)!=et)return!1;var t=Fl(e);if(null===t)return!0;var n=_l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&bl.call(n)==Cl}function xu(e){return su(e)&&e>=-je&&e<=je}function bu(e){return"string"==typeof e||!wf(e)&&lu(e)&&fr(e)==ot}function _u(e){return"symbol"==("undefined"==typeof e?"undefined":i(e))||lu(e)&&fr(e)==at}function wu(e){return e===ie}function Eu(e){return lu(e)&&Ip(e)==ut}function Su(e){return lu(e)&&fr(e)==ct}function Cu(e){if(!e)return[];if(Js(e))return bu(e)?ee(e):Vi(e);if(Ll&&e[Ll])return H(e[Ll]());var t=Ip(e),n=t==Je?z:t==it?X:ic;return n(e)}function Tu(e){if(!e)return 0===e?e:0;if(e=Pu(e),e===Ne||e===-Ne){var t=e<0?-1:1;return t*Re}return e===e?e:0}function Du(e){var t=Tu(e),n=t%1;return t===t?n?t-n:t:0}function Au(e){return e?Un(Du(e),0,Me):0}function Pu(e){if("number"==typeof e)return e;if(_u(e))return Le;if(cu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=cu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Lt,"");var n=$t.test(e);return n||Kt.test(e)?ir(e.slice(2),n?2:8):qt.test(e)?Le:+e}function ku(e){return Gi(e,zu(e))}function Iu(e){return e?Un(Du(e),-je,je):0===e?e:0}function Fu(e){return null==e?"":vi(e)}function Ou(e,t){var n=yp(e);return null==t?n:Rn(n,t)}function Nu(e,t){return w(e,To(t,3),or)}function ju(e,t){return w(e,To(t,3),ar)}function Ru(e,t){return null==e?e:_p(e,To(t,3),zu)}function Lu(e,t){return null==e?e:wp(e,To(t,3),zu)}function Mu(e,t){return e&&or(e,To(t,3))}function Bu(e,t){return e&&ar(e,To(t,3))}function Uu(e){return null==e?[]:ur(e,Hu(e))}function Vu(e){return null==e?[]:ur(e,zu(e))}function Gu(e,t,n){var r=null==e?ie:cr(e,t);return r===ie?n:r}function Wu(e,t){return null!=e&&Oo(e,t,Er)}function Qu(e,t){return null!=e&&Oo(e,t,Cr)}function Hu(e){return Js(e)?An(e):Gr(e)}function zu(e){return Js(e)?An(e,!0):Wr(e)}function qu(e,t){var n={};return t=To(t,3),or(e,function(e,r,i){Mn(n,t(e,r,i),e)}),n}function $u(e,t){var n={};return t=To(t,3),or(e,function(e,r,i){Mn(n,r,t(e,r,i))}),n}function Xu(e,t){return Ku(e,Ls(To(t)))}function Ku(e,t){if(null==e)return{};var n=m(Eo(e),function(e){return[e]});return t=To(t),Zr(e,n,function(e,n){return t(e,n[0])})}function Ju(e,t,n){t=Di(t,e);var r=-1,i=t.length;for(i||(i=1,e=ie);++rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=ep();return Jl(e+i*(t-e+rr("1e-"+((i+"").length-1))),t)}return ri(e,t)}function cc(e){return td(Fu(e).toLowerCase())}function lc(e){return e=Fu(e),e&&e.replace(Yt,br).replace(Qn,"")}function pc(e,t,n){e=Fu(e),t=vi(t);var r=e.length;n=n===ie?r:Un(Du(n),0,r);var i=n;return n-=t.length,n>=0&&e.slice(n,i)==t}function fc(e){return e=Fu(e),e&&Dt.test(e)?e.replace(Ct,_r):e}function dc(e){return e=Fu(e),e&&Rt.test(e)?e.replace(jt,"\\$&"):e}function hc(e,t,n){e=Fu(e),t=Du(t);var r=t?Z(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return ao(Ql(i),n)+e+ao(Wl(i),n)}function mc(e,t,n){e=Fu(e),t=Du(t);var r=t?Z(e):0;return t&&r>>0)?(e=Fu(e),e&&("string"==typeof t||null!=t&&!Df(t))&&(t=vi(t),!t&&W(e))?Ai(ee(e),0,n):e.split(t,n)):[]}function _c(e,t,n){return e=Fu(e),n=null==n?0:Un(Du(n),0,e.length),t=vi(t),e.slice(n,n+t.length)==t}function wc(e,t,r){var i=n.templateSettings;r&&Uo(e,t,r)&&(t=ie),e=Fu(e),t=Nf({},t,i,mo);var o,a,s=Nf({},t.imports,i.imports,mo),u=Hu(s),c=R(s,u),l=0,p=t.interpolate||Zt,f="__p += '",d=dl((t.escape||Zt).source+"|"+p.source+"|"+(p===kt?Ht:Zt).source+"|"+(t.evaluate||Zt).source+"|$","g"),h="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++Kn+"]")+"\n";e.replace(d,function(t,n,r,i,s,u){return r||(r=i),f+=e.slice(l,u).replace(en,V),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t}),f+="';\n";var m=t.variable;m||(f="with (obj) {\n"+f+"\n}\n"),f=(a?f.replace(_t,""):f).replace(wt,"$1").replace(Et,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=nd(function(){return ll(u,h+"return "+f).apply(ie,c)});if(g.source=f,iu(g))throw g;return g}function Ec(e){return Fu(e).toLowerCase()}function Sc(e){return Fu(e).toUpperCase()}function Cc(e,t,n){if(e=Fu(e),e&&(n||t===ie))return e.replace(Lt,"");if(!e||!(t=vi(t)))return e;var r=ee(e),i=ee(t),o=M(r,i),a=B(r,i)+1;return Ai(r,o,a).join("")}function Tc(e,t,n){if(e=Fu(e),e&&(n||t===ie))return e.replace(Bt,"");if(!e||!(t=vi(t)))return e;var r=ee(e),i=B(r,ee(t))+1;return Ai(r,0,i).join("")}function Dc(e,t,n){if(e=Fu(e),e&&(n||t===ie))return e.replace(Mt,"");if(!e||!(t=vi(t)))return e;var r=ee(e),i=M(r,ee(t));return Ai(r,i).join("")}function Ac(e,t){var n=De,r=Ae;if(cu(t)){var i="separator"in t?t.separator:i;n="length"in t?Du(t.length):n,r="omission"in t?vi(t.omission):r}e=Fu(e);var o=e.length;if(W(e)){var a=ee(e);o=a.length}if(n>=o)return e;var s=n-Z(r);if(s<1)return r;var u=a?Ai(a,0,s).join(""):e.slice(0,s);if(i===ie)return u+r;if(a&&(s+=u.length-s),Df(i)){if(e.slice(s).search(i)){var c,l=u;for(i.global||(i=dl(i.source,Fu(zt.exec(i))+"g")),i.lastIndex=0;c=i.exec(l);)var p=c.index;u=u.slice(0,p===ie?s:p)}}else if(e.indexOf(vi(i),s)!=s){var f=u.lastIndexOf(i);f>-1&&(u=u.slice(0,f))}return u+r}function Pc(e){return e=Fu(e),e&&Tt.test(e)?e.replace(St,wr):e}function kc(e,t,n){return e=Fu(e),t=n?ie:t,t===ie?Q(e)?re(e):_(e):e.match(t)||[]}function Ic(e){var t=null==e?0:e.length,n=To();return e=t?m(e,function(e){if("function"!=typeof e[1])throw new ml(ue);return[n(e[0]),e[1]]}):[],ai(function(n){for(var r=-1;++rje)return[];var n=Me,r=Jl(e,Me);t=To(t),e-=Me;for(var i=O(r,t);++n1?e[t-1]:ie;return n="function"==typeof n?(e.pop(),n):ie,Ya(e,n)}),ef=_o(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Bn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof P&&Bo(n)?(r=r.slice(n,+n+(t?1:0)),r.__actions__.push({func:rs,args:[i],thisArg:ie}),new b(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(ie),e})):this.thru(i)}),tf=Hi(function(e,t,n){_l.call(e,n)?++e[n]:Mn(e,n,1)}),nf=eo(ga),rf=eo(va),of=Hi(function(e,t,n){_l.call(e,n)?e[n].push(t):Mn(e,n,[t])}),af=ai(function(e,t,n){var r=-1,i="function"==typeof t,o=Js(e)?sl(e.length):[];return xp(e,function(e){o[++r]=i?s(t,e,n):Pr(e,t,n)}),o}),sf=Hi(function(e,t,n){Mn(e,n,t)}),uf=Hi(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),cf=ai(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Uo(e,t[0],t[1])?t=[]:n>2&&Uo(t[0],t[1],t[2])&&(t=[t[0]]),Jr(e,nr(t,1),[])}),lf=Vl||function(){return sr.Date.now()},pf=ai(function(e,t,n){var r=ve;if(n.length){var i=$(n,Co(pf));r|=we}return ho(e,r,t,n,i)}),ff=ai(function(e,t,n){var r=ve|ye;if(n.length){var i=$(n,Co(ff));r|=we}return ho(t,r,e,n,i)}),df=ai(function(e,t){return zn(e,1,t)}),hf=ai(function(e,t,n){return zn(e,Pu(t)||0,n)});Rs.Cache=dn;var mf=Cp(function(e,t){t=1==t.length&&wf(t[0])?m(t[0],j(To())):m(nr(t,1),j(To()));var n=t.length;return ai(function(r){for(var i=-1,o=Jl(r.length,n);++i=t}),_f=kr(function(){return arguments}())?kr:function(e){return lu(e)&&_l.call(e,"callee")&&!Nl.call(e,"callee")},wf=sl.isArray,Ef=dr?j(dr):Ir,Sf=zl||zc,Cf=hr?j(hr):Fr,Tf=mr?j(mr):jr,Df=gr?j(gr):Mr,Af=vr?j(vr):Br,Pf=yr?j(yr):Ur,kf=co(Qr),If=co(function(e,t){return e<=t}),Ff=zi(function(e,t){if(Ho(t)||Js(t))return void Gi(t,Hu(t),e);for(var n in t)_l.call(t,n)&&On(e,n,t[n])}),Of=zi(function(e,t){Gi(t,zu(t),e)}),Nf=zi(function(e,t,n,r){Gi(t,zu(t),e,r)}),jf=zi(function(e,t,n,r){Gi(t,Hu(t),e,r)}),Rf=_o(Bn),Lf=ai(function(e){return e.push(ie,mo),s(Nf,ie,e)}),Mf=ai(function(e){return e.push(ie,go),s(Wf,ie,e)}),Bf=ro(function(e,t,n){e[t]=n},Oc(jc)),Uf=ro(function(e,t,n){_l.call(e,t)?e[t].push(n):e[t]=[n]},To),Vf=ai(Pr),Gf=zi(function(e,t,n){$r(e,t,n)}),Wf=zi(function(e,t,n,r){$r(e,t,n,r)}),Qf=_o(function(e,t){var n={};if(null==e)return n;var r=!1;t=m(t,function(t){return t=Di(t,e),r||(r=t.length>1),t}),Gi(e,Eo(e),n),r&&(n=Vn(n,fe|de|he,vo));for(var i=t.length;i--;)xi(n,t[i]);return n}),Hf=_o(function(e,t){return null==e?{}:Yr(e,t)}),zf=fo(Hu),qf=fo(zu),$f=Ji(function(e,t,n){return t=t.toLowerCase(),e+(n?cc(t):t)}),Xf=Ji(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Kf=Ji(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Jf=Ki("toLowerCase"),Yf=Ji(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Zf=Ji(function(e,t,n){return e+(n?" ":"")+td(t)}),ed=Ji(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),td=Ki("toUpperCase"),nd=ai(function(e,t){try{return s(e,ie,t)}catch(e){return iu(e)?e:new cl(e)}}),rd=_o(function(e,t){return c(t,function(t){t=ia(t),Mn(e,t,pf(e[t],e))}),e}),id=to(),od=to(!0),ad=ai(function(e,t){return function(n){return Pr(n,e,t)}}),sd=ai(function(e,t){return function(n){return Pr(e,n,t)}}),ud=oo(m),cd=oo(p),ld=oo(x),pd=uo(),fd=uo(!0),dd=io(function(e,t){return e+t},0),hd=po("ceil"),md=io(function(e,t){return e/t},1),gd=po("floor"),vd=io(function(e,t){return e*t},1),yd=po("round"),xd=io(function(e,t){return e-t},0);return n.after=Ps,n.ary=ks,n.assign=Ff,n.assignIn=Of,n.assignInWith=Nf,n.assignWith=jf,n.at=Rf,n.before=Is,n.bind=pf,n.bindAll=rd,n.bindKey=ff,n.castArray=Qs,n.chain=ts,n.chunk=ua,n.compact=ca,n.concat=la,n.cond=Ic,n.conforms=Fc,n.constant=Oc,n.countBy=tf,n.create=Ou,n.curry=Fs,n.curryRight=Os,n.debounce=Ns,n.defaults=Lf,n.defaultsDeep=Mf,n.defer=df,n.delay=hf,n.difference=Lp,n.differenceBy=Mp,n.differenceWith=Bp,n.drop=pa,n.dropRight=fa,n.dropRightWhile=da,n.dropWhile=ha,n.fill=ma,n.filter=fs,n.flatMap=ds,n.flatMapDeep=hs,n.flatMapDepth=ms,n.flatten=ya,n.flattenDeep=xa,n.flattenDepth=ba,n.flip=js,n.flow=id,n.flowRight=od,n.fromPairs=_a,n.functions=Uu,n.functionsIn=Vu,n.groupBy=of,n.initial=Sa,n.intersection=Up,n.intersectionBy=Vp,n.intersectionWith=Gp,n.invert=Bf,n.invertBy=Uf,n.invokeMap=af,n.iteratee=Rc,n.keyBy=sf,n.keys=Hu,n.keysIn=zu,n.map=xs,n.mapKeys=qu,n.mapValues=$u,n.matches=Lc,n.matchesProperty=Mc,n.memoize=Rs,n.merge=Gf,n.mergeWith=Wf,n.method=ad,n.methodOf=sd,n.mixin=Bc,n.negate=Ls,n.nthArg=Gc,n.omit=Qf,n.omitBy=Xu,n.once=Ms,n.orderBy=bs,n.over=ud,n.overArgs=mf,n.overEvery=cd,n.overSome=ld,n.partial=gf,n.partialRight=vf,n.partition=uf,n.pick=Hf,n.pickBy=Ku,n.property=Wc,n.propertyOf=Qc,n.pull=Wp,n.pullAll=Pa,n.pullAllBy=ka,n.pullAllWith=Ia,n.pullAt=Qp,n.range=pd,n.rangeRight=fd,n.rearg=yf,n.reject=Es,n.remove=Fa,n.rest=Bs,n.reverse=Oa,n.sampleSize=Cs,n.set=Yu,n.setWith=Zu,n.shuffle=Ts,n.slice=Na,n.sortBy=cf,n.sortedUniq=Va,n.sortedUniqBy=Ga,n.split=bc,n.spread=Us,n.tail=Wa,n.take=Qa,n.takeRight=Ha,n.takeRightWhile=za,n.takeWhile=qa,n.tap=ns,n.throttle=Vs,n.thru=rs,n.toArray=Cu,n.toPairs=zf,n.toPairsIn=qf,n.toPath=Jc,n.toPlainObject=ku,n.transform=ec,n.unary=Gs,n.union=Hp,n.unionBy=zp,n.unionWith=qp,n.uniq=$a,n.uniqBy=Xa,n.uniqWith=Ka,n.unset=tc,n.unzip=Ja,n.unzipWith=Ya,n.update=nc,n.updateWith=rc,n.values=ic,n.valuesIn=oc,n.without=$p,n.words=kc,n.wrap=Ws,n.xor=Xp,n.xorBy=Kp,n.xorWith=Jp,n.zip=Yp,n.zipObject=Za,n.zipObjectDeep=es,n.zipWith=Zp,n.entries=zf,n.entriesIn=qf,n.extend=Of,n.extendWith=Nf,Bc(n,n),n.add=dd,n.attempt=nd,n.camelCase=$f,n.capitalize=cc,n.ceil=hd,n.clamp=ac,n.clone=Hs,n.cloneDeep=qs,n.cloneDeepWith=$s,n.cloneWith=zs,n.conformsTo=Xs,n.deburr=lc,n.defaultTo=Nc,n.divide=md,n.endsWith=pc,n.eq=Ks,n.escape=fc,n.escapeRegExp=dc,n.every=ps,n.find=nf,n.findIndex=ga,n.findKey=Nu,n.findLast=rf,n.findLastIndex=va,n.findLastKey=ju,n.floor=gd,n.forEach=gs,n.forEachRight=vs,n.forIn=Ru,n.forInRight=Lu,n.forOwn=Mu,n.forOwnRight=Bu,n.get=Gu,n.gt=xf,n.gte=bf,n.has=Wu,n.hasIn=Qu,n.head=wa,n.identity=jc,n.includes=ys,n.indexOf=Ea,n.inRange=sc,n.invoke=Vf,n.isArguments=_f,n.isArray=wf,n.isArrayBuffer=Ef,n.isArrayLike=Js,n.isArrayLikeObject=Ys,n.isBoolean=Zs,n.isBuffer=Sf,n.isDate=Cf,n.isElement=eu,n.isEmpty=tu,n.isEqual=nu,n.isEqualWith=ru,n.isError=iu,n.isFinite=ou,n.isFunction=au,n.isInteger=su,n.isLength=uu,n.isMap=Tf,n.isMatch=pu,n.isMatchWith=fu,n.isNaN=du,n.isNative=hu,n.isNil=gu,n.isNull=mu,n.isNumber=vu,n.isObject=cu,n.isObjectLike=lu,n.isPlainObject=yu,n.isRegExp=Df,n.isSafeInteger=xu,n.isSet=Af,n.isString=bu,n.isSymbol=_u,n.isTypedArray=Pf,n.isUndefined=wu,n.isWeakMap=Eu,n.isWeakSet=Su,n.join=Ca,n.kebabCase=Xf,n.last=Ta,n.lastIndexOf=Da,n.lowerCase=Kf,n.lowerFirst=Jf,n.lt=kf,n.lte=If,n.max=Zc,n.maxBy=el,n.mean=tl,n.meanBy=nl,n.min=rl,n.minBy=il,n.stubArray=Hc,n.stubFalse=zc,n.stubObject=qc,n.stubString=$c,n.stubTrue=Xc,n.multiply=vd,n.nth=Aa,n.noConflict=Uc,n.noop=Vc,n.now=lf,n.pad=hc,n.padEnd=mc,n.padStart=gc,n.parseInt=vc,n.random=uc,n.reduce=_s,n.reduceRight=ws,n.repeat=yc,n.replace=xc,n.result=Ju,n.round=yd,n.runInContext=e,n.sample=Ss,n.size=Ds,n.snakeCase=Yf,n.some=As,n.sortedIndex=ja,n.sortedIndexBy=Ra,n.sortedIndexOf=La,n.sortedLastIndex=Ma,n.sortedLastIndexBy=Ba,n.sortedLastIndexOf=Ua,n.startCase=Zf,n.startsWith=_c,n.subtract=xd,n.sum=ol,n.sumBy=al,n.template=wc,n.times=Kc,n.toFinite=Tu,n.toInteger=Du,n.toLength=Au,n.toLower=Ec,n.toNumber=Pu,n.toSafeInteger=Iu,n.toString=Fu,n.toUpper=Sc,n.trim=Cc,n.trimEnd=Tc,n.trimStart=Dc,n.truncate=Ac,n.unescape=Pc,n.uniqueId=Yc,n.upperCase=ed,n.upperFirst=td,n.each=gs,n.eachRight=vs,n.first=wa,Bc(n,function(){var e={};return or(n,function(t,r){_l.call(n.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),n.VERSION=oe,c(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){n[e].placeholder=n}),c(["drop","take"],function(e,t){P.prototype[e]=function(n){n=n===ie?1:Kl(Du(n),0);var r=this.__filtered__&&!t?new P(this):this.clone();return r.__filtered__?r.__takeCount__=Jl(n,r.__takeCount__):r.__views__.push({size:Jl(n,Me),type:e+(r.__dir__<0?"Right":"")}),r},P.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),c(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==Ie||n==Oe;P.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:To(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),c(["head","last"],function(e,t){var n="take"+(t?"Right":"");P.prototype[e]=function(){return this[n](1).value()[0]}}),c(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");P.prototype[e]=function(){return this.__filtered__?new P(this):this[n](1)}}),P.prototype.compact=function(){return this.filter(jc)},P.prototype.find=function(e){return this.filter(e).head()},P.prototype.findLast=function(e){return this.reverse().find(e)},P.prototype.invokeMap=ai(function(e,t){return"function"==typeof e?new P(this):this.map(function(n){return Pr(n,e,t)})}),P.prototype.reject=function(e){return this.filter(Ls(To(e)))},P.prototype.slice=function(e,t){e=Du(e);var n=this;return n.__filtered__&&(e>0||t<0)?new P(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==ie&&(t=Du(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},P.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},P.prototype.toArray=function(){return this.take(Me)},or(P.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=n[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(n.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,u=t instanceof P,c=s[0],l=u||wf(t),p=function(e){var t=o.apply(n,g([e],s));return i&&f?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,d=!!this.__actions__.length,h=a&&!f,m=u&&!d;if(!a&&l){t=m?t:new P(this);var v=e.apply(t,s);return v.__actions__.push({func:rs,args:[p],thisArg:ie}),new b(v,f)}return h&&m?e.apply(this,s):(v=this.thru(p),h?i?v.value()[0]:v.value():v)})}),c(["pop","push","shift","sort","splice","unshift"],function(e){var t=gl[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);n.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var n=this.value();return t.apply(wf(n)?n:[],e)}return this[r](function(n){return t.apply(wf(n)?n:[],e)})}}),or(P.prototype,function(e,t){var r=n[t];if(r){var i=r.name+"",o=cp[i]||(cp[i]=[]);o.push({name:t,func:r})}}),cp[no(ie,ye).name]=[{name:"wrapper",func:ie}],P.prototype.clone=J,P.prototype.reverse=te,P.prototype.value=ne,n.prototype.at=ef,n.prototype.chain=is,n.prototype.commit=os,n.prototype.next=as,n.prototype.plant=us,n.prototype.reverse=cs,n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=ls,n.prototype.first=n.prototype.head,Ll&&(n.prototype[Ll]=ss),n},Sr=Er();"function"==typeof t&&"object"==i(t.amd)&&t.amd?(sr._=Sr,t(function(){return Sr})):cr?((cr.exports=Sr)._=Sr,ur._=Sr):sr._=Sr}).call(void 0)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}); },{}],49:[function(e,t,n){"use strict";function r(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*f;case"days":case"day":case"d":return n*p;case"hours":case"hour":case"hrs":case"hr":case"h":return n*l;case"minutes":case"minute":case"mins":case"min":case"m":return n*c;case"seconds":case"second":case"secs":case"sec":case"s":return n*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function i(e){return e>=p?Math.round(e/p)+"d":e>=l?Math.round(e/l)+"h":e>=c?Math.round(e/c)+"m":e>=u?Math.round(e/u)+"s":e+"ms"}function o(e){return a(e,p,"day")||a(e,l,"hour")||a(e,c,"minute")||a(e,u,"second")||e+" ms"}function a(e,t,n){if(!(e0)return r(e);if("number"===n&&isNaN(e)===!1)return t.long?o(e):i(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],50:[function(e,t,n){"use strict";var r=function(e,t){function n(e,t,i){if(i){for(r=t;i=n(e,r),i<76&&i>65;)++r;return+e.slice(t-1,r)}return i=u&&u.indexOf(e.charAt(t)),i>-1?i+76:(i=e.charCodeAt(t)||0,i<45||i>127?i:i<46?65:i<48?i-1:i<58?i+18:i<65?i-11:i<91?i+11:i<97?i-37:i<123?i+5:i-63)}var r,i,o=1,a=0,s=0,u=String.alphabet;if((e+="")!=(t+=""))for(;o;)if(i=n(e,a++),o=n(t,s++),i<76&&o<76&&i>66&&o>66&&(i=n(e,a,a),o=n(t,s,a=r),s=r),i!=o)return i1?function(){var o=i?i.concat():[];return n=t?n||this:this,o.push.apply(o,arguments)1?function(){var o=i?i.concat():[];return n=t?n||this:this,o.push.apply(o,arguments)>>0;++n=0;--r)i=n[r],t=e(i,t);return t}),A=r(function(e,t){return D(e,t[t.length-1],t.slice(0,-1))}),P=r(function(e,t){var n,r,i;for(n=[],r=t;null!=(i=e(r));)n.push(i[0]),r=i[1];return n}),k=function(e){return[].concat.apply([],e)},I=r(function(e,t){var n;return[].concat.apply([],function(){var r,i,o,a=[];for(r=0,o=(i=t).length;rt?1:ee(n)?1:e(t)t&&(t=o);return t},K=function(e){var t,n,r,i,o;for(t=e[0],n=0,i=(r=e.slice(1)).length;ne(n)&&(n=a);return n}),Y=r(function(e,t){var n,r,i,o,a;for(n=t[0],r=0,o=(i=t.slice(1)).length;r1?function(){var o=i?i.concat():[];return n=t?n||this:this,o.push.apply(o,arguments)t?e:t}),o=r(function(e,t){return e0?1:0},c=r(function(e,t){return~~(e/t)}),l=r(function(e,t){return e%t}),p=r(function(e,t){return Math.floor(e/t)}),f=r(function(e,t){var n;return(e%(n=t)+n)%n}),d=function(e){return 1/e},h=Math.PI,m=2*h,g=Math.exp,v=Math.sqrt,y=Math.log,x=r(function(e,t){return Math.pow(e,t)}),b=Math.sin,_=Math.tan,w=Math.cos,E=Math.asin,S=Math.acos,C=Math.atan,T=r(function(e,t){return Math.atan2(e,t)}),D=function(e){return~~e},A=Math.round,P=Math.ceil,k=Math.floor,I=function(e){return e!==e},F=function(e){return e%2===0},O=function(e){return e%2!==0},N=r(function(e,t){var n;for(e=Math.abs(e),t=Math.abs(t);0!==t;)n=e%t,e=t,t=n;return e}),j=r(function(e,t){return Math.abs(Math.floor(e/N(e,t)*t))}),t.exports={max:i,min:o,negate:a,abs:s,signum:u,quot:c,rem:l,div:p,mod:f,recip:d,pi:h,tau:m,exp:g,sqrt:v,ln:y,pow:x,sin:b,tan:_,cos:w,acos:S,asin:E,atan:C,atan2:T,truncate:D,round:A,ceiling:P,floor:k,isItNaN:I,even:F,odd:O,gcd:N,lcm:j}},{}],55:[function(e,t,n){"use strict";function r(e,t){var n,r=function r(i){return e.length>1?function(){var o=i?i.concat():[];return n=t?n||this:this,o.push.apply(o,arguments)1?function(){var o=i?i.concat():[];return n=t?n||this:this,o.push.apply(o,arguments)1?n:n.toLowerCase())}).replace(/^([A-Z]+)/,function(e,t){return t.length>1?t+"-":t.toLowerCase()})},t.exports={split:i,join:o,lines:a,unlines:s,words:u,unwords:c,chars:l,unchars:p,reverse:f,repeat:d,capitalize:h,camelize:m,dasherize:g}},{}],57:[function(e,t,n){"use strict";function r(e,t){var n,r=function r(i){return e.length>1?function(){var o=i?i.concat():[];return n=t?n||this:this,o.push.apply(o,arguments)1)for(var n=1;n>>0;++n|"+d.source+"|\\S","g"),t.exports=function(e){var t,n;if(!e.length)throw new Error("No type specified.");if(t=e.match(h)||[],f("->",t))throw new Error("Function types are not supported. To validate that something is a function, you may use 'Function'.");try{return p(t)}catch(r){throw n=r,new Error(n.message+" - Remaining tokens: "+JSON.stringify(t)+" - Initial input: '"+e+"'")}}}).call(void 0)},{}],62:[function(e,t,n){"use strict";"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],63:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.exports=function(e){return e&&"object"===("undefined"==typeof e?"undefined":r(e))&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],64:[function(e,t,n){(function(t,r){"use strict";function i(e,t){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(t)?r.showHidden=t:t&&n._extend(r,t),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,t,r){if(e.customInspect&&t&&T(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return x(i)||(i=u(e,i,r)),i}var o=c(e,t);if(o)return o;var a=Object.keys(t),m=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),C(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(t);if(0===a.length){if(T(t)){var g=t.name?": "+t.name:"";return e.stylize("[Function"+g+"]","special")}if(w(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(S(t))return e.stylize(Date.prototype.toString.call(t),"date");if(C(t))return l(t)}var v="",y=!1,b=["{","}"];if(h(t)&&(y=!0,b=["[","]"]),T(t)){var _=t.name?": "+t.name:"";v=" [Function"+_+"]"}if(w(t)&&(v=" "+RegExp.prototype.toString.call(t)),S(t)&&(v=" "+Date.prototype.toUTCString.call(t)),C(t)&&(v=" "+l(t)),0===a.length&&(!y||0==t.length))return b[0]+v+b[1];if(r<0)return w(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var E;return E=y?p(e,t,r,m,a):a.map(function(n){return f(e,t,r,m,n,y)}),e.seen.pop(),d(E,v,b)}function c(e,t){if(_(t))return e.stylize("undefined","undefined");if(x(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i){for(var o=[],a=0,s=t.length;a-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),_(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function h(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function v(e){return null==e}function y(e){return"number"==typeof e}function x(e){return"string"==typeof e}function b(e){return"symbol"===("undefined"==typeof e?"undefined":F(e))}function _(e){return void 0===e}function w(e){return E(e)&&"[object RegExp]"===A(e)}function E(e){return"object"===("undefined"==typeof e?"undefined":F(e))&&null!==e}function S(e){return E(e)&&"[object Date]"===A(e)}function C(e){return E(e)&&("[object Error]"===A(e)||e instanceof Error)}function T(e){return"function"==typeof e}function D(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===("undefined"==typeof e?"undefined":F(e))||"undefined"==typeof e}function A(e){return Object.prototype.toString.call(e)}function P(e){return e<10?"0"+e.toString(10):e.toString(10)}function k(){var e=new Date,t=[P(e.getHours()),P(e.getMinutes()),P(e.getSeconds())].join(":");return[e.getDate(),R[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O=/%[sdj%]/g;n.format=function(e){if(!x(e)){for(var t=[],n=0;n=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n",description:"An AST-based pattern checker for JavaScript.",bin:{eslint:"./bin/eslint.js"},main:"./lib/api.js",scripts:{test:"node Makefile.js test",lint:"node Makefile.js lint",release:"node Makefile.js release","ci-release":"node Makefile.js ciRelease",alpharelease:"node Makefile.js prerelease -- alpha",betarelease:"node Makefile.js prerelease -- beta",docs:"node Makefile.js docs",gensite:"node Makefile.js gensite",browserify:"node Makefile.js browserify",perf:"node Makefile.js perf",profile:"beefy tests/bench/bench.js --open -- -t brfs -t ./tests/bench/xform-rules.js -r espree",coveralls:"cat ./coverage/lcov.info | coveralls","check-commit":"node Makefile.js checkGitCommit"},files:["LICENSE","README.md","bin","conf","lib","messages"], repository:"eslint/eslint",homepage:"http://eslint.org",bugs:"https://github.com/eslint/eslint/issues/",dependencies:{"babel-code-frame":"^6.22.0",chalk:"^1.1.3","concat-stream":"^1.6.0",debug:"^2.6.8",doctrine:"^2.0.0","eslint-scope":"^3.7.1",espree:"^3.4.3",esquery:"^1.0.0",estraverse:"^4.2.0",esutils:"^2.0.2","file-entry-cache":"^2.0.0",glob:"^7.1.2",globals:"^9.17.0",ignore:"^3.3.3",imurmurhash:"^0.1.4",inquirer:"^3.0.6","is-my-json-valid":"^2.16.0","is-resolvable":"^1.0.0","js-yaml":"^3.8.4","json-stable-stringify":"^1.0.1",levn:"^0.3.0",lodash:"^4.17.4",mkdirp:"^0.5.1","natural-compare":"^1.4.0",optionator:"^0.8.2","path-is-inside":"^1.0.2",pluralize:"^4.0.0",progress:"^2.0.0","require-uncached":"^1.0.3","strip-json-comments":"~2.0.1",table:"^4.0.1","text-table":"~0.2.0"},devDependencies:{"babel-polyfill":"^6.23.0","babel-preset-es2015":"^6.24.1",babelify:"^7.3.0",beefy:"^2.1.8",brfs:"1.4.3",browserify:"^14.4.0",chai:"^4.0.1",cheerio:"^0.22.0",coveralls:"^2.13.1",dateformat:"^2.0.0",ejs:"^2.5.6","eslint-plugin-eslint-plugin":"^0.7.2","eslint-plugin-node":"^5.0.0","eslint-release":"^0.10.1",esprima:"^3.1.3","esprima-fb":"^15001.1001.0-dev-harmony-fb",istanbul:"^0.4.5",jsdoc:"^3.4.3",karma:"^1.7.0","karma-babel-preprocessor":"^6.0.1","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.3","karma-phantomjs-launcher":"^1.0.4",leche:"^2.1.2","load-perf":"^0.2.0",markdownlint:"^0.5.0",mocha:"^3.4.2","mock-fs":"^4.3.0","npm-license":"^0.3.3","phantomjs-prebuilt":"^2.1.14",proxyquire:"^1.8.0",semver:"^5.3.0",shelljs:"^0.7.7","shelljs-nodecli":"~0.1.1",sinon:"^2.3.2",temp:"^0.8.3",through:"^2.3.8"},keywords:["ast","lint","javascript","ecmascript","espree"],license:"MIT",engines:{node:">=4"}}},{}],67:[function(e,t,n){"use strict";function r(e,t,n){var r=e.identifier,i=0===t||n[t-1].identifier!==r;return r&&e.init===!1&&e.isWrite()&&i}function i(e){return e[0]!==e[0].toLocaleLowerCase()}function o(e){return e.id&&i(e.id.name)}function a(e){for(;e;){if(N.test(e.type))return e;e=e.parent}return null}function s(e){return Boolean(e&&N.test(e.type))}function u(e){return Boolean(e&&j.test(e.type))}function c(e){for(;e&&!s(e);){if(u(e))return!0;e=e.parent}return!1}function l(e){return t.exports.isNullLiteral(e)||"Identifier"===e.type&&"undefined"===e.name||"UnaryExpression"===e.type&&"void"===e.operator}function p(e){return"CallExpression"===e.parent.type&&e.parent.callee===e}function f(e){return"MemberExpression"===e.type&&"Identifier"===e.object.type&&"Reflect"===e.object.name&&"Identifier"===e.property.type&&"apply"===e.property.name&&e.computed===!1}function d(e){return"MemberExpression"===e.type&&"Identifier"===e.object.type&&R.test(e.object.name)&&"Identifier"===e.property.type&&"from"===e.property.name&&e.computed===!1}function h(e){for(;e;){if("Identifier"===e.type)return L.test(e.name);{if("MemberExpression"!==e.type||e.computed)break;e=e.property}}return!1}function m(e){return function(t){return!e(t)}}function g(e,t){var n=t.getJSDocComment(e);return!(!n||!U.test(n.value))||t.getCommentsBefore(e).some(function(e){return U.test(e.value)})}function v(e,t){var n=e.getTokenBefore(t),r=e.getTokenAfter(t);return Boolean(n&&r)&&"("===n.value&&n.range[1]<=t.range[0]&&")"===r.value&&r.range[0]>=t.range[1]}function y(e){return"=>"===e.value&&"Punctuator"===e.type}function x(e){return","===e.value&&"Punctuator"===e.type}function b(e){return";"===e.value&&"Punctuator"===e.type}function _(e){return":"===e.value&&"Punctuator"===e.type}function w(e){return"("===e.value&&"Punctuator"===e.type}function E(e){return")"===e.value&&"Punctuator"===e.type}function S(e){return"["===e.value&&"Punctuator"===e.type}function C(e){return"]"===e.value&&"Punctuator"===e.type}function T(e){return"{"===e.value&&"Punctuator"===e.type}function D(e){return"}"===e.value&&"Punctuator"===e.type}function A(e){return"Line"===e.type||"Block"===e.type||"Shebang"===e.type}function P(e){return"Keyword"===e.type}function k(e,t){return e.id?t.getTokenAfter(e.id,w):t.getFirstToken(e,w)}function I(){return new RegExp(W.source,"g")}var F=e("esutils"),O=e("espree"),N=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/,j=/^(?:DoWhile|For|ForIn|ForOf|While)Statement$/,R=/Array$/,L=/^(?:every|filter|find|findIndex|forEach|map|some)$/,M=/^(?:bind|call|apply)$/,B=/^(?:(?:Do)?While|For(?:In|Of)?|Switch)Statement$/,U=/^[\s*]*@this/m,V=/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/,G=new Set(["\r\n","\r","\n","\u2028","\u2029"]),W=/\r\n|[\r\n\u2028\u2029]/,Q=/^#!([^\r\n]+)/,H=new Set(["Program","BlockStatement","SwitchCase"]);t.exports={COMMENTS_IGNORE_PATTERN:V,LINEBREAKS:G,LINEBREAK_MATCHER:W,SHEBANG_MATCHER:Q,STATEMENT_LIST_PARENTS:H,isTokenOnSameLine:function(e,t){return e.loc.end.line===t.loc.start.line},isNullOrUndefined:l,isCallee:p,isES5Constructor:o,getUpperFunction:a,isFunction:s,isLoop:u,isInLoop:c,isArrayFromMethod:d,isParenthesised:v,createGlobalLinebreakMatcher:I,isArrowToken:y,isClosingBraceToken:D,isClosingBracketToken:C,isClosingParenToken:E,isColonToken:_,isCommaToken:x,isCommentToken:A,isKeywordToken:P,isNotClosingBraceToken:m(D),isNotClosingBracketToken:m(C),isNotClosingParenToken:m(E),isNotColonToken:m(_),isNotCommaToken:m(x),isNotOpeningBraceToken:m(T),isNotOpeningBracketToken:m(S),isNotOpeningParenToken:m(w),isNotSemicolonToken:m(b),isOpeningBraceToken:T,isOpeningBracketToken:S,isOpeningParenToken:w,isSemicolonToken:b,isStringLiteral:function(e){return"Literal"===e.type&&"string"==typeof e.value||"TemplateLiteral"===e.type},isBreakableStatement:function(e){return B.test(e.type)},getLabel:function(e){return"LabeledStatement"===e.parent.type?e.parent.label.name:null},getModifyingReferences:function(e){return e.filter(r)},isSurroundedBy:function(e,t){return e[0]===t&&e[e.length-1]===t},isDirectiveComment:function(e){var t=e.value.trim();return"Line"===e.type&&0===t.indexOf("eslint-")||"Block"===e.type&&(0===t.indexOf("global ")||0===t.indexOf("eslint ")||0===t.indexOf("eslint-"))},getTrailingStatement:F.ast.trailingStatement,getVariableByName:function(e,t){for(var n=e;n;){var r=n.set.get(t);if(r)return r;n=n.upper}return null},isDefaultThisBinding:function(e,t){if(o(e)||g(e,t))return!1;for(var n=null===e.id;e;){var r=e.parent;switch(r.type){case"LogicalExpression":case"ConditionalExpression":e=r;break;case"ReturnStatement":var s=a(r);if(null===s||!p(s))return!0;e=s.parent;break;case"Property":case"MethodDefinition":return r.value!==e;case"AssignmentExpression":case"AssignmentPattern":if(r.right===e){if("MemberExpression"===r.left.type)return!1;if(n&&"Identifier"===r.left.type&&i(r.left.name))return!1}return!0;case"VariableDeclarator":return!(n&&r.init===e&&"Identifier"===r.id.type&&i(r.id.name));case"MemberExpression":return r.object!==e||"Identifier"!==r.property.type||!M.test(r.property.name)||!p(r)||0===r.parent.arguments.length||l(r.parent.arguments[0]);case"CallExpression":return f(r.callee)?3!==r.arguments.length||r.arguments[0]!==e||l(r.arguments[1]):d(r.callee)?3!==r.arguments.length||r.arguments[1]!==e||l(r.arguments[2]):!h(r.callee)||(2!==r.arguments.length||r.arguments[0]!==e||l(r.arguments[1]));default:return!0}}return!0},getPrecedence:function(e){switch(e.type){case"SequenceExpression":return 0;case"AssignmentExpression":case"ArrowFunctionExpression":case"YieldExpression":return 1;case"ConditionalExpression":return 3;case"LogicalExpression":switch(e.operator){case"||":return 4;case"&&":return 5}case"BinaryExpression":switch(e.operator){case"|":return 6;case"^":return 7;case"&":return 8;case"==":case"!=":case"===":case"!==":return 9;case"<":case"<=":case">":case">=":case"in":case"instanceof":return 10;case"<<":case">>":case">>>":return 11;case"+":case"-":return 12;case"*":case"/":case"%":return 13;case"**":return 15}case"UnaryExpression":case"AwaitExpression":return 16;case"UpdateExpression":return 17;case"CallExpression":return"FunctionExpression"===e.callee.type?-1:18;case"NewExpression":return 19}return 20},isEmptyBlock:function(e){return Boolean(e&&"BlockStatement"===e.type&&0===e.body.length)},isEmptyFunction:function(e){return s(e)&&t.exports.isEmptyBlock(e.body)},getStaticPropertyName:function(e){var t=void 0;switch(e&&e.type){case"Property":case"MethodDefinition":t=e.key;break;case"MemberExpression":t=e.property}switch(t&&t.type){case"Literal":return String(t.value);case"TemplateLiteral":if(0===t.expressions.length&&1===t.quasis.length)return t.quasis[0].value.cooked;break;case"Identifier":if(!e.computed)return t.name}return null},getDirectivePrologue:function(e){var t=[];if("Program"===e.type||"FunctionDeclaration"===e.type||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type){var n="Program"===e.type?e.body:e.body.body,r=!0,i=!1,o=void 0;try{for(var a,s=n[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;if("ExpressionStatement"!==u.type||"Literal"!==u.expression.type)break;t.push(u)}}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}}return t},isDecimalInteger:function(e){return"Literal"===e.type&&"number"==typeof e.value&&/^(0|[1-9]\d*)$/.test(e.raw)},getFunctionNameWithKind:function(e){var n=e.parent,r=[];if("MethodDefinition"===n.type&&n.static&&r.push("static"),e.async&&r.push("async"),e.generator&&r.push("generator"),"ArrowFunctionExpression"===e.type)r.push("arrow","function");else if("Property"===n.type||"MethodDefinition"===n.type){if("constructor"===n.kind)return"constructor";"get"===n.kind?r.push("getter"):"set"===n.kind?r.push("setter"):r.push("method")}else r.push("function");if(e.id)r.push("'"+e.id.name+"'");else{var i=t.exports.getStaticPropertyName(n);i&&r.push("'"+i+"'")}return r.join(" ")},getFunctionHeadLoc:function(e,t){var n=e.parent,r=null,i=null;if("ArrowFunctionExpression"===e.type){var o=t.getTokenBefore(e.body,y);r=o.loc.start,i=o.loc.end}else"Property"===n.type||"MethodDefinition"===n.type?(r=n.loc.start,i=k(e,t).loc.start):(r=e.loc.start,i=k(e,t).loc.start);return{start:Object.assign({},r),end:Object.assign({},i)}},getParenthesisedText:function(e,t){for(var n=e.getFirstToken(t),r=e.getLastToken(t);e.getTokenBefore(n)&&"Punctuator"===e.getTokenBefore(n).type&&"("===e.getTokenBefore(n).value&&e.getTokenAfter(r)&&"Punctuator"===e.getTokenAfter(r).type&&")"===e.getTokenAfter(r).value;)n=e.getTokenBefore(n),r=e.getTokenAfter(r);return e.getText().slice(n.range[0],r.range[1])},couldBeError:function(e){switch(e.type){case"Identifier":case"CallExpression":case"NewExpression":case"MemberExpression":case"TaggedTemplateExpression":case"YieldExpression":case"AwaitExpression":return!0;case"AssignmentExpression":return t.exports.couldBeError(e.right);case"SequenceExpression":var n=e.expressions;return 0!==n.length&&t.exports.couldBeError(n[n.length-1]);case"LogicalExpression":return t.exports.couldBeError(e.left)||t.exports.couldBeError(e.right);case"ConditionalExpression":return t.exports.couldBeError(e.consequent)||t.exports.couldBeError(e.alternate);default:return!1}},isNullLiteral:function(e){return"Literal"===e.type&&null===e.value&&!e.regex},canTokensBeAdjacent:function(e,t){var n=void 0;if("string"==typeof e){var r=O.tokenize(e,{ecmaVersion:2015});n=r[r.length-1]}else n=e;var i="string"==typeof t?O.tokenize(t,{ecmaVersion:2015})[0]:t;if("Punctuator"===n.type||"Punctuator"===i.type){if("Punctuator"===n.type&&"Punctuator"===i.type){var o=new Set(["+","++"]),a=new Set(["-","--"]);return!(o.has(n.value)&&o.has(i.value)||a.has(n.value)&&a.has(i.value))}return!0}return"String"===n.type||"String"===i.type||"Template"===n.type||"Template"===i.type||!("Numeric"===n.type||"Numeric"!==i.type||!i.value.startsWith("."))}}},{espree:"espree",esutils:33}],68:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return Boolean(e.test)}function o(e){var t=e.parent;switch(t.type){case"ConditionalExpression":case"IfStatement":case"WhileStatement":case"DoWhileStatement":case"ForStatement":return t.test===e;case"LogicalExpression":return!0;default:return!1}}function a(e){if("Literal"===e.type)return Boolean(e.value)}function s(e){var t=e.parent;switch(t.type){case"LabeledStatement":case"BreakStatement":case"ContinueStatement":case"ArrayPattern":case"RestElement":case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"CatchClause":return!1;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ClassDeclaration":case"ClassExpression":case"VariableDeclarator":return t.id!==e;case"Property":case"MethodDefinition":return t.key!==e||t.computed||t.shorthand;case"AssignmentPattern":return t.key!==e;default:return!0}}function u(e,t){var n=e.codePath,r=g.getState(n),i=r.currentSegments,o=r.headSegments,a=Math.max(i.length,o.length),s=void 0,u=void 0,c=void 0;for(s=0;s "+t.id),this.emitter.emit("onCodePathSegmentLoop",e,t,this.currentNode))}}]),e}();t.exports=_},{"../ast-utils":67,"./code-path":71,"./code-path-segment":69,"./debug-helpers":72,"./id-generator":74,assert:6}],69:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){for(var t=Object.create(null),n=[],r=0;r=2&&h.markPrevSegmentAsLooped(a,o),e.notifyLooped(o,a)}}function f(e,t,n){t.processed||(t.trueForkContext.add(n),t.falseForkContext.add(n)),e.test!==!0&&e.brokenForkContext.addAll(t.falseForkContext),e.endOfTestSegments=t.trueForkContext.makeNext(0,-1)}var d=function(){function e(e,t){for(var n=0;n0&&e[0].reachable&&this.returnedForkContext.add(e)}},{key:"headSegments",get:function(){return this.forkContext.head}},{key:"parentForkContext",get:function(){var e=this.forkContext;return e&&e.upper}}]),e}();t.exports=g},{"./code-path-segment":69,"./fork-context":73}],71:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n0;){if(o=l[l.length-1],u=o[0],a=o[1],0===a){if(c[u.id]){l.pop();continue}if(u!==r&&u.prevSegments.length>0&&!u.prevSegments.every(n)){l.pop();continue}if(p&&u.prevSegments.indexOf(p)!==-1&&(p=null),c[u.id]=!0,!p&&(t.call(this,u,d),u===i&&d.skip(),f))break}s=u.nextSegments.length-1,a0&&(t+='final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];\n'),e.thrownSegments.length>0&&(t+='thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize];\n');var n=Object.create(null),r=this.makeDotArrows(e,n);for(var o in n){var a=n[o];t+=o+"[",t+=a.reachable?'label="':'style="rounded,dashed,filled",fillcolor="#FF9800",label="<>\\n',t+=a.internal.nodes.length>0||a.internal.exitNodes.length>0?[].concat(a.internal.nodes.map(function(e){switch(e.type){case"Identifier":return e.type+" ("+e.name+")";case"Literal":return e.type+" ("+e.value+")";default:return e.type}}),a.internal.exitNodes.map(function(e){switch(e.type){case"Identifier":return e.type+":exit ("+e.name+")";case"Literal":return e.type+":exit ("+e.value+")";default:return e.type+":exit"}})).join("\\n"):"????",t+='"];\n'}t+=r+"\n",t+="}",i("DOT",t)}:i,makeDotArrows:function(e,t){for(var n=[[e.initialSegment,0]],r=t||Object.create(null),i=e.initialSegment.id,o="initial->"+e.initialSegment.id;n.length>0;){var a=n.pop(),s=a[0],u=a[1];if(!r[s.id]||0!==u){r[s.id]=s;var c=s.allNextSegments[u];c&&(o+=i===s.id?"->"+c.id:";\n"+s.id+"->"+c.id,i=c.id,n.unshift([s,1+u]),n.push([c,0]))}}return e.returnedSegments.forEach(function(e){o+=i===e.id?"->final":";\n"+e.id+"->final",i=null}),e.thrownSegments.forEach(function(e){o+=i===e.id?"->thrown":";\n"+e.id+"->thrown",i=null}),o+";"}}},{debug:7}],73:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return e.reachable}function o(e,t,n,r){var i=e.segmentsList;t<0&&(t=i.length+t),n<0&&(n=i.length+n);for(var o=[],a=0;ae.count;){for(var n=[],r=0,i=t.length/2|0;r=this.count,e.length+" >= "+this.count),this.segmentsList.push(a(this,e))}},{key:"replaceHead",value:function(e){u(e.length>=this.count,e.length+" >= "+this.count),this.segmentsList.splice(-1,1,a(this,e))}},{key:"addAll",value:function(e){u(e.count===this.count);for(var t=e.segmentsList,n=0;n0&&e.some(i)}}],[{key:"newRoot",value:function(t){var n=new e(t,null,1);return n.add([c.newRoot(t.next())]),n}},{key:"newEmpty",value:function(t,n){return new e(t.idGenerator,t,(n?2:1)*t.count)}}]),e}();t.exports=l},{"./code-path-segment":69,assert:6}],74:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n1?s.concat(n):s.concat(t),"object"===("undefined"==typeof n?"undefined":r(n))||Array.isArray(n)||(n=[n]),Object.keys(n).forEach(function(a,u){a=n[u],"undefined"==typeof s[u]?s[u]=a:"object"===("undefined"==typeof a?"undefined":r(a))?o?s[u]=a:s[u]=e(t[u],a,i,o):i?s.indexOf(a)===-1&&s.push(a):s[u]=a})):(t&&"object"===("undefined"==typeof t?"undefined":r(t))&&Object.keys(t).forEach(function(e){s[e]=t[e]}),Object.keys(n).forEach(function(a){Array.isArray(n[a])||Array.isArray(t[a])?s[a]=e(t[a],n[a],"plugins"===a||"extends"===a,o):"object"===r(n[a])&&n[a]&&"exported"!==a&&"astGlobals"!==a?s[a]=e(t[a]||{},n[a],i,"rules"===a):s[a]=n[a]})),s},normalize:function(e){e.rules&&Object.keys(e.rules).forEach(function(t){var n=e.rules[t];"string"==typeof n?e.rules[t]=a[n.toLowerCase()]||0:Array.isArray(n)&&"string"==typeof n[0]&&(n[0]=a[n[0].toLowerCase()]||0)})},normalizeToStrings:function(e){e.rules&&Object.keys(e.rules).forEach(function(t){var n=e.rules[t];"number"==typeof n?e.rules[t]=o[n]||o[0]:Array.isArray(n)&&"number"==typeof n[0]&&(n[0]=o[n[0]]||o[0])})},isErrorSeverity:function(e){var t=Array.isArray(e)?e[0]:e;return"string"==typeof t&&(t=a[t.toLowerCase()]||0),"number"==typeof t&&2===t},isValidSeverity:function(e){var t=Array.isArray(e)?e[0]:e;return"string"==typeof t&&(t=t.toLowerCase()),s.indexOf(t)!==-1},isEverySeverityValid:function(e){var t=this;return Object.keys(e).every(function(n){return t.isValidSeverity(e[n])})}}},{debug:7}],76:[function(e,t,n){"use strict";function r(e,t){var n=t.get(e),r=n&&n.schema||n&&n.meta&&n.meta.schema;return Array.isArray(r)?r.length?{type:"array",items:r,minItems:0,maxItems:r.length}:{type:"array",minItems:0,maxItems:0}:r||null}function i(e){var t=Array.isArray(e)?e[0]:e;if(0!==t&&1!==t&&2!==t&&("string"!=typeof t||!/^(?:off|warn|error)$/i.test(t)))throw new Error("\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '"+h.inspect(t).replace(/'/g,'"').replace(/\n/g,"")+"').\n");return t}function o(e,t,n){var i=r(e,n);!m.rules[e]&&i&&(m.rules[e]=f(i,{verbose:!0}));var o=m.rules[e];if(o&&(o(t),o.errors))throw new Error(o.errors.map(function(e){return'\tValue "'+e.value+'" '+e.message+".\n"}).join(""))}function a(e,t,n,r){try{var a=i(t);0===a||"string"==typeof a&&"off"===a.toLowerCase()||o(e,Array.isArray(t)?t.slice(1):[],r)}catch(t){throw new Error(n+':\n\tConfiguration for rule "'+e+'" is invalid:\n'+t.message)}}function s(e,t,n){e&&Object.keys(e).forEach(function(e){if(!n.get(e)){var r=t+':\n\tEnvironment key "'+e+'" is unknown\n';throw new Error(r)}})}function u(e,t,n){e&&Object.keys(e).forEach(function(r){a(r,e[r],t,n)})}function c(e){return e.map(function(e){if("has additional properties"===e.message)return'Unexpected top-level property "'+e.value.replace(/^data\./,"")+'"';if("is the wrong type"===e.message){var t=e.field.replace(/^data\./,""),n="string"==typeof e.type?e.type:e.type.join("/"),r=JSON.stringify(e.value);return'Property "'+t+'" is the wrong type (expected '+n+" but got `"+r+"`)"}return'"'+e.field.replace(/^(data\.)/,"")+'" '+e.message+". Value: "+e.value}).map(function(e){return"\t- "+e+".\n"}).join("")}function l(e,t){var n=f(d,{verbose:!0});if(!n(e))throw new Error(t+":\n\tESLint configuration is invalid:\n"+c(n.errors))}function p(e,t,n,r){l(e,t),u(e.rules,t,n),s(e.env,t,r)}var f=e("is-my-json-valid"),d=e("../../conf/config-schema.json"),h=e("util"),m={rules:Object.create(null)};t.exports={getRuleOptionsSchema:r,validate:p,validateRuleOptions:a}},{"../../conf/config-schema.json":2,"is-my-json-valid":41,util:64}],77:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n=0;r--)if(!e[r].end&&e[r].rule===n){e[r].end=t;break}});else{var i=void 0;for(r=e.length-1;r>=0&&(!i||i===e[r].start);r--)e[r].end||(e[r].end=t,i=e[r].start)}}function f(e,t,n,r){var i={exported:{},astGlobals:{},rules:{},env:{}},o={},c=r.messages,f=r.reportingConfig;return t.comments.forEach(function(t){var n=t.value.trim(),d=/^(eslint(-\w+){0,3}|exported|globals?)(\s|$)/.exec(n);if(d)if(n=n.substring(d.index+d[1].length),"Block"===t.type)switch(d[1]){case"exported":Object.assign(i.exported,a(n,t));break;case"globals":case"global":Object.assign(i.astGlobals,a(n,t));break;case"eslint-env":Object.assign(i.env,u(n));break;case"eslint-disable":l(f,t.loc.start,Object.keys(u(n)));break;case"eslint-enable":p(f,t.loc.start,Object.keys(u(n)));break;case"eslint":var h=s(n,t.loc,c);Object.keys(h).forEach(function(n){var i=h[n];N.validateRuleOptions(n,i,e+" line "+t.loc.start.line,r.rules),o[n]=i})}else"eslint-disable-line"===d[1]?(l(f,{line:t.loc.start.line,column:0},Object.keys(u(n))),p(f,t.loc.end,Object.keys(u(n)))):"eslint-disable-next-line"===d[1]&&(l(f,t.loc.start,Object.keys(u(n))),p(f,{line:t.loc.start.line+2},Object.keys(u(n))))}),Object.keys(i.env).forEach(function(e){var t=r.environments.get(e);t&&(i=O.merge(i,t))}),Object.assign(i.rules,o),O.merge(n,i)}function d(e,t,n){for(var r=0,i=e.length;ro.start.line||n.line===o.start.line&&n.column>=o.start.column)&&(!o.end||n.line=2015&&(e-=2009),e}function m(e,t){e.globals=e.globals||{};var n=Object.assign({},k.rules),r=Object.assign({},k.parserOptions);"object"===S(e.rules)&&Object.keys(e.rules).forEach(function(t){var r=e.rules[t];if(null===r)throw new Error("Invalid config for rule '"+t+"'.");Array.isArray(r)?n[t]=r.slice():n[t]=r}),"object"===S(e.env)&&Object.keys(e.env).forEach(function(n){var i=t.get(n);e.env[n]&&i&&i.parserOptions&&(r=O.merge(r,i.parserOptions))});var i={rules:n,parser:e.parser||k.parser,globals:O.merge(k.globals,e.globals),env:O.merge(k.env,e.env||{}),settings:O.merge(k.settings,e.settings||{}),parserOptions:O.merge(r,e.parserOptions||{})},o="module"===i.parserOptions.sourceType;return o&&(i.parserOptions.ecmaFeatures=Object.assign({},i.parserOptions.ecmaFeatures,{globalReturn:!1})),i.parserOptions.ecmaVersion=h(i.parserOptions.ecmaVersion,o),i}function g(e){function t(t){return{Program:function(n){t.report(n,e)}}}if(e)return t;throw new Error("No message passed to stub rule")}function v(e){if(e in I.rules){var t=I.rules[e];return"Rule '"+e+"' was removed and replaced by: "+t.join(", ")}return null}function y(e){var t=void 0,n=void 0;for(Q.lastIndex=0;t=Q.exec(e);)n=Object.assign(n||{},u(t[1]));return n}function x(e){return 65279===e.charCodeAt(0)?e.slice(1):e}function b(e){return"number"==typeof e?e:Array.isArray(e)?e[0]:0}function _(e){return Array.isArray(e)?e.slice(1):[]}function w(t,n,r,i){var o=void 0,a={loc:!0,range:!0,raw:!0,tokens:!0,comment:!0,filePath:r};try{o=e(n.parser)}catch(e){return i.push({ruleId:null,fatal:!0,severity:2,source:null,message:e.message,line:0,column:0}),null}n.parserOptions&&(a=Object.assign({},n.parserOptions,a));try{return"function"==typeof o.parseForESLint?o.parseForESLint(t,a):o.parse(t,a)}catch(e){var s=e.message.replace(/^line \d+:/i,"").trim(),u=e.lineNumber?L.splitLines(t)[e.lineNumber-1]:null;return i.push({ruleId:null,fatal:!0,severity:2,source:u,message:"Parsing error: "+s,line:e.lineNumber,column:e.column}),null}}var E=function(){function e(e,t){for(var n=0;n0}).forEach(function(e){var n=void 0;if(n=i.rules.get(e),!n){var r=v(e);n=g(r?r:"Definition for rule '"+e+"' was not found"),i.rules.define(e,n)}var o=b(t.rules[e]),a=_(t.rules[e]);try{var u=new B(e,i,o,a,t.settings,t.parserOptions,t.parser,n.meta,s&&s.services?s.services:{}),c=n.create?n.create(u):n(u);Object.keys(c).forEach(function(t){i.on(t,V.enabled?V.time(e,c[t]):c[t])})}catch(t){throw t.message="Error while loading rule '"+e+"': "+t.message,t}}),this.currentConfig=t,this.traverser=new M;var p=this.currentConfig.parserOptions.ecmaFeatures||{},d=this.currentConfig.parserOptions.ecmaVersion||5;this.scopeManager=D.analyze(a,{ignoreEval:!0,nodejsScope:p.globalReturn,impliedStrict:p.impliedStrict,ecmaVersion:d,sourceType:this.currentConfig.parserOptions.sourceType||"script",fallback:M.getKeys}),this.currentScopes=this.scopeManager.scopes,c(a,this.currentScopes[0],this.currentConfig,this.environments);var h=new R(this);h=new F(h),this.traverser.traverse(a,{enter:function(e,t){e.parent=t,h.enterNode(e)},leave:function(e){h.leaveNode(e)}})}return this.messages.sort(function(e,t){var n=e.line-t.line;return 0===n?e.column-t.column:n}),this.messages}},{key:"report",value:function(e,t,n,r,i,o,a,s){n&&C.strictEqual("undefined"==typeof n?"undefined":S(n),"object","Node must be an object");var u=void 0;if("string"==typeof r?(C.ok(n,"Node must be provided when reporting error if location is not provided"),s=a,a=o,o=i,i=r,r=n.loc.start,u=n.loc.end):u=r.end,r=r.start||r,!d(this.reportingConfig,e,r)){o&&(i=i.replace(/\{\{\s*([^{}]+?)\s*\}\}/g,function(e,t){return t in o?o[t]:e}));var c={ruleId:e,severity:t,message:i,line:r.line,column:r.column+1,nodeType:n&&n.type,source:this.sourceCode.lines[r.line-1]||""};if(u&&(c.endLine=u.line,c.endColumn=u.column+1),a&&Array.isArray(a.range)&&"string"==typeof a.text){if(s&&!s.fixable)throw new Error("Fixable rules should export a `meta.fixable` property.");c.fix=a}this.messages.push(c)}}},{key:"getSourceCode",value:function(){return this.sourceCode}},{key:"getAncestors",value:function(){return this.traverser.parents()}},{key:"getScope",value:function(){var e=this.traverser.parents();if(e.length){var t=this.traverser.current();this.currentConfig.parserOptions.ecmaVersion>=6?["BlockStatement","SwitchStatement","CatchClause","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"].indexOf(t.type)>=0&&e.push(t):["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"].indexOf(t.type)>=0&&e.push(t);for(var n=e.length-1;n>=0;--n){var r=this.scopeManager.acquire(e[n],!0);if(r)return"function-expression-name"===r.type?r.childScopes[0]:r}}return this.currentScopes[0]}},{key:"markVariableAsUsed",value:function(e){var t=this.currentConfig.parserOptions.ecmaFeatures&&this.currentConfig.parserOptions.ecmaFeatures.globalReturn,n=t||"module"===this.currentConfig.parserOptions.sourceType,r=this.getScope(),i=void 0,o=void 0;"global"===r.type&&n&&(r=r.childScopes[0]);do{var a=r.variables;for(i=0,o=a.length;i"}},{key:"defineRule",value:function(e,t){this.rules.define(e,t)}},{key:"defineRules",value:function(e){var t=this;Object.getOwnPropertyNames(e).forEach(function(n){t.defineRule(n,e[n])})}},{key:"defaults",value:function(){return k}},{key:"getRules",value:function(){return this.rules.getAllLoadedRules()}},{key:"getDeclaredVariables",value:function(e){return this.scopeManager&&this.scopeManager.getDeclaredVariables(e)||[]}}]),t}(T),z={getSource:"getText",getSourceLines:"getLines",getAllComments:"getAllComments",getNodeByRangeIndex:"getNodeByRangeIndex",getComments:"getComments",getCommentsBefore:"getCommentsBefore",getCommentsAfter:"getCommentsAfter",getCommentsInside:"getCommentsInside",getJSDocComment:"getJSDocComment",getFirstToken:"getFirstToken",getFirstTokens:"getFirstTokens",getLastToken:"getLastToken",getLastTokens:"getLastTokens",getTokenAfter:"getTokenAfter",getTokenBefore:"getTokenBefore",getTokenByRangeStart:"getTokenByRangeStart",getTokens:"getTokens",getTokensAfter:"getTokensAfter",getTokensBefore:"getTokensBefore",getTokensBetween:"getTokensBetween"};Object.keys(z).forEach(function(e){var t=z[e];H.prototype[e]=function(e,n,r,i,o){return this.sourceCode?this.sourceCode[t](e,n,r,i,o):null}}),t.exports=H},{"../conf/blank-script.json":1,"../conf/default-config-options.js":3,"../conf/replacements.json":5,"../package.json":66,"./ast-utils":67,"./code-path-analysis/code-path-analyzer":68,"./config/config-ops":75,"./config/config-validator":76,"./config/environments":77,"./rule-context":80,"./rules":81,"./timing":334,"./util/node-event-generator":350,"./util/source-code":353,"./util/traverser":354,assert:6,"eslint-scope":14,events:34,levn:46}],79:[function(e,t,n){"use strict";t.exports=function(){var t=Object.create(null);return t["accessor-pairs"]=e("./rules/accessor-pairs"),t["array-bracket-newline"]=e("./rules/array-bracket-newline"),t["array-bracket-spacing"]=e("./rules/array-bracket-spacing"),t["array-callback-return"]=e("./rules/array-callback-return"),t["array-element-newline"]=e("./rules/array-element-newline"),t["arrow-body-style"]=e("./rules/arrow-body-style"),t["arrow-parens"]=e("./rules/arrow-parens"),t["arrow-spacing"]=e("./rules/arrow-spacing"),t["block-scoped-var"]=e("./rules/block-scoped-var"),t["block-spacing"]=e("./rules/block-spacing"),t["brace-style"]=e("./rules/brace-style"),t["callback-return"]=e("./rules/callback-return"),t.camelcase=e("./rules/camelcase"),t["capitalized-comments"]=e("./rules/capitalized-comments"),t["class-methods-use-this"]=e("./rules/class-methods-use-this"),t["comma-dangle"]=e("./rules/comma-dangle"),t["comma-spacing"]=e("./rules/comma-spacing"),t["comma-style"]=e("./rules/comma-style"),t.complexity=e("./rules/complexity"),t["computed-property-spacing"]=e("./rules/computed-property-spacing"),t["consistent-return"]=e("./rules/consistent-return"),t["consistent-this"]=e("./rules/consistent-this"),t["constructor-super"]=e("./rules/constructor-super"),t.curly=e("./rules/curly"),t["default-case"]=e("./rules/default-case"),t["dot-location"]=e("./rules/dot-location"),t["dot-notation"]=e("./rules/dot-notation"),t["eol-last"]=e("./rules/eol-last"),t.eqeqeq=e("./rules/eqeqeq"),t["for-direction"]=e("./rules/for-direction"),t["func-call-spacing"]=e("./rules/func-call-spacing"),t["func-name-matching"]=e("./rules/func-name-matching"),t["func-names"]=e("./rules/func-names"),t["func-style"]=e("./rules/func-style"),t["generator-star-spacing"]=e("./rules/generator-star-spacing"),t["global-require"]=e("./rules/global-require"),t["guard-for-in"]=e("./rules/guard-for-in"),t["handle-callback-err"]=e("./rules/handle-callback-err"),t["id-blacklist"]=e("./rules/id-blacklist"),t["id-length"]=e("./rules/id-length"),t["id-match"]=e("./rules/id-match"),t["indent-legacy"]=e("./rules/indent-legacy"),t.indent=e("./rules/indent"),t["init-declarations"]=e("./rules/init-declarations"),t["jsx-quotes"]=e("./rules/jsx-quotes"),t["key-spacing"]=e("./rules/key-spacing"),t["keyword-spacing"]=e("./rules/keyword-spacing"),t["line-comment-position"]=e("./rules/line-comment-position"),t["linebreak-style"]=e("./rules/linebreak-style"),t["lines-around-comment"]=e("./rules/lines-around-comment"),t["lines-around-directive"]=e("./rules/lines-around-directive"),t["max-depth"]=e("./rules/max-depth"),t["max-len"]=e("./rules/max-len"),t["max-lines"]=e("./rules/max-lines"),t["max-nested-callbacks"]=e("./rules/max-nested-callbacks"),t["max-params"]=e("./rules/max-params"),t["max-statements-per-line"]=e("./rules/max-statements-per-line"),t["max-statements"]=e("./rules/max-statements"),t["multiline-ternary"]=e("./rules/multiline-ternary"),t["new-cap"]=e("./rules/new-cap"),t["new-parens"]=e("./rules/new-parens"),t["newline-after-var"]=e("./rules/newline-after-var"),t["newline-before-return"]=e("./rules/newline-before-return"),t["newline-per-chained-call"]=e("./rules/newline-per-chained-call"),t["no-alert"]=e("./rules/no-alert"),t["no-array-constructor"]=e("./rules/no-array-constructor"),t["no-await-in-loop"]=e("./rules/no-await-in-loop"),t["no-bitwise"]=e("./rules/no-bitwise"),t["no-buffer-constructor"]=e("./rules/no-buffer-constructor"),t["no-caller"]=e("./rules/no-caller"),t["no-case-declarations"]=e("./rules/no-case-declarations"),t["no-catch-shadow"]=e("./rules/no-catch-shadow"),t["no-class-assign"]=e("./rules/no-class-assign"),t["no-compare-neg-zero"]=e("./rules/no-compare-neg-zero"),t["no-cond-assign"]=e("./rules/no-cond-assign"),t["no-confusing-arrow"]=e("./rules/no-confusing-arrow"),t["no-console"]=e("./rules/no-console"),t["no-const-assign"]=e("./rules/no-const-assign"),t["no-constant-condition"]=e("./rules/no-constant-condition"),t["no-continue"]=e("./rules/no-continue"),t["no-control-regex"]=e("./rules/no-control-regex"),t["no-debugger"]=e("./rules/no-debugger"),t["no-delete-var"]=e("./rules/no-delete-var"),t["no-div-regex"]=e("./rules/no-div-regex"),t["no-dupe-args"]=e("./rules/no-dupe-args"),t["no-dupe-class-members"]=e("./rules/no-dupe-class-members"),t["no-dupe-keys"]=e("./rules/no-dupe-keys"),t["no-duplicate-case"]=e("./rules/no-duplicate-case"),t["no-duplicate-imports"]=e("./rules/no-duplicate-imports"),t["no-else-return"]=e("./rules/no-else-return"),t["no-empty-character-class"]=e("./rules/no-empty-character-class"),t["no-empty-function"]=e("./rules/no-empty-function"),t["no-empty-pattern"]=e("./rules/no-empty-pattern"),t["no-empty"]=e("./rules/no-empty"),t["no-eq-null"]=e("./rules/no-eq-null"),t["no-eval"]=e("./rules/no-eval"),t["no-ex-assign"]=e("./rules/no-ex-assign"),t["no-extend-native"]=e("./rules/no-extend-native"),t["no-extra-bind"]=e("./rules/no-extra-bind"),t["no-extra-boolean-cast"]=e("./rules/no-extra-boolean-cast"),t["no-extra-label"]=e("./rules/no-extra-label"),t["no-extra-parens"]=e("./rules/no-extra-parens"),t["no-extra-semi"]=e("./rules/no-extra-semi"),t["no-fallthrough"]=e("./rules/no-fallthrough"),t["no-floating-decimal"]=e("./rules/no-floating-decimal"),t["no-func-assign"]=e("./rules/no-func-assign"),t["no-global-assign"]=e("./rules/no-global-assign"),t["no-implicit-coercion"]=e("./rules/no-implicit-coercion"),t["no-implicit-globals"]=e("./rules/no-implicit-globals"),t["no-implied-eval"]=e("./rules/no-implied-eval"),t["no-inline-comments"]=e("./rules/no-inline-comments"),t["no-inner-declarations"]=e("./rules/no-inner-declarations"),t["no-invalid-regexp"]=e("./rules/no-invalid-regexp"),t["no-invalid-this"]=e("./rules/no-invalid-this"),t["no-irregular-whitespace"]=e("./rules/no-irregular-whitespace"),t["no-iterator"]=e("./rules/no-iterator"),t["no-label-var"]=e("./rules/no-label-var"),t["no-labels"]=e("./rules/no-labels"), t["no-lone-blocks"]=e("./rules/no-lone-blocks"),t["no-lonely-if"]=e("./rules/no-lonely-if"),t["no-loop-func"]=e("./rules/no-loop-func"),t["no-magic-numbers"]=e("./rules/no-magic-numbers"),t["no-mixed-operators"]=e("./rules/no-mixed-operators"),t["no-mixed-requires"]=e("./rules/no-mixed-requires"),t["no-mixed-spaces-and-tabs"]=e("./rules/no-mixed-spaces-and-tabs"),t["no-multi-assign"]=e("./rules/no-multi-assign"),t["no-multi-spaces"]=e("./rules/no-multi-spaces"),t["no-multi-str"]=e("./rules/no-multi-str"),t["no-multiple-empty-lines"]=e("./rules/no-multiple-empty-lines"),t["no-native-reassign"]=e("./rules/no-native-reassign"),t["no-negated-condition"]=e("./rules/no-negated-condition"),t["no-negated-in-lhs"]=e("./rules/no-negated-in-lhs"),t["no-nested-ternary"]=e("./rules/no-nested-ternary"),t["no-new-func"]=e("./rules/no-new-func"),t["no-new-object"]=e("./rules/no-new-object"),t["no-new-require"]=e("./rules/no-new-require"),t["no-new-symbol"]=e("./rules/no-new-symbol"),t["no-new-wrappers"]=e("./rules/no-new-wrappers"),t["no-new"]=e("./rules/no-new"),t["no-obj-calls"]=e("./rules/no-obj-calls"),t["no-octal-escape"]=e("./rules/no-octal-escape"),t["no-octal"]=e("./rules/no-octal"),t["no-param-reassign"]=e("./rules/no-param-reassign"),t["no-path-concat"]=e("./rules/no-path-concat"),t["no-plusplus"]=e("./rules/no-plusplus"),t["no-process-env"]=e("./rules/no-process-env"),t["no-process-exit"]=e("./rules/no-process-exit"),t["no-proto"]=e("./rules/no-proto"),t["no-prototype-builtins"]=e("./rules/no-prototype-builtins"),t["no-redeclare"]=e("./rules/no-redeclare"),t["no-regex-spaces"]=e("./rules/no-regex-spaces"),t["no-restricted-globals"]=e("./rules/no-restricted-globals"),t["no-restricted-imports"]=e("./rules/no-restricted-imports"),t["no-restricted-modules"]=e("./rules/no-restricted-modules"),t["no-restricted-properties"]=e("./rules/no-restricted-properties"),t["no-restricted-syntax"]=e("./rules/no-restricted-syntax"),t["no-return-assign"]=e("./rules/no-return-assign"),t["no-return-await"]=e("./rules/no-return-await"),t["no-script-url"]=e("./rules/no-script-url"),t["no-self-assign"]=e("./rules/no-self-assign"),t["no-self-compare"]=e("./rules/no-self-compare"),t["no-sequences"]=e("./rules/no-sequences"),t["no-shadow-restricted-names"]=e("./rules/no-shadow-restricted-names"),t["no-shadow"]=e("./rules/no-shadow"),t["no-spaced-func"]=e("./rules/no-spaced-func"),t["no-sparse-arrays"]=e("./rules/no-sparse-arrays"),t["no-sync"]=e("./rules/no-sync"),t["no-tabs"]=e("./rules/no-tabs"),t["no-template-curly-in-string"]=e("./rules/no-template-curly-in-string"),t["no-ternary"]=e("./rules/no-ternary"),t["no-this-before-super"]=e("./rules/no-this-before-super"),t["no-throw-literal"]=e("./rules/no-throw-literal"),t["no-trailing-spaces"]=e("./rules/no-trailing-spaces"),t["no-undef-init"]=e("./rules/no-undef-init"),t["no-undef"]=e("./rules/no-undef"),t["no-undefined"]=e("./rules/no-undefined"),t["no-underscore-dangle"]=e("./rules/no-underscore-dangle"),t["no-unexpected-multiline"]=e("./rules/no-unexpected-multiline"),t["no-unmodified-loop-condition"]=e("./rules/no-unmodified-loop-condition"),t["no-unneeded-ternary"]=e("./rules/no-unneeded-ternary"),t["no-unreachable"]=e("./rules/no-unreachable"),t["no-unsafe-finally"]=e("./rules/no-unsafe-finally"),t["no-unsafe-negation"]=e("./rules/no-unsafe-negation"),t["no-unused-expressions"]=e("./rules/no-unused-expressions"),t["no-unused-labels"]=e("./rules/no-unused-labels"),t["no-unused-vars"]=e("./rules/no-unused-vars"),t["no-use-before-define"]=e("./rules/no-use-before-define"),t["no-useless-call"]=e("./rules/no-useless-call"),t["no-useless-computed-key"]=e("./rules/no-useless-computed-key"),t["no-useless-concat"]=e("./rules/no-useless-concat"),t["no-useless-constructor"]=e("./rules/no-useless-constructor"),t["no-useless-escape"]=e("./rules/no-useless-escape"),t["no-useless-rename"]=e("./rules/no-useless-rename"),t["no-useless-return"]=e("./rules/no-useless-return"),t["no-var"]=e("./rules/no-var"),t["no-void"]=e("./rules/no-void"),t["no-warning-comments"]=e("./rules/no-warning-comments"),t["no-whitespace-before-property"]=e("./rules/no-whitespace-before-property"),t["no-with"]=e("./rules/no-with"),t["nonblock-statement-body-position"]=e("./rules/nonblock-statement-body-position"),t["object-curly-newline"]=e("./rules/object-curly-newline"),t["object-curly-spacing"]=e("./rules/object-curly-spacing"),t["object-property-newline"]=e("./rules/object-property-newline"),t["object-shorthand"]=e("./rules/object-shorthand"),t["one-var-declaration-per-line"]=e("./rules/one-var-declaration-per-line"),t["one-var"]=e("./rules/one-var"),t["operator-assignment"]=e("./rules/operator-assignment"),t["operator-linebreak"]=e("./rules/operator-linebreak"),t["padded-blocks"]=e("./rules/padded-blocks"),t["padding-line-between-statements"]=e("./rules/padding-line-between-statements"),t["prefer-arrow-callback"]=e("./rules/prefer-arrow-callback"),t["prefer-const"]=e("./rules/prefer-const"),t["prefer-destructuring"]=e("./rules/prefer-destructuring"),t["prefer-numeric-literals"]=e("./rules/prefer-numeric-literals"),t["prefer-promise-reject-errors"]=e("./rules/prefer-promise-reject-errors"),t["prefer-reflect"]=e("./rules/prefer-reflect"),t["prefer-rest-params"]=e("./rules/prefer-rest-params"),t["prefer-spread"]=e("./rules/prefer-spread"),t["prefer-template"]=e("./rules/prefer-template"),t["quote-props"]=e("./rules/quote-props"),t.quotes=e("./rules/quotes"),t.radix=e("./rules/radix"),t["require-await"]=e("./rules/require-await"),t["require-jsdoc"]=e("./rules/require-jsdoc"),t["require-yield"]=e("./rules/require-yield"),t["rest-spread-spacing"]=e("./rules/rest-spread-spacing"),t["semi-spacing"]=e("./rules/semi-spacing"),t["semi-style"]=e("./rules/semi-style"),t.semi=e("./rules/semi"),t["sort-imports"]=e("./rules/sort-imports"),t["sort-keys"]=e("./rules/sort-keys"),t["sort-vars"]=e("./rules/sort-vars"),t["space-before-blocks"]=e("./rules/space-before-blocks"),t["space-before-function-paren"]=e("./rules/space-before-function-paren"),t["space-in-parens"]=e("./rules/space-in-parens"),t["space-infix-ops"]=e("./rules/space-infix-ops"),t["space-unary-ops"]=e("./rules/space-unary-ops"),t["spaced-comment"]=e("./rules/spaced-comment"),t.strict=e("./rules/strict"),t["switch-colon-spacing"]=e("./rules/switch-colon-spacing"),t["symbol-description"]=e("./rules/symbol-description"),t["template-curly-spacing"]=e("./rules/template-curly-spacing"),t["template-tag-spacing"]=e("./rules/template-tag-spacing"),t["unicode-bom"]=e("./rules/unicode-bom"),t["use-isnan"]=e("./rules/use-isnan"),t["valid-jsdoc"]=e("./rules/valid-jsdoc"),t["valid-typeof"]=e("./rules/valid-typeof"),t["vars-on-top"]=e("./rules/vars-on-top"),t["wrap-iife"]=e("./rules/wrap-iife"),t["wrap-regex"]=e("./rules/wrap-regex"),t["yield-star-spacing"]=e("./rules/yield-star-spacing"),t.yoda=e("./rules/yoda"),t}},{"./rules/accessor-pairs":82,"./rules/array-bracket-newline":83,"./rules/array-bracket-spacing":84,"./rules/array-callback-return":85,"./rules/array-element-newline":86,"./rules/arrow-body-style":87,"./rules/arrow-parens":88,"./rules/arrow-spacing":89,"./rules/block-scoped-var":90,"./rules/block-spacing":91,"./rules/brace-style":92,"./rules/callback-return":93,"./rules/camelcase":94,"./rules/capitalized-comments":95,"./rules/class-methods-use-this":96,"./rules/comma-dangle":97,"./rules/comma-spacing":98,"./rules/comma-style":99,"./rules/complexity":100,"./rules/computed-property-spacing":101,"./rules/consistent-return":102,"./rules/consistent-this":103,"./rules/constructor-super":104,"./rules/curly":105,"./rules/default-case":106,"./rules/dot-location":107,"./rules/dot-notation":108,"./rules/eol-last":109,"./rules/eqeqeq":110,"./rules/for-direction":111,"./rules/func-call-spacing":112,"./rules/func-name-matching":113,"./rules/func-names":114,"./rules/func-style":115,"./rules/generator-star-spacing":116,"./rules/global-require":117,"./rules/guard-for-in":118,"./rules/handle-callback-err":119,"./rules/id-blacklist":120,"./rules/id-length":121,"./rules/id-match":122,"./rules/indent":124,"./rules/indent-legacy":123,"./rules/init-declarations":125,"./rules/jsx-quotes":126,"./rules/key-spacing":127,"./rules/keyword-spacing":128,"./rules/line-comment-position":129,"./rules/linebreak-style":130,"./rules/lines-around-comment":131,"./rules/lines-around-directive":132,"./rules/max-depth":133,"./rules/max-len":134,"./rules/max-lines":135,"./rules/max-nested-callbacks":136,"./rules/max-params":137,"./rules/max-statements":139,"./rules/max-statements-per-line":138,"./rules/multiline-ternary":140,"./rules/new-cap":141,"./rules/new-parens":142,"./rules/newline-after-var":143,"./rules/newline-before-return":144,"./rules/newline-per-chained-call":145,"./rules/no-alert":146,"./rules/no-array-constructor":147,"./rules/no-await-in-loop":148,"./rules/no-bitwise":149,"./rules/no-buffer-constructor":150,"./rules/no-caller":151,"./rules/no-case-declarations":152,"./rules/no-catch-shadow":153,"./rules/no-class-assign":154,"./rules/no-compare-neg-zero":155,"./rules/no-cond-assign":156,"./rules/no-confusing-arrow":157,"./rules/no-console":158,"./rules/no-const-assign":159,"./rules/no-constant-condition":160,"./rules/no-continue":161,"./rules/no-control-regex":162,"./rules/no-debugger":163,"./rules/no-delete-var":164,"./rules/no-div-regex":165,"./rules/no-dupe-args":166,"./rules/no-dupe-class-members":167,"./rules/no-dupe-keys":168,"./rules/no-duplicate-case":169,"./rules/no-duplicate-imports":170,"./rules/no-else-return":171,"./rules/no-empty":175,"./rules/no-empty-character-class":172,"./rules/no-empty-function":173,"./rules/no-empty-pattern":174,"./rules/no-eq-null":176,"./rules/no-eval":177,"./rules/no-ex-assign":178,"./rules/no-extend-native":179,"./rules/no-extra-bind":180,"./rules/no-extra-boolean-cast":181,"./rules/no-extra-label":182,"./rules/no-extra-parens":183,"./rules/no-extra-semi":184,"./rules/no-fallthrough":185,"./rules/no-floating-decimal":186,"./rules/no-func-assign":187,"./rules/no-global-assign":188,"./rules/no-implicit-coercion":189,"./rules/no-implicit-globals":190,"./rules/no-implied-eval":191,"./rules/no-inline-comments":192,"./rules/no-inner-declarations":193,"./rules/no-invalid-regexp":194,"./rules/no-invalid-this":195,"./rules/no-irregular-whitespace":196,"./rules/no-iterator":197,"./rules/no-label-var":198,"./rules/no-labels":199,"./rules/no-lone-blocks":200,"./rules/no-lonely-if":201,"./rules/no-loop-func":202,"./rules/no-magic-numbers":203,"./rules/no-mixed-operators":204,"./rules/no-mixed-requires":205,"./rules/no-mixed-spaces-and-tabs":206,"./rules/no-multi-assign":207,"./rules/no-multi-spaces":208,"./rules/no-multi-str":209,"./rules/no-multiple-empty-lines":210,"./rules/no-native-reassign":211,"./rules/no-negated-condition":212,"./rules/no-negated-in-lhs":213,"./rules/no-nested-ternary":214,"./rules/no-new":220,"./rules/no-new-func":215,"./rules/no-new-object":216,"./rules/no-new-require":217,"./rules/no-new-symbol":218,"./rules/no-new-wrappers":219,"./rules/no-obj-calls":221,"./rules/no-octal":223,"./rules/no-octal-escape":222,"./rules/no-param-reassign":224,"./rules/no-path-concat":225,"./rules/no-plusplus":226,"./rules/no-process-env":227,"./rules/no-process-exit":228,"./rules/no-proto":229,"./rules/no-prototype-builtins":230,"./rules/no-redeclare":231,"./rules/no-regex-spaces":232,"./rules/no-restricted-globals":233,"./rules/no-restricted-imports":234,"./rules/no-restricted-modules":235,"./rules/no-restricted-properties":236,"./rules/no-restricted-syntax":237,"./rules/no-return-assign":238,"./rules/no-return-await":239,"./rules/no-script-url":240,"./rules/no-self-assign":241,"./rules/no-self-compare":242,"./rules/no-sequences":243,"./rules/no-shadow":245,"./rules/no-shadow-restricted-names":244,"./rules/no-spaced-func":246,"./rules/no-sparse-arrays":247,"./rules/no-sync":248,"./rules/no-tabs":249,"./rules/no-template-curly-in-string":250,"./rules/no-ternary":251,"./rules/no-this-before-super":252,"./rules/no-throw-literal":253,"./rules/no-trailing-spaces":254,"./rules/no-undef":256,"./rules/no-undef-init":255,"./rules/no-undefined":257,"./rules/no-underscore-dangle":258,"./rules/no-unexpected-multiline":259,"./rules/no-unmodified-loop-condition":260,"./rules/no-unneeded-ternary":261,"./rules/no-unreachable":262,"./rules/no-unsafe-finally":263,"./rules/no-unsafe-negation":264,"./rules/no-unused-expressions":265,"./rules/no-unused-labels":266,"./rules/no-unused-vars":267,"./rules/no-use-before-define":268,"./rules/no-useless-call":269,"./rules/no-useless-computed-key":270,"./rules/no-useless-concat":271,"./rules/no-useless-constructor":272,"./rules/no-useless-escape":273,"./rules/no-useless-rename":274,"./rules/no-useless-return":275,"./rules/no-var":276,"./rules/no-void":277,"./rules/no-warning-comments":278,"./rules/no-whitespace-before-property":279,"./rules/no-with":280,"./rules/nonblock-statement-body-position":281,"./rules/object-curly-newline":282,"./rules/object-curly-spacing":283,"./rules/object-property-newline":284,"./rules/object-shorthand":285,"./rules/one-var":287,"./rules/one-var-declaration-per-line":286,"./rules/operator-assignment":288,"./rules/operator-linebreak":289,"./rules/padded-blocks":290,"./rules/padding-line-between-statements":291,"./rules/prefer-arrow-callback":292,"./rules/prefer-const":293,"./rules/prefer-destructuring":294,"./rules/prefer-numeric-literals":295,"./rules/prefer-promise-reject-errors":296,"./rules/prefer-reflect":297,"./rules/prefer-rest-params":298,"./rules/prefer-spread":299,"./rules/prefer-template":300,"./rules/quote-props":301,"./rules/quotes":302,"./rules/radix":303,"./rules/require-await":304,"./rules/require-jsdoc":305,"./rules/require-yield":306,"./rules/rest-spread-spacing":307,"./rules/semi":310,"./rules/semi-spacing":308,"./rules/semi-style":309,"./rules/sort-imports":311,"./rules/sort-keys":312,"./rules/sort-vars":313,"./rules/space-before-blocks":314,"./rules/space-before-function-paren":315,"./rules/space-in-parens":316,"./rules/space-infix-ops":317,"./rules/space-unary-ops":318,"./rules/spaced-comment":319,"./rules/strict":320,"./rules/switch-colon-spacing":321,"./rules/symbol-description":322,"./rules/template-curly-spacing":323,"./rules/template-tag-spacing":324,"./rules/unicode-bom":325,"./rules/use-isnan":326,"./rules/valid-jsdoc":327,"./rules/valid-typeof":328,"./rules/vars-on-top":329,"./rules/wrap-iife":330,"./rules/wrap-regex":331,"./rules/yield-star-spacing":332,"./rules/yoda":333}],80:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n=p.minItems||p.multiline&&u.length>0&&h.loc.start.line!==m.loc.end.line;y?(r.isTokenOnSameLine(f,g)&&a(t,f),r.isTokenOnSameLine(v,d)&&s(t,d)):(r.isTokenOnSameLine(f,g)||i(t,f),r.isTokenOnSameLine(v,d)||o(t,d))}var c=e.getSourceCode();return{ArrayPattern:u,ArrayExpression:u}}}},{"../ast-utils":67}],84:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing inside array brackets",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{singleValue:{type:"boolean"},objectsInArrays:{type:"boolean"},arraysInArrays:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){return!!e.options[1]&&e.options[1][t]===!l}function n(t,n){e.report({node:t,loc:n.loc.start,message:"There should be no space after '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){var t=p.getTokenAfter(n);return e.removeRange([n.range[1],t.range[0]])}})}function i(t,n){e.report({node:t,loc:n.loc.start,message:"There should be no space before '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){var t=p.getTokenBefore(n);return e.removeRange([t.range[1],n.range[0]])}})}function o(t,n){e.report({node:t,loc:n.loc.start,message:"A space is required after '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){return e.insertTextAfter(n," ")}})}function a(t,n){e.report({node:t,loc:n.loc.start,message:"A space is required before '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){return e.insertTextBefore(n," ")}})}function s(e){return e&&("ObjectExpression"===e.type||"ObjectPattern"===e.type)}function u(e){return e&&("ArrayExpression"===e.type||"ArrayPattern"===e.type)}function c(e){if(!f.spaced||0!==e.elements.length){var t=p.getFirstToken(e),c=p.getFirstToken(e,1),l=e.typeAnnotation?p.getTokenBefore(e.typeAnnotation):p.getLastToken(e),d=p.getTokenBefore(l),h=e.elements[0],m=e.elements[e.elements.length-1],g=f.objectsInArraysException&&s(h)||f.arraysInArraysException&&u(h)||f.singleElementException&&1===e.elements.length?!f.spaced:f.spaced,v=f.objectsInArraysException&&s(m)||f.arraysInArraysException&&u(m)||f.singleElementException&&1===e.elements.length?!f.spaced:f.spaced;r.isTokenOnSameLine(t,c)&&(g&&!p.isSpaceBetweenTokens(t,c)&&o(e,t),!g&&p.isSpaceBetweenTokens(t,c)&&n(e,t)),t!==d&&r.isTokenOnSameLine(d,l)&&(v&&!p.isSpaceBetweenTokens(d,l)&&a(e,l),!v&&p.isSpaceBetweenTokens(d,l)&&i(e,l))}}var l="always"===e.options[0],p=e.getSourceCode(),f={spaced:l,singleElementException:t("singleValue"),objectsInArraysException:t("objectsInArrays"),arraysInArraysException:t("arraysInArrays")};return{ArrayPattern:c,ArrayExpression:c}}}},{"../ast-utils":67}],85:[function(e,t,n){"use strict";function r(e){return e.reachable}function i(e,t){return"ArrowFunctionExpression"===e.type?t.getTokenBefore(e.body):e.id||e}function o(e){return"MemberExpression"===e.type&&l.test(u.getStaticPropertyName(e)||"")}function a(e){for(;e;){var t=e.parent;switch(t.type){case"LogicalExpression":case"ConditionalExpression":e=t;break;case"ReturnStatement":var n=u.getUpperFunction(t);if(null===n||!u.isCallee(n))return!1;e=n.parent;break;case"CallExpression":return u.isArrayFromMethod(t.callee)?t.arguments.length>=2&&t.arguments[1]===e:!!o(t.callee)&&(t.arguments.length>=1&&t.arguments[0]===e);default:return!1}}return!1}var s=e("lodash"),u=e("../ast-utils"),c=/^(?:Arrow)?FunctionExpression$/,l=/^(?:every|filter|find(?:Index)?|map|reduce(?:Right)?|some|sort)$/;t.exports={meta:{docs:{description:"enforce `return` statements in callbacks of array methods",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(t){n.shouldCheck&&n.codePath.currentSegments.some(r)&&e.report({node:t,loc:i(t,e.getSourceCode()).loc.start,message:n.hasReturn?"Expected to return a value at the end of {{name}}.":"Expected to return a value in {{name}}.",data:{name:u.getFunctionNameWithKind(n.node)}})}var n={upper:null,codePath:null,hasReturn:!1,shouldCheck:!1,node:null};return{onCodePathStart:function(e,t){n={upper:n,codePath:e,hasReturn:!1,shouldCheck:c.test(t.type)&&"BlockStatement"===t.body.type&&a(t)&&!t.async&&!t.generator,node:t}},onCodePathEnd:function(){n=n.upper},ReturnStatement:function(t){n.shouldCheck&&(n.hasReturn=!0,t.argument||e.report({node:t,message:"{{name}} expected a return value.",data:{name:s.upperFirst(u.getFunctionNameWithKind(n.node))}}))},"FunctionExpression:exit":t,"ArrowFunctionExpression:exit":t}}}},{"../ast-utils":67,lodash:48}],86:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce line breaks after each array element",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}]},create:function(e){function t(e){var t=!1,n=void 0;return e=e||"always","always"===e||0===e.minItems?n=0:"never"===e?n=Number.POSITIVE_INFINITY:(t=Boolean(e.multiline),n=e.minItems||Number.POSITIVE_INFINITY),{multiline:t,minItems:n}}function n(e){var n=t(e);return{ArrayExpression:n,ArrayPattern:n}}function i(t){var n=s.getTokenBefore(t,{includeComments:!0});e.report({loc:{start:n.loc.end,end:t.loc.start},message:"There should be no linebreak here.",fix:function(e){if(r.isCommentToken(n))return null;if(!r.isTokenOnSameLine(n,t))return e.replaceTextRange([n.range[1],t.range[0]]," ");var i=s.getTokenBefore(n,{includeComments:!0});return r.isCommentToken(i)?null:e.replaceTextRange([i.range[1],n.range[0]],"")}})}function o(t){var n=s.getTokenBefore(t,{includeComments:!0});e.report({loc:{start:n.loc.end,end:t.loc.start},message:"There should be a linebreak after this element.",fix:function(e){return e.replaceTextRange([n.range[1],t.range[0]],"\n")}})}function a(t){var a=t.elements,u=n(e.options[0]),c=u[t.type],l=!1;c.multiline&&(l=a.filter(function(e){return null!==e}).some(function(e){return e.loc.start.line!==e.loc.end.line}));var p=a.length>=c.minItems||c.multiline&&l;a.forEach(function(e,t){var n=a[t-1];if(0!==t&&null!==e&&null!==n){var u=s.getFirstTokenBetween(n,e,r.isCommaToken),c=s.getTokenBefore(u),l=s.getTokenAfter(u);p?r.isTokenOnSameLine(c,l)&&o(l):r.isTokenOnSameLine(c,l)||i(l)}})}var s=e.getSourceCode();return{ArrayPattern:a,ArrayExpression:a}}}},{"../ast-utils":67}],87:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require braces around arrow function bodies",category:"ECMAScript 6",recommended:!1},schema:{anyOf:[{type:"array",items:[{enum:["always","never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["as-needed"]},{type:"object",properties:{requireReturnForObjectLiteral:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code"},create:function(e){function t(t){var n=t.body;if("BlockStatement"===n.type){var c=n.body;if(1!==c.length&&!a)return;if(o&&s&&"ReturnStatement"===c[0].type&&c[0].argument&&"ObjectExpression"===c[0].argument.type)return;(a||o&&"ReturnStatement"===c[0].type)&&e.report({node:t,loc:n.loc.start,message:"Unexpected block statement surrounding arrow body.",fix:function(e){if(1!==c.length||"ReturnStatement"!==c[0].type||!c[0].argument)return null;var t=u.getText(),i=u.getFirstToken(c[0]),o=u.getTokenAfter(i),a=u.getLastToken(c[0]);r.isSemicolonToken(a)&&(a=u.getTokenBefore(a));var s=u.getTokenAfter(n);if(s&&"Punctuator"===s.type&&/^[([\/`+-]/.test(s.value))return null;var l=t.slice(n.range[0]+1,i.range[0]),p=t.slice(i.range[1],o.range[0]),f=t.slice(o.range[0],a.range[1]),d=r.isOpeningBraceToken(o)?"("+f+")":f,h=t.slice(a.range[1],c[0].range[1]-1),m=t.slice(c[0].range[1],n.range[1]-1);return e.replaceText(n,(l+p).replace(/^\s*$/,"")+d+(h+m).replace(/^\s*$/,""))}})}else(i||o&&s&&"ObjectExpression"===n.type)&&e.report({node:t,loc:n.loc.start,message:"Expected block statement surrounding arrow body.",fix:function(e){var i=u.getLastTokenBetween(u.getFirstToken(t),n,r.isNotOpeningParenToken),o=u.getTokenAfter(i);return e.replaceTextRange([o.range[0],t.range[1]],"{return "+u.getText().slice(o.range[0],t.range[1])+"}")}})}var n=e.options,i="always"===n[0],o=!n[0]||"as-needed"===n[0],a="never"===n[0],s=n[1]&&n[1].requireReturnForObjectLiteral,u=e.getSourceCode();return{ArrowFunctionExpression:t}}}},{"../ast-utils":67}],88:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require parentheses around arrow function arguments",category:"ECMAScript 6",recommended:!1},fixable:"code",schema:[{enum:["always","as-needed"]},{type:"object",properties:{requireForBlockBody:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){function l(e){var t=c.getTokenAfter(f),n=c.getTokenAfter(t),r=p?c.getTokenBefore(f):null,i=r&&r.end===f.start;return e.replaceTextRange([f.range[0],n.range[1]],""+(i?" ":"")+t.value)}var p=t.async,f=c.getFirstToken(t,p?1:0);if(u&&1===t.params.length&&"Identifier"===t.params[0].type&&!t.params[0].typeAnnotation&&"BlockStatement"!==t.body.type&&!t.returnType)return void(r.isOpeningParenToken(f)&&e.report({node:t,message:a,fix:l}));if(u&&"BlockStatement"===t.body.type)return void(r.isOpeningParenToken(f)||e.report({node:t,message:s,fix:function(e){return e.replaceText(f,"("+f.value+")")}}));if(o&&1===t.params.length&&"Identifier"===t.params[0].type&&!t.params[0].typeAnnotation&&!t.returnType)return void(r.isOpeningParenToken(f)&&e.report({node:t,message:i,fix:l}));if("Identifier"===f.type){var d=c.getTokenAfter(f);")"!==d.value&&e.report({node:t,message:n,fix:function(e){return e.replaceText(f,"("+f.value+")")}})}}var n="Expected parentheses around arrow function argument.",i="Unexpected parentheses around single function argument.",o="as-needed"===e.options[0],a="Unexpected parentheses around single function argument having a body with no curly braces",s="Expected parentheses around arrow function argument having a body with curly braces.",u=o&&e.options[1]&&e.options[1].requireForBlockBody===!0,c=e.getSourceCode();return{ArrowFunctionExpression:t}}}},{"../ast-utils":67}],89:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing before and after the arrow in arrow functions",category:"ECMAScript 6",recommended:!1},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){var t=s.getTokenBefore(e.body,r.isArrowToken);return{before:s.getTokenBefore(t),arrow:t,after:s.getTokenAfter(t)}}function n(e){var t=e.arrow.range[0]-e.before.range[1],n=e.after.range[0]-e.arrow.range[1];return{before:t,after:n}}function i(r){var i=t(r),a=n(i);o.before?0===a.before&&e.report({node:i.before,message:"Missing space before =>.",fix:function(e){return e.insertTextBefore(i.arrow," ")}}):a.before>0&&e.report({node:i.before,message:"Unexpected space before =>.",fix:function(e){return e.removeRange([i.before.range[1],i.arrow.range[0]])}}),o.after?0===a.after&&e.report({node:i.after,message:"Missing space after =>.",fix:function(e){return e.insertTextAfter(i.arrow," ")}}):a.after>0&&e.report({node:i.after,message:"Unexpected space after =>.",fix:function(e){return e.removeRange([i.arrow.range[1],i.after.range[0]])}})}var o={before:!0,after:!0},a=e.options[0]||{};o.before=a.before!==!1,o.after=a.after!==!1;var s=e.getSourceCode();return{ArrowFunctionExpression:i}}}},{"../ast-utils":67}],90:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce the use of variables within the scope they are defined",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(e){o.push(e.range)}function n(){o.pop()}function r(t){var n=t.identifier;e.report({node:n,message:"'{{name}}' used outside of binding context.",data:{name:n.name}})}function i(t){function n(e){var t=e.identifier.range;return t[0]i[1]; }if("var"===t.kind)for(var i=o[o.length-1],a=e.getDeclaredVariables(t),s=0;s0?s.getTokenBefore(e.cases[0]):s.getLastToken(e,1):s.getFirstToken(e)}function n(e,t){return!r.isTokenOnSameLine(e,t)||s.isSpaceBetweenTokens(e,t)===o}function i(r){var i=t(r),u=s.getLastToken(r),c=s.getTokenAfter(i,{includeComments:!0}),l=s.getTokenBefore(u,{includeComments:!0});"Punctuator"===i.type&&"{"===i.value&&"Punctuator"===u.type&&"}"===u.value&&c!==u&&(o||"Line"!==c.type)&&(n(i,c)||e.report({node:r,loc:i.loc.start,message:"{{message}} after '{'.",data:{message:a},fix:function(e){return o?e.insertTextBefore(c," "):e.removeRange([i.range[1],c.range[0]])}}),n(l,u)||e.report({node:r,loc:u.loc.start,message:"{{message}} before '}'.",data:{message:a},fix:function(e){return o?e.insertTextAfter(l," "):e.removeRange([l.range[1],u.range[0]])}}))}var o="never"!==e.options[0],a=o?"Requires a space":"Unexpected space(s)",s=e.getSourceCode();return{BlockStatement:i,SwitchStatement:i}}}},{"../ast-utils":67}],92:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent brace style for blocks",category:"Stylistic Issues",recommended:!1},schema:[{enum:["1tbs","stroustrup","allman"]},{type:"object",properties:{allowSingleLine:{type:"boolean"}},additionalProperties:!1}],fixable:"whitespace"},create:function(e){function t(e,t){var n=[e.range[1],t.range[0]],r=s.text.slice(n[0],n[1]);return r.trim()?null:function(e){return e.replaceTextRange(n," ")}}function n(n,i){var p=s.getTokenBefore(n),d=s.getTokenAfter(n),h=s.getTokenBefore(i),m=a.allowSingleLine&&r.isTokenOnSameLine(n,i);"allman"===o||r.isTokenOnSameLine(p,n)||e.report({node:n,message:u,fix:t(p,n)}),"allman"===o&&r.isTokenOnSameLine(p,n)&&!m&&e.report({node:n,message:c,fix:function(e){return e.insertTextBefore(n,"\n")}}),r.isTokenOnSameLine(n,d)&&d!==i&&!m&&e.report({node:n,message:l,fix:function(e){return e.insertTextAfter(n,"\n")}}),h!==n&&!m&&r.isTokenOnSameLine(h,i)&&e.report({node:i,message:f,fix:function(e){return e.insertTextBefore(i,"\n")}})}function i(n){var i=s.getTokenAfter(n);"1tbs"!==o||r.isTokenOnSameLine(n,i)||e.report({node:n,message:p,fix:t(n,i)}),"1tbs"!==o&&r.isTokenOnSameLine(n,i)&&e.report({node:n,message:d,fix:function(e){return e.insertTextAfter(n,"\n")}})}var o=e.options[0]||"1tbs",a=e.options[1]||{},s=e.getSourceCode(),u="Opening curly brace does not appear on the same line as controlling statement.",c="Opening curly brace appears on the same line as controlling statement.",l="Statement inside of curly braces should be on next line.",p="Closing curly brace does not appear on the same line as the subsequent block.",f="Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",d="Closing curly brace appears on the same line as the subsequent block.";return{BlockStatement:function(e){r.STATEMENT_LIST_PARENTS.has(e.parent.type)||n(s.getFirstToken(e),s.getLastToken(e))},ClassBody:function(e){n(s.getFirstToken(e),s.getLastToken(e))},SwitchStatement:function(e){var t=s.getLastToken(e),r=s.getTokenBefore(e.cases.length?e.cases[0]:t);n(r,t)},IfStatement:function(e){"BlockStatement"===e.consequent.type&&e.alternate&&i(s.getLastToken(e.consequent))},TryStatement:function(e){i(s.getLastToken(e.block)),e.handler&&e.finalizer&&i(s.getLastToken(e.handler.body))}}}}},{"../ast-utils":67}],93:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require `return` statements after callbacks",category:"Node.js and CommonJS",recommended:!1},schema:[{type:"array",items:{type:"string"}}]},create:function(e){function t(e,n){return e.parent?n.indexOf(e.parent.type)===-1?t(e.parent,n):e.parent:null}function n(e){if("Identifier"===e.type)return!0;if("MemberExpression"===e.type){if("Identifier"===e.object.type)return!0;if("MemberExpression"===e.object.type)return n(e.object)}return!1}function r(e){return n(e.callee)&&o.indexOf(a.getText(e.callee))>-1}function i(e,t){return!(!t||"ExpressionStatement"!==t.type)&&(t.expression===e||("BinaryExpression"===t.expression.type||"LogicalExpression"===t.expression.type)&&t.expression.right===e)}var o=e.options[0]||["callback","cb","next"],a=e.getSourceCode();return{CallExpression:function(n){if(r(n)){var o=t(n,["BlockStatement","ReturnStatement","ArrowFunctionExpression"])||{};if("ReturnStatement"!==o.type&&"ArrowFunctionExpression"!==o.type){if("BlockStatement"===o.type){var a=o.body[o.body.length-1];if(i(n,a)){var s=o.parent.type;if("FunctionExpression"===s||"FunctionDeclaration"===s||"ArrowFunctionExpression"===s)return}if("ReturnStatement"===a.type&&i(n,o.body[o.body.length-2]))return}t(n,["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"])&&e.report({node:n,message:"Expected return with your callback function."})}}}}}}},{}],94:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce camelcase naming convention",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{properties:{enum:["always","never"]}},additionalProperties:!1}]},create:function(e){function t(e){return e.indexOf("_")>-1&&e!==e.toUpperCase()}function n(t){r.indexOf(t)<0&&(r.push(t),e.report({node:t,message:"Identifier '{{name}}' is not in camel case.",data:{name:t.name}}))}var r=[],i=new Set(["CallExpression","NewExpression"]),o=e.options[0]||{},a=o.properties||"";return"always"!==a&&"never"!==a&&(a="always"),{Identifier:function(e){var r=e.name.replace(/^_+|_+$/g,""),o="MemberExpression"===e.parent.type?e.parent.parent:e.parent;if("MemberExpression"===e.parent.type){if("never"===a)return;"Identifier"===e.parent.object.type&&e.parent.object.name===e.name&&t(r)?n(e):"AssignmentExpression"===o.type&&t(r)&&("MemberExpression"!==o.right.type||"MemberExpression"===o.left.type&&o.left.property.name===e.name)&&n(e)}else if("Property"===e.parent.type){if("never"===a)return;if(e.parent.parent&&"ObjectPattern"===e.parent.parent.type&&e.parent.key===e&&e.parent.value!==e)return;t(r)&&!i.has(o.type)&&n(e)}else["ImportSpecifier","ImportNamespaceSpecifier","ImportDefaultSpecifier"].indexOf(e.parent.type)>=0?e.parent.local&&e.parent.local.name===e.name&&t(r)&&n(e):t(r)&&!i.has(o.type)&&n(e)}}}}},{}],95:[function(e,t,n){"use strict";function r(e,t){return e?Object.assign({},d,e[t]||e):Object.assign({},d)}function i(e){return{Line:r(e,"line"),Block:r(e,"block")}}function o(e){Object.keys(e).forEach(function(t){var n=e[t].ignorePattern;if(n){var r=RegExp("^\\s*(?:"+n+")");e[t].ignorePatternRegExp=r}})}var a=e("../util/patterns/letters"),s=e("../ast-utils"),u="Comments should not begin with a lowercase character",c="Comments should not begin with an uppercase character",l=s.COMMENTS_IGNORE_PATTERN,p=/\s/g,f=/^\s*[^:\/?#\s]+:\/\/[^?#]/,d={ignorePattern:null,ignoreInlineComments:!1,ignoreConsecutiveComments:!1},h={type:"object",properties:{ignorePattern:{type:"string"},ignoreInlineComments:{type:"boolean"},ignoreConsecutiveComments:{type:"boolean"}},additionalProperties:!1};t.exports={meta:{docs:{description:"enforce or disallow capitalization of the first letter of a comment",category:"Stylistic Issues",recommended:!1},fixable:"code",schema:[{enum:["always","never"]},{oneOf:[h,{type:"object",properties:{line:h,block:h},additionalProperties:!1}]}]},create:function(e){function t(e){var t=m.getTokenBefore(e,{includeComments:!0}),n=m.getTokenAfter(e,{includeComments:!0});return Boolean(t&&n&&e.loc.start.line===t.loc.end.line&&e.loc.end.line===n.loc.start.line)}function n(e){var t=m.getTokenBefore(e,{includeComments:!0});return Boolean(t&&["Block","Line"].indexOf(t.type)!==-1)}function r(e,r){if(l.test(e.value))return!0;var i=e.value.replace(/\*/g,"");if(r.ignorePatternRegExp&&r.ignorePatternRegExp.test(i))return!0;if(r.ignoreInlineComments&&t(e))return!0;if(r.ignoreConsecutiveComments&&n(e))return!0;if(f.test(i))return!0;var o=i.replace(p,"");if(0===o.length)return!0;var s=o[0];if(!a.test(s))return!0;var u=s!==s.toLocaleLowerCase(),c=s!==s.toLocaleUpperCase();return("always"!==d||!c)&&("never"!==d||!u)}function s(t){var n=h[t.type],i=r(t,n);if(!i){var o="always"===d?u:c;e.report({node:null,loc:t.loc,message:o,fix:function(e){var n=t.value.match(a);return e.replaceTextRange([t.range[0]+n.index+2,t.range[0]+n.index+3],"always"===d?n[0].toLocaleUpperCase():n[0].toLocaleLowerCase())}})}}var d=e.options[0]||"always",h=i(e.options[1]),m=e.getSourceCode();return o(h),{Program:function(){var e=m.getAllComments();e.filter(function(e){return"Shebang"!==e.type}).forEach(s)}}}}},{"../ast-utils":67,"../util/patterns/letters":351}],96:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce that class methods utilize `this`",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{exceptMethods:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},create:function(e){function t(){u.push(!1)}function n(e){return!e.static&&"constructor"!==e.kind&&"MethodDefinition"===e.type}function r(e){return n(e)&&!s.has(e.key.name)}function i(t){var n=u.pop();r(t.parent)&&!n&&e.report({node:t,message:"Expected 'this' to be used by class method '{{classMethod}}'.",data:{classMethod:t.parent.key.name}})}function o(){u.length&&(u[u.length-1]=!0)}var a=e.options[0]?Object.assign({},e.options[0]):{},s=new Set(a.exceptMethods||[]),u=[];return{FunctionDeclaration:t,"FunctionDeclaration:exit":i,FunctionExpression:t,"FunctionExpression:exit":i,ThisExpression:o,Super:o}}}},{}],97:[function(e,t,n){"use strict";function r(e){return!("RestElement"===e.type||"RestProperty"===e.type||"ExperimentalRestProperty"===e.type)}function i(e){return"string"==typeof e?{arrays:e,objects:e,imports:e,exports:e,functions:"ignore"}:"object"===("undefined"==typeof e?"undefined":o(e))&&null!==e?{arrays:e.arrays||u.arrays,objects:e.objects||u.objects,imports:e.imports||u.imports,exports:e.exports||u.exports,functions:e.functions||u.functions}:u}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=e("lodash"),s=e("../ast-utils"),u=Object.freeze({arrays:"never",objects:"never",imports:"never",exports:"never",functions:"ignore"});t.exports={meta:{docs:{description:"require or disallow trailing commas",category:"Stylistic Issues",recommended:!1},fixable:"code",schema:[{defs:{value:{enum:["always","always-multiline","only-multiline","never"]},valueWithIgnore:{anyOf:[{$ref:"#/defs/value"},{enum:["ignore"]}]}},anyOf:[{$ref:"#/defs/value"},{type:"object",properties:{arrays:{$refs:"#/defs/valueWithIgnore"},objects:{$refs:"#/defs/valueWithIgnore"},imports:{$refs:"#/defs/valueWithIgnore"},exports:{$refs:"#/defs/valueWithIgnore"},functions:{$refs:"#/defs/valueWithIgnore"}},additionalProperties:!1}]}]},create:function(e){function t(e){switch(e.type){case"ObjectExpression":case"ObjectPattern":return a.last(e.properties);case"ArrayExpression":case"ArrayPattern":return a.last(e.elements);case"ImportDeclaration":case"ExportNamedDeclaration":return a.last(e.specifiers);case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":return a.last(e.params);case"CallExpression":case"NewExpression":return a.last(e.arguments);default:return null}}function n(e,t){switch(e.type){case"ObjectExpression":case"ArrayExpression":case"CallExpression":case"NewExpression":return d.getLastToken(e,1);default:var n=d.getTokenAfter(t);return s.isCommaToken(n)?n:d.getLastToken(t)}}function o(e){var r=t(e);if(!r)return!1;var i=n(e,r),o=d.getTokenAfter(i);return o.loc.end.line!==i.loc.end.line}function u(r){var i=t(r);if(i&&("ImportDeclaration"!==r.type||"ImportSpecifier"===i.type)){var o=n(r,i);s.isCommaToken(o)&&e.report({node:i,loc:o.loc.start,message:h,fix:function(e){return e.remove(o)}})}}function c(i){var o=t(i);if(o&&("ImportDeclaration"!==i.type||"ImportSpecifier"===o.type)){if(!r(o))return void u(i);var a=n(i,o);","!==a.value&&e.report({node:o,loc:a.loc.end,message:m,fix:function(e){return e.insertTextAfter(a,",")}})}}function l(e){o(e)?c(e):u(e)}function p(e){o(e)||u(e)}var f=i(e.options[0]),d=e.getSourceCode(),h="Unexpected trailing comma.",m="Missing trailing comma.",g={always:c,"always-multiline":l,"only-multiline":p,never:u,ignore:a.noop};return{ObjectExpression:g[f.objects],ObjectPattern:g[f.objects],ArrayExpression:g[f.arrays],ArrayPattern:g[f.arrays],ImportDeclaration:g[f.imports],ExportNamedDeclaration:g[f.exports],FunctionDeclaration:g[f.functions],FunctionExpression:g[f.functions],ArrowFunctionExpression:g[f.functions],CallExpression:g[f.functions],NewExpression:g[f.functions]}}}},{"../ast-utils":67,lodash:48}],98:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing before and after commas",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t,n,r){e.report({node:t,fix:function(e){if(s[n])return"before"===n?e.insertTextBefore(t," "):e.insertTextAfter(t," ");var i=void 0,o=void 0,a="";return"before"===n?(i=r.range[1],o=t.range[0]):(i=t.range[1],o=r.range[0]),e.replaceTextRange([i,o],a)},message:s[n]?"A space is required {{dir}} ','.":"There should be no space {{dir}} ','.",data:{dir:n}})}function n(e,n){e.left&&r.isTokenOnSameLine(e.left,e.comma)&&s.before!==o.isSpaceBetweenTokens(e.left,e.comma)&&t(n,"before",e.left),e.right&&!s.after&&"Line"===e.right.type||e.right&&r.isTokenOnSameLine(e.comma,e.right)&&s.after!==o.isSpaceBetweenTokens(e.comma,e.right)&&t(n,"after",e.right)}function i(e){var t=o.getFirstToken(e);e.elements.forEach(function(e){var n=void 0;null===e?(n=o.getTokenAfter(t),r.isCommaToken(n)&&u.push(n)):n=o.getTokenAfter(e),t=n})}var o=e.getSourceCode(),a=o.tokensAndComments,s={before:!!e.options[0]&&!!e.options[0].before,after:!e.options[0]||!!e.options[0].after},u=[];return{"Program:exit":function(){a.forEach(function(e,t){if(r.isCommaToken(e)&&(!e||"JSXText"!==e.type)){var i=a[t-1],o=a[t+1];n({comma:e,left:r.isCommaToken(i)||u.indexOf(e)>-1?null:i,right:r.isCommaToken(o)?null:o},e)}})},ArrayExpression:i,ArrayPattern:i}}}},{"../ast-utils":67}],99:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent comma style",category:"Stylistic Issues",recommended:!1},fixable:"code",schema:[{enum:["first","last"]},{type:"object",properties:{exceptions:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}]},create:function(e){function t(e,t){switch(e){case"between":return","+t.replace("\n","");case"first":return t+",";case"last":return","+t;default:return""}}function n(e,n,r,i){var o=s.text.slice(n.range[1],r.range[0])+s.text.slice(r.range[1],i.range[0]),a=[n.range[1],i.range[0]];return function(n){return n.replaceTextRange(a,t(e,o))}}function i(t,i,o,s){r.isTokenOnSameLine(i,o)&&r.isTokenOnSameLine(t,i)||(r.isTokenOnSameLine(i,o)||r.isTokenOnSameLine(t,i)?"first"!==a||r.isTokenOnSameLine(i,o)?"last"===a&&r.isTokenOnSameLine(i,o)&&e.report({node:s,loc:{line:i.loc.end.line,column:i.loc.end.column},message:"',' should be placed last.",fix:n(a,t,i,o)}):e.report({node:s,message:"',' should be placed first.",fix:n(a,t,i,o)}):e.report({node:s,loc:{line:i.loc.end.line,column:i.loc.start.column},message:"Bad line breaking before and after ','.",fix:n("between",t,i,o)}))}function o(e,t){var n=e[t],o="ArrayExpression"===e.type||"ArrayPattern"===e.type;if(n.length>1||o){var a=s.getFirstToken(e);if(n.forEach(function(e){var t=e?s.getTokenBefore(e):a,n=e?s.getFirstToken(e):s.getTokenAfter(t),o=e||n,u=s.getTokenBefore(t);if(u&&r.isClosingParenToken(u)&&(a=u),r.isCommaToken(t)&&i(a,t,n,o),e){var c=s.getTokenAfter(e,r.isNotClosingParenToken);a=c?s.getTokenBefore(c):s.ast.tokens[s.ast.tokens.length-1]}}),o){var u=s.getLastToken(e),c=s.getTokenBefore(u);r.isCommaToken(c)&&i(s.getTokenBefore(c),c,u,u)}}}var a=e.options[0]||"last",s=e.getSourceCode(),u={ArrayPattern:!0,ArrowFunctionExpression:!0,CallExpression:!0,FunctionDeclaration:!0,FunctionExpression:!0,ImportDeclaration:!0,ObjectPattern:!0};if(2===e.options.length&&e.options[1].hasOwnProperty("exceptions"))for(var c=Object.keys(e.options[1].exceptions),l=0;ll&&e.report({node:t,message:"{{name}} has a complexity of {{complexity}}.",data:{name:n,complexity:r}})}function a(){p.length&&p[p.length-1]++}function s(e){e.test&&a()}function u(e){"||"===e.operator&&a()}var c=e.options[0],l=20;"object"===("undefined"==typeof c?"undefined":r(c))&&c.hasOwnProperty("maximum")&&"number"==typeof c.maximum&&(l=c.maximum),"object"===("undefined"==typeof c?"undefined":r(c))&&c.hasOwnProperty("max")&&"number"==typeof c.max&&(l=c.max),"number"==typeof c&&(l=c);var p=[];return{FunctionDeclaration:t,FunctionExpression:t,ArrowFunctionExpression:t,"FunctionDeclaration:exit":n,"FunctionExpression:exit":n,"ArrowFunctionExpression:exit":n,CatchClause:a,ConditionalExpression:a,LogicalExpression:u,ForStatement:a,ForInStatement:a,ForOfStatement:a,IfStatement:a,SwitchCase:s,WhileStatement:a,DoWhileStatement:a}}}},{"../ast-utils":67,lodash:48}],101:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing inside computed property brackets",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]}]},create:function(e){function t(t,n,r){e.report({node:t,loc:n.loc.start,message:"There should be no space after '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){return e.removeRange([n.range[1],r.range[0]])}})}function n(t,n,r){e.report({node:t,loc:n.loc.start,message:"There should be no space before '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){return e.removeRange([r.range[1],n.range[0]])}})}function i(t,n){e.report({node:t,loc:n.loc.start,message:"A space is required after '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){return e.insertTextAfter(n," ")}})}function o(t,n){e.report({node:t,loc:n.loc.start,message:"A space is required before '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){return e.insertTextBefore(n," ")}})}function a(e){return function(a){if(a.computed){var c=a[e],l=s.getTokenBefore(c),p=s.getFirstToken(c),f=s.getLastToken(c),d=s.getTokenAfter(c);r.isTokenOnSameLine(l,p)&&(u?!s.isSpaceBetweenTokens(l,p)&&r.isTokenOnSameLine(l,p)&&i(a,l):s.isSpaceBetweenTokens(l,p)&&t(a,l,p)),r.isTokenOnSameLine(f,d)&&(u?!s.isSpaceBetweenTokens(f,d)&&r.isTokenOnSameLine(f,d)&&o(a,d):s.isSpaceBetweenTokens(f,d)&&n(a,d,f))}}}var s=e.getSourceCode(),u="always"===e.options[0];return{Property:a("key"),MemberExpression:a("property")}}}},{"../ast-utils":67}],102:[function(e,t,n){"use strict";function r(e,t){return"Identifier"===e.type&&e.name===t}function i(e){return!e.reachable}function o(e){return"FunctionExpression"===e.type&&e.parent&&"MethodDefinition"===e.parent.type&&"constructor"===e.parent.kind}var a=e("lodash"),s=e("../ast-utils");t.exports={meta:{docs:{description:"require `return` statements to either always or never specify values",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{treatUndefinedAsUnspecified:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){var n=void 0,r=void 0;!c.hasReturnValue||c.codePath.currentSegments.every(i)||s.isES5Constructor(t)||o(t)||("Program"===t.type?(n={line:1,column:0},r="program"):n="ArrowFunctionExpression"===t.type?e.getSourceCode().getTokenBefore(t.body,s.isArrowToken).loc.start:"MethodDefinition"===t.parent.type||"Property"===t.parent.type&&t.parent.method?t.parent.key.loc.start:(t.id||t).loc.start,r||(r=s.getFunctionNameWithKind(t)),e.report({node:t,loc:n,message:"Expected to return a value at the end of {{name}}.",data:{name:r}}))}var n=e.options[0]||{},u=n.treatUndefinedAsUnspecified===!0,c=null;return{onCodePathStart:function(e,t){c={upper:c,codePath:e,hasReturn:!1,hasReturnValue:!1,message:"",node:t}},onCodePathEnd:function(){c=c.upper},ReturnStatement:function(t){var n=t.argument,i=Boolean(n);u&&i&&(i=!r(n,"undefined")&&"void"!==n.operator),c.hasReturn?c.hasReturnValue!==i&&e.report({node:t,message:c.message,data:c.data}):(c.hasReturn=!0,c.hasReturnValue=i,c.message="{{name}} expected {{which}} return value.",c.data={name:"Program"===c.node.type?"Program":a.upperFirst(s.getFunctionNameWithKind(c.node)),which:i?"a":"no"})},"Program:exit":t,"FunctionDeclaration:exit":t,"FunctionExpression:exit":t,"ArrowFunctionExpression:exit":t}}}},{"../ast-utils":67,lodash:48}],103:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce consistent naming when capturing the current execution context",category:"Stylistic Issues",recommended:!1},schema:{type:"array",items:{type:"string",minLength:1},uniqueItems:!0}},create:function(e){function t(t,n){e.report({node:t,message:"Designated alias '{{alias}}' is not assigned to 'this'.",data:{alias:n}})}function n(n,r,i){var a="ThisExpression"===i.type;o.indexOf(r)!==-1?(!a||n.operator&&"="!==n.operator)&&t(n,r):a&&e.report({node:n,message:"Unexpected alias '{{name}}' for 'this'.",data:{name:r}})}function r(e,n){var r=n.set.get(e);r&&(r.defs.some(function(e){return"VariableDeclarator"===e.node.type&&null!==e.node.init})||r.references.some(function(e){var t=e.writeExpr;return e.from===n&&t&&"ThisExpression"===t.type&&"="===t.parent.operator})||r.defs.map(function(e){return e.node}).forEach(function(n){t(n,e)}))}function i(){var t=e.getScope();o.forEach(function(e){r(e,t)})}var o=[];return 0===e.options.length?o.push("that"):o=e.options,{"Program:exit":i,"FunctionExpression:exit":i,"FunctionDeclaration:exit":i,VariableDeclarator:function(e){var t=e.id,r="ArrayPattern"===t.type||"ObjectPattern"===t.type;null===e.init||r||n(e,t.name,e.init)},AssignmentExpression:function(e){"Identifier"===e.left.type&&n(e,e.left.name,e.right)}}}}},{}],104:[function(e,t,n){"use strict";function r(e){return e.reachable}function i(e){return"FunctionExpression"===e.type&&"MethodDefinition"===e.parent.type&&"constructor"===e.parent.kind}function o(e){if(!e)return!1;switch(e.type){case"ClassExpression":case"FunctionExpression":case"ThisExpression":case"MemberExpression":case"CallExpression":case"NewExpression":case"YieldExpression":case"TaggedTemplateExpression":case"MetaProperty":return!0;case"Identifier":return"undefined"!==e.name;case"AssignmentExpression":return o(e.right);case"LogicalExpression":return o(e.left)||o(e.right);case"ConditionalExpression":return o(e.alternate)||o(e.consequent);case"SequenceExpression":var t=e.expressions[e.expressions.length-1];return o(t);default:return!1}}t.exports={meta:{docs:{description:"require `super()` calls in constructors",category:"ECMAScript 6",recommended:!0},schema:[]},create:function(e){function t(e){return e.reachable&&s[e.id].calledInSomePaths}function n(e){return!(1!==e.nextSegments.length||!e.nextSegments[0].isLoopedPrevSegment(e))||e.reachable&&s[e.id].calledInEveryPaths}var a=null,s=Object.create(null);return{onCodePathStart:function(e,t){if(i(t)){var n=t.parent.parent.parent,r=n.superClass;a={upper:a,isConstructor:!0,hasExtends:Boolean(r),superIsConstructor:o(r),codePath:e}}else a={upper:a,isConstructor:!1,hasExtends:!1,superIsConstructor:!1,codePath:e}},onCodePathEnd:function(r,i){var o=a.hasExtends;if(a=a.upper,o){var s=r.returnedSegments,u=s.every(n),c=s.some(t);u||e.report({message:c?"Lacked a call of 'super()' in some code paths.":"Expected to call 'super()'.",node:i.parent})}},onCodePathSegmentStart:function(e){if(a&&a.isConstructor&&a.hasExtends){var r=s[e.id]={calledInSomePaths:!1,calledInEveryPaths:!1,validNodes:[]},i=e.prevSegments;i.length>0&&(r.calledInSomePaths=i.some(t),r.calledInEveryPaths=i.every(n))}},onCodePathSegmentLoop:function(r,i){if(a&&a.isConstructor&&a.hasExtends){var o=i.prevSegments.length>=2;a.codePath.traverseSegments({first:i,last:r},function(r){var i=s[r.id],a=r.prevSegments;if(i.calledInSomePaths=a.some(t),i.calledInEveryPaths=a.every(n),i.calledInSomePaths||o){var u=i.validNodes;i.validNodes=[];for(var c=0;c=2)return!0;for(e=e.consequent.body[0];e;){if("IfStatement"===e.type&&!e.alternate)return!0;e=r.getTrailingStatement(e)}}return!1}function s(t,n,r,i){e.report({node:t,loc:("else"!==r?t:o(t)).loc.start,message:"Expected { after '{{name}}'{{suffix}}.",data:{name:r,suffix:i?" "+i:""},fix:function(e){return e.replaceText(n,"{"+g.getText(n)+"}")}})}function u(e){var t=g.getTokenBefore(e),n=g.getTokenAfter(e),i=g.getNodeByRangeIndex(t.range[0]);return!r.isSemicolonToken(t)&&(!!n&&(("BlockStatement"!==i.type||"FunctionExpression"===i.parent.type||"ArrowFunctionExpression"===i.parent.type)&&(t.loc.end.line===n.loc.start.line||(!!/^[([\/`+-]/.test(n.value)||"Punctuator"===t.type&&("++"===t.value||"--"===t.value)))))}function c(t,n,i,a){e.report({node:t,loc:("else"!==i?t:o(t)).loc.start,message:"Unnecessary { after '{{name}}'{{suffix}}.",data:{name:i,suffix:a?" "+a:""},fix:function(e){var i="DoWhileStatement"===t.type&&g.getTokenBefore(n).end===n.start&&!r.canTokensBeAdjacent("do",g.getFirstToken(n,{skip:1})),o=g.getFirstToken(n),a=g.getLastToken(n),s=g.getTokenBefore(a);if(u(a))return null;var c=g.getText().slice(o.range[1],s.range[0])+g.getText(s)+g.getText().slice(s.range[1],a.range[0]);return e.replaceText(n,(i?" ":"")+c)}})}function l(e,r,i,o){var u="BlockStatement"===r.type,l=null;if("IfStatement"===e.type&&e.consequent===r&&a(e))l=!0;else if(f)u&&1===r.body.length&&(l=!1);else if(d)t(r)||(l=!0);else if(h)if(u&&1===r.body.length&&n(r.body[0])){var p=g.getCommentsBefore(r.body[0]);l=p.length>0}else n(r)||(l=!0);else l=!0;return{actual:u,expected:l,check:function(){null!==this.expected&&this.expected!==this.actual&&(this.expected?s(e,r,i,o):c(e,r,i,o))}}}function p(e){var t=[];do{if(t.push(l(e,e.consequent,"if","condition")),e.alternate&&"IfStatement"!==e.alternate.type){t.push(l(e,e.alternate,"else"));break}e=e.alternate}while(e);if(m){var n=t.some(function(e){return null!==e.expected?e.expected:e.actual});t.forEach(function(e){e.expected=n})}return t}var f="multi"===e.options[0],d="multi-line"===e.options[0],h="multi-or-nest"===e.options[0],m="consistent"===e.options[1],g=e.getSourceCode();return{IfStatement:function(e){"IfStatement"!==e.parent.type&&p(e).forEach(function(e){e.check()})},WhileStatement:function(e){l(e,e.body,"while","condition").check()},DoWhileStatement:function(e){l(e,e.body,"do").check()},ForStatement:function(e){l(e,e.body,"for","condition").check()},ForInStatement:function(e){l(e,e.body,"for-in").check()},ForOfStatement:function(e){l(e,e.body,"for-of").check()}}}}},{"../ast-utils":67}],106:[function(e,t,n){"use strict";var r=/^no default$/i;t.exports={meta:{docs:{description:"require `default` cases in `switch` statements",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{commentPattern:{type:"string"}},additionalProperties:!1}]},create:function(e){function t(e){return e[e.length-1]}var n=e.options[0]||{},i=n.commentPattern?new RegExp(n.commentPattern):r,o=e.getSourceCode();return{SwitchStatement:function(n){if(n.cases.length){var r=n.cases.some(function(e){return null===e.test});if(!r){var a=void 0,s=t(n.cases),u=o.getCommentsAfter(s);u.length&&(a=t(u)),a&&i.test(a.value.trim())||e.report({node:n,message:"Expected a default case."})}}}}}}},{}],107:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent newlines before and after dots",category:"Best Practices",recommended:!1},schema:[{enum:["object","property"]}],fixable:"code"},create:function(e){function t(t,n,i){var s=a.getTokenBefore(n),u=a.getText().slice(t.range[1],s.range[0]),c=a.getText().slice(s.range[1],n.range[0]);if("Punctuator"===s.type&&"."===s.value)if(o){if(!r.isTokenOnSameLine(t,s)){var l=r.isDecimalInteger(t)?" ":"";e.report({node:i,loc:s.loc.start,message:"Expected dot to be on same line as object.", fix:function(e){return e.replaceTextRange([t.range[1],n.range[0]],l+"."+u+c)}})}}else r.isTokenOnSameLine(s,n)||e.report({node:i,loc:s.loc.start,message:"Expected dot to be on same line as property.",fix:function(e){return e.replaceTextRange([t.range[1],n.range[0]],""+u+c+".")}})}function n(e){t(e.object,e.property,e)}var i=e.options[0],o="object"===i||!i,a=e.getSourceCode();return{MemberExpression:n}}}},{"../ast-utils":67}],108:[function(e,t,n){"use strict";var r=e("../ast-utils"),i=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,o=e("../util/keywords");t.exports={meta:{docs:{description:"enforce dot notation whenever possible",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{allowKeywords:{type:"boolean"},allowPattern:{type:"string"}},additionalProperties:!1}],fixable:"code"},create:function(e){var t=e.options[0]||{},n=void 0===t.allowKeywords||!!t.allowKeywords,a=e.getSourceCode(),s=void 0;return t.allowPattern&&(s=new RegExp(t.allowPattern)),{MemberExpression:function(t){t.computed&&"Literal"===t.property.type&&i.test(t.property.value)&&(n||o.indexOf(String(t.property.value))===-1)&&(s&&s.test(t.property.value)||e.report({node:t.property,message:"[{{propertyValue}}] is better written in dot notation.",data:{propertyValue:JSON.stringify(t.property.value)},fix:function(e){var n=a.getTokenAfter(t.object,r.isOpeningBracketToken),i=a.getLastToken(t);if(a.getFirstTokenBetween(n,i,{includeComments:!0,filter:r.isCommentToken}))return null;var o=a.getTokenAfter(i),s=o&&i.range[1]===o.range[0]&&!r.canTokensBeAdjacent(String(t.property.value),o),u=r.isDecimalInteger(t.object)?" ":"",c=s?" ":"";return e.replaceTextRange([n.range[0],i.range[1]],u+"."+t.property.value+c)}})),n||t.computed||o.indexOf(String(t.property.name))===-1||e.report({node:t.property,message:".{{propertyName}} is a syntax error.",data:{propertyName:t.property.name},fix:function(e){var n=a.getTokenBefore(t.property),r=a.text.slice(n.range[1],t.property.range[0]);return r.trim()?null:e.replaceTextRange([n.range[0],t.property.range[1]],"["+r+'"'+t.property.name+'"]')}})}}}}},{"../ast-utils":67,"../util/keywords":349}],109:[function(e,t,n){"use strict";var r=e("lodash");t.exports={meta:{docs:{description:"require or disallow newline at the end of files",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never","unix","windows"]}]},create:function(e){return{Program:function(t){var n=e.getSourceCode(),i=n.getText(),o={column:r.last(n.lines).length,line:n.lines.length},a="\n",s="\r"+a,u=r.endsWith(i,a),c=e.options[0]||"always",l=!1;"unix"===c&&(c="always"),"windows"===c&&(c="always",l=!0),"always"!==c||u?"never"===c&&u&&e.report({node:t,loc:o,message:"Newline not allowed at end of file.",fix:function(e){var t=/(?:\r?\n)+$/,r=t.exec(n.text),i=r.index,o=n.text.length;return e.replaceTextRange([i,o],"")}}):e.report({node:t,loc:o,message:"Newline required at end of file but not found.",fix:function(e){return e.insertTextAfterRange([0,i.length],l?s:a)}})}}}}},{lodash:48}],110:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("../ast-utils");t.exports={meta:{docs:{description:"require the use of `===` and `!==`",category:"Best Practices",recommended:!1},schema:{anyOf:[{type:"array",items:[{enum:["always"]},{type:"object",properties:{null:{enum:["always","never","ignore"]}},additionalProperties:!1}],additionalItems:!1},{type:"array",items:[{enum:["smart","allow-null"]}],additionalItems:!1}]},fixable:"code"},create:function(e){function t(e){return"UnaryExpression"===e.type&&"typeof"===e.operator}function n(e){return t(e.left)||t(e.right)}function o(e){return"Literal"===e.left.type&&"Literal"===e.right.type&&r(e.left.value)===r(e.right.value)}function a(e){return i.isNullLiteral(e.right)||i.isNullLiteral(e.left)}function s(e){var t=p.getTokenAfter(e.left);return{line:t.loc.start.line,column:t.loc.start.column}}function u(t,r){e.report({node:t,loc:s(t),message:"Expected '{{expectedOperator}}' and instead saw '{{actualOperator}}'.",data:{expectedOperator:r,actualOperator:t.operator},fix:function(e){if(n(t)||o(t)){var i=p.getFirstTokenBetween(t.left,t.right,function(e){return e.value===t.operator});return e.replaceText(i,r)}return null}})}var c=e.options[0]||"always",l=e.options[1]||{},p=e.getSourceCode(),f="always"===c?l.null||"always":"ignore",d="always"===f,h="never"===f;return{BinaryExpression:function(e){var t=a(e);return"=="!==e.operator&&"!="!==e.operator?void(h&&t&&u(e,e.operator.slice(0,-1))):void("smart"===c&&(n(e)||o(e)||t)||!d&&t||u(e,e.operator+"="))}}}}},{"../ast-utils":67}],111:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:'enforce "for" loop update clause moving the counter in the right direction.',category:"Possible Errors",recommended:!1},fixable:null,schema:[]},create:function(e){function t(t){e.report({node:t,message:"The update clause in this loop moves the variable in the wrong direction."})}function n(e,t){if("Identifier"===e.argument.type&&e.argument.name===t){if("++"===e.operator)return 1;if("--"===e.operator)return-1}return 0}function r(e,t){if(e.left.name===t){if("+="===e.operator)return 1;if("-="===e.operator)return-1}return 0}return{ForStatement:function(e){if(e.test&&"BinaryExpression"===e.test.type&&"Identifier"===e.test.left.type&&e.update){var i=e.test.left.name,o=e.test.operator,a=e.update;"<"===o||"<="===o?("UpdateExpression"===a.type&&n(a,i)<0&&t(e),"AssignmentExpression"===a.type&&r(a,i)<0&&t(e)):">"!==o&&">="!==o||("UpdateExpression"===a.type&&n(a,i)>0&&t(e),"AssignmentExpression"===a.type&&r(a,i)>0&&t(e))}}}}}},{}],112:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require or disallow spacing between function identifiers and their invocations",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always"]},{type:"object",properties:{allowNewlines:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]}},create:function(e){function t(t){var s=o.getLastToken(t),u=o.getLastToken(t.callee),c=o.getFirstTokenBetween(u,s,r.isOpeningParenToken),l=c&&o.getTokenBefore(c);if(c&&c.range[1]=6?s.keyword.isIdentifierES6(e):s.keyword.isIdentifierES5(e)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=e("../ast-utils"),s=e("esutils"),u={enum:["always","never"]},c={type:"object",properties:{includeCommonJSModuleExports:{type:"boolean"}},additionalProperties:!1};t.exports={meta:{docs:{description:"require function names to match the name of the variable or property to which they are assigned",category:"Stylistic Issues",recommended:!1},schema:{anyOf:[{type:"array",additionalItems:!1,items:[u,c]},{type:"array",additionalItems:!1,items:[c]}]}},create:function(e){function t(e,t){return"always"===c&&e!==t||"never"===c&&e===t}function n(t,n,r,i){var o=void 0;o="always"===c&&i?"Function name `{{funcName}}` should match property name `{{name}}`":"always"===c?"Function name `{{funcName}}` should match variable name `{{name}}`":i?"Function name `{{funcName}}` should not match property name `{{name}}`":"Function name `{{funcName}}` should not match variable name `{{name}}`",e.report({node:t,message:o,data:{name:n,funcName:r}})}function s(e){return"Literal"===e.type&&"string"==typeof e.value}var u=("object"===o(e.options[0])?e.options[0]:e.options[1])||{},c="string"==typeof e.options[0]?e.options[0]:"always",l=u.includeCommonJSModuleExports,p=e.parserOptions&&e.parserOptions.ecmaVersion?e.parserOptions.ecmaVersion:5;return{VariableDeclarator:function(e){e.init&&"FunctionExpression"===e.init.type&&"Identifier"===e.id.type&&e.init.id&&t(e.id.name,e.init.id.name)&&n(e,e.id.name,e.init.id.name,!1)},AssignmentExpression:function(e){if(!("FunctionExpression"!==e.right.type||e.left.computed&&"Literal"!==e.left.property.type||!l&&r(e.left)||"Identifier"!==e.left.type&&"MemberExpression"!==e.left.type)){var o="MemberExpression"===e.left.type,s=o?a.getStaticPropertyName(e.left):e.left.name;e.right.id&&i(s)&&t(s,e.right.id.name)&&n(e,s,e.right.id.name,o)}},Property:function(e){"FunctionExpression"!==e.value.type||!e.value.id||e.computed&&!s(e.key)||("Identifier"===e.key.type&&t(e.key.name,e.value.id.name)?n(e,e.key.name,e.value.id.name,!0):s(e.key)&&i(e.key.value,p)&&t(e.key.value,e.value.id.name)&&n(e,e.key.value,e.value.id.name,!0))}}}}},{"../ast-utils":67,esutils:33}],114:[function(e,t,n){"use strict";function r(e){return e&&"FunctionName"===e.defs[0].type}var i=e("../ast-utils");t.exports={meta:{docs:{description:"require or disallow named `function` expressions",category:"Stylistic Issues",recommended:!1},schema:[{enum:["always","as-needed","never"]}]},create:function(e){function t(e){var t=e.parent;return"MethodDefinition"===t.type||"Property"===t.type&&(t.method||"get"===t.kind||"set"===t.kind)}function n(e){var n=e.parent;return t(e)||"VariableDeclarator"===n.type&&"Identifier"===n.id.type&&n.init===e||"Property"===n.type&&n.value===e||"AssignmentExpression"===n.type&&"Identifier"===n.left.type&&n.right===e||"ExportDefaultDeclaration"===n.type&&n.declaration===e||"AssignmentPattern"===n.type&&n.right===e}var o="never"===e.options[0],a="as-needed"===e.options[0];return{"FunctionExpression:exit":function(s){var u=e.getDeclaredVariables(s)[0];if(!(r(u)&&u.references.length>0)){var c=Boolean(s.id&&s.id.name),l=i.getFunctionNameWithKind(s);o?c&&e.report({node:s,message:"Unexpected named {{name}}.",data:{name:l}}):c||(a?n(s):t(s))||e.report({node:s,message:"Unexpected unnamed {{name}}.",data:{name:l}})}}}}}},{"../ast-utils":67}],115:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce the consistent use of either `function` declarations or expressions",category:"Stylistic Issues",recommended:!1},schema:[{enum:["declaration","expression"]},{type:"object",properties:{allowArrowFunctions:{type:"boolean"}},additionalProperties:!1}]},create:function(e){var t=e.options[0],n=e.options[1]&&e.options[1].allowArrowFunctions===!0,r="declaration"===t,i=[],o={FunctionDeclaration:function(t){i.push(!1),r||"ExportDefaultDeclaration"===t.parent.type||e.report({node:t,message:"Expected a function expression."})},"FunctionDeclaration:exit":function(){i.pop()},FunctionExpression:function(t){i.push(!1),r&&"VariableDeclarator"===t.parent.type&&e.report({node:t.parent,message:"Expected a function declaration."})},"FunctionExpression:exit":function(){i.pop()},ThisExpression:function(){i.length>0&&(i[i.length-1]=!0)}};return n||(o.ArrowFunctionExpression=function(){i.push(!1)},o["ArrowFunctionExpression:exit"]=function(t){var n=i.pop();r&&!n&&"VariableDeclarator"===t.parent.type&&e.report({node:t.parent,message:"Expected a function declaration."})}),o}}},{}],116:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce consistent spacing around `*` operators in generator functions",category:"ECMAScript 6",recommended:!1},fixable:"whitespace",schema:[{oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]}]},create:function(e){function t(e){return"*"===e.value&&"Punctuator"===e.type}function n(e){return a.getFirstToken(e.parent.method||"MethodDefinition"===e.parent.type?e.parent:e,t)}function r(t,n,r){if(!!(r.range[0]-n.range[1])!==o[t]){var i="*"===n.value,a=o[t],s=i?n:r,u=a?"Missing":"Unexpected",c="{{type}} space {{side}} *.",l={type:u,side:t};e.report({node:s,message:c,data:l,fix:function(e){return a?i?e.insertTextAfter(s," "):e.insertTextBefore(s," "):e.removeRange([n.range[1],r.range[0]])}})}}function i(e){if(e.generator){var t=n(e),i=a.getTokenBefore(t);"function"!==i.value&&"static"!==i.value||r("before",i,t);var o=a.getTokenAfter(t);r("after",t,o)}}var o=function(e){return e&&"string"!=typeof e?e:{before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}}[e||"before"]}(e.options[0]),a=e.getSourceCode();return{FunctionDeclaration:i,FunctionExpression:i}}}},{}],117:[function(e,t,n){"use strict";function r(e,t){var n=e.references.filter(function(e){return e.identifier.range[0]===t.range[0]&&e.identifier.range[1]===t.range[1]});return 1===n.length?n[0]:null}function i(e,t){var n=r(e,t);return n&&n.resolved&&n.resolved.defs.length>0}var o=["AssignmentExpression","VariableDeclarator","MemberExpression","ExpressionStatement","CallExpression","ConditionalExpression","Program","VariableDeclaration"];t.exports={meta:{docs:{description:"require `require()` calls to be placed at top-level module scope",category:"Node.js and CommonJS",recommended:!1},schema:[]},create:function(e){return{CallExpression:function(t){var n=e.getScope();if("require"===t.callee.name&&!i(n,t.callee)){var r=e.getAncestors().every(function(e){return o.indexOf(e.type)>-1});r||e.report({node:t,message:"Unexpected require()."})}}}}}},{}],118:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require `for-in` loops to include an `if` statement",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{ForInStatement:function(t){var n="BlockStatement"===t.body.type?t.body.body[0]:t.body;n&&"IfStatement"!==n.type&&e.report({node:t,message:"The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype."})}}}}},{}],119:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require error handling in callbacks",category:"Node.js and CommonJS",recommended:!1},schema:[{type:"string"}]},create:function(e){function t(e){var t=e[0];return"^"===t}function n(e){if(t(o)){var n=new RegExp(o);return n.test(e)}return e===o}function r(e){return e.variables.filter(function(e){return e.defs[0]&&"Parameter"===e.defs[0].type})}function i(t){var i=e.getScope(),o=r(i),a=o[0];a&&n(a.name)&&0===a.references.length&&e.report({node:t,message:"Expected error to be handled."})}var o=e.options[0]||"err";return{FunctionDeclaration:i,FunctionExpression:i,ArrowFunctionExpression:i}}}},{}],120:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow specified identifiers",category:"Stylistic Issues",recommended:!1},schema:{type:"array",items:{type:"string"},uniqueItems:!0}},create:function(e){function t(e){return i.indexOf(e)!==-1}function n(e,n){return"CallExpression"!==e.type&&"NewExpression"!==e.type&&t(n)}function r(t){e.report({node:t,message:"Identifier '{{name}}' is blacklisted.",data:{name:t.name}})}var i=e.options;return{Identifier:function(e){var i=e.name,o="MemberExpression"===e.parent.type?e.parent.parent:e.parent;"MemberExpression"===e.parent.type?"Identifier"===e.parent.object.type&&e.parent.object.name===e.name?t(i)&&r(e):"AssignmentExpression"===o.type&&("MemberExpression"!==o.right.type||"MemberExpression"===o.left.type&&o.left.property.name===e.name)&&t(i)&&r(e):"Property"===e.parent.type?n(o,i)&&r(e):n(o,i)&&r(e)}}}}},{}],121:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce minimum and maximum identifier lengths",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{min:{type:"number"},max:{type:"number"},exceptions:{type:"array",uniqueItems:!0,items:{type:"string"}},properties:{enum:["always","never"]}},additionalProperties:!1}]},create:function(e){var t=e.options[0]||{},n="undefined"!=typeof t.min?t.min:2,r="undefined"!=typeof t.max?t.max:1/0,i="never"!==t.properties,o=(t.exceptions?t.exceptions:[]).reduce(function(e,t){return e[t]=!0,e},{}),a={MemberExpression:i&&function(e){return!e.computed&&(e.parent.left===e&&"AssignmentExpression"===e.parent.type||"Property"===e.parent.type&&e.parent.value===e&&"ObjectPattern"===e.parent.parent.type&&e.parent.parent.parent.left===e.parent.parent)},AssignmentPattern:function(e,t){return e.left===t},VariableDeclarator:function(e,t){return e.id===t},Property:i&&function(e,t){return e.key===t},ImportDefaultSpecifier:!0,RestElement:!0,FunctionExpression:!0,ArrowFunctionExpression:!0,ClassDeclaration:!0,FunctionDeclaration:!0,MethodDefinition:!0,CatchClause:!0};return{Identifier:function(t){var i=t.name,s=t.parent,u=i.lengthr;if((u||c)&&!o[i]){var l=a[s.type];l&&(l===!0||l(s,t))&&e.report({node:t,message:u?"Identifier name '{{name}}' is too short (< {{min}}).":"Identifier name '{{name}}' is too long (> {{max}}).",data:{name:i,min:n,max:r}})}}}}}},{}],122:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require identifiers to match a specified regular expression",category:"Stylistic Issues",recommended:!1},schema:[{type:"string"},{type:"object",properties:{properties:{type:"boolean"}}}]},create:function(e){function t(e){return!o.test(e)}function n(e,n){return"CallExpression"!==e.type&&"NewExpression"!==e.type&&t(n)}function r(t){e.report({node:t,message:"Identifier '{{name}}' does not match the pattern '{{pattern}}'.",data:{name:t.name,pattern:i}})}var i=e.options[0]||"^.+$",o=new RegExp(i),a=e.options[1]||{},s=!!a.properties,u=!!a.onlyDeclarations;return{Identifier:function(e){var i=e.name,o=e.parent,a="MemberExpression"===o.type?o.parent:o;if("MemberExpression"===o.type){if(!s)return;"Identifier"===o.object.type&&o.object.name===i?t(i)&&r(e):"AssignmentExpression"===a.type&&("MemberExpression"!==a.right.type||"MemberExpression"===a.left.type&&a.left.property.name===i)&&t(i)&&r(e)}else if("Property"===o.type){if(!s||o.key.name!==i)return;n(a,i)&&r(e)}else{var c="FunctionDeclaration"===a.type||"VariableDeclarator"===a.type;if(u&&!c)return;n(a,i)&&r(e)}}}}}},{}],123:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent indentation",category:"Stylistic Issues",recommended:!1,replacedBy:["indent"]},deprecated:!0,fixable:"whitespace",schema:[{oneOf:[{enum:["tab"]},{type:"integer",minimum:0}]},{type:"object",properties:{SwitchCase:{type:"integer",minimum:0},VariableDeclarator:{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{var:{type:"integer",minimum:0},let:{type:"integer",minimum:0},const:{type:"integer",minimum:0}}}]},outerIIFEBody:{type:"integer",minimum:0},MemberExpression:{type:"integer",minimum:0},FunctionDeclaration:{type:"object",properties:{parameters:{oneOf:[{type:"integer",minimum:0},{enum:["first"]}]},body:{type:"integer",minimum:0}}},FunctionExpression:{type:"object",properties:{parameters:{oneOf:[{type:"integer",minimum:0},{enum:["first"]}]},body:{type:"integer",minimum:0}}},CallExpression:{type:"object",properties:{parameters:{oneOf:[{type:"integer",minimum:0},{enum:["first"]}]}}},ArrayExpression:{oneOf:[{type:"integer",minimum:0},{enum:["first"]}]},ObjectExpression:{oneOf:[{type:"integer",minimum:0},{enum:["first"]}]}},additionalProperties:!1}]},create:function(e){function t(e,t,n){var r=e+" "+I+(1===e?"":"s"),i="space"+(1===t?"":"s"),o="tab"+(1===n?"":"s"),a=void 0;return a=t>0&&n>0?t+" "+i+" and "+n+" "+o:t>0?"space"===I?t:t+" "+i:n>0?"tab"===I?n:n+" "+o:"0","Expected indentation of "+r+" but found "+a+"."}function n(n,r,i,o,a,s){if(!i||!o){var u=("space"===I?" ":"\t").repeat(r),c=s?[n.range[1]-n.loc.end.column,n.range[1]-n.loc.end.column+i+o]:[n.range[0]-n.loc.start.column,n.range[0]-n.loc.start.column+i+o];e.report({node:n,loc:a,message:t(r,i,o),fix:function(e){return e.replaceTextRange(c,u)}})}}function o(e,t){var n=t?N.getLastToken(e):N.getFirstToken(e),r=N.getText(n,n.loc.start.column).split(""),i=r.slice(0,r.findIndex(function(e){return" "!==e&&"\t"!==e})),o=i.filter(function(e){return" "===e}).length,a=i.filter(function(e){return"\t"===e}).length;return{space:o,tab:a,goodChar:"space"===I?o:a,badChar:"space"===I?a:o}}function a(e,t){var n=t===!0?N.getLastToken(e,1):N.getTokenBefore(e),r=t===!0?e.loc.end.line:e.loc.start.line,i=n?n.loc.end.line:-1;return r!==i}function s(e,t){var r=o(e,!1);if("ArrayExpression"===e.type||"ObjectExpression"===e.type||r.goodChar===t&&0===r.badChar||!a(e)||n(e,t,r.space,r.tab),"IfStatement"===e.type&&e.alternate){var i=N.getTokenBefore(e.alternate);s(i,t),a(e.alternate)||s(e.alternate,t)}if("TryStatement"===e.type&&e.handler){var u=N.getFirstToken(e.handler);s(u,t)}if("TryStatement"===e.type&&e.finalizer){var c=N.getTokenBefore(e.finalizer);s(c,t)}if("DoWhileStatement"===e.type){var l=N.getTokenAfter(e.body);s(l,t)}}function u(e,t){e.forEach(function(e){return s(e,t)})}function c(e,t){var r=N.getLastToken(e),i=o(r,!0);i.goodChar===t&&0===i.badChar||!a(e,!0)||n(e,t,i.space,i.tab,{line:r.loc.start.line,column:r.loc.start.column},!0)}function l(e,t){var r=N.getLastToken(e,i.isClosingParenToken),a=N.getText(r,r.loc.start.column).slice(0,-1);if(!a.trim()){var s=o(r,!0);s.goodChar!==t&&n(e,t,s.space,s.tab,{line:r.loc.start.line,column:r.loc.start.column},!0)}}function p(e,t){var r=o(e,!1);r.goodChar===t&&0===r.badChar||!a(e)||n(e,t,r.space,r.tab,{line:e.loc.start.line,column:e.loc.start.column})}function f(e,t,n){var r=e.parent;for(n||(n=["Program"]);r.type!==t&&n.indexOf(r.type)===-1&&"Program"!==r.type;)r=r.parent;return r.type===t?r:null}function d(e){return f(e,"VariableDeclarator")}function h(e,t){return t&&t.parent.loc.start.line===e.loc.start.line&&t.parent.declarations.length>1}function m(e){var t=e.parent;return t.arguments.length>=2&&t.arguments[1]===e&&t.arguments[0].loc.end.line>t.arguments[0].loc.start.line}function g(e){var t=e.parent,n=t.parent;if("CallExpression"!==t.type||t.callee!==e)return!1;for(;"UnaryExpression"===n.type&&("!"===n.operator||"~"===n.operator||"+"===n.operator||"-"===n.operator)||"AssignmentExpression"===n.type||"LogicalExpression"===n.type||"SequenceExpression"===n.type||"VariableDeclarator"===n.type;)n=n.parent;return("ExpressionStatement"===n.type||"VariableDeclaration"===n.type)&&n.parent&&"Program"===n.parent.type}function v(e){var t=e.parent,n=void 0;if(n=!t.parent||"Property"!==t.parent.type&&"ArrayExpression"!==t.parent.type?o(t).goodChar:o(t,!1).goodChar,"CallExpression"===t.parent.type){var r=t.parent;"FunctionExpression"!==t.type&&"ArrowFunctionExpression"!==t.type?r&&r.loc.start.line0&&u(e.body,n),c(e,n-i)}function y(e){var t=N.getLastToken(e),n=e.loc.start.line,r=t.loc.end.line;return n===r}function x(e){return!("ArrayExpression"!==e.type||!e.elements[0])&&(e.elements[0].loc.start.line===e.loc.start.line&&"ObjectExpression"===e.elements[0].type)}function b(e){if(!y(e)){var t="ArrayExpression"===e.type?e.elements:e.properties;t=t.filter(function(e){return null!==e});var n=void 0,r=void 0,i=d(e);if(a(e)){var s=e.parent;if(n=o(s).goodChar,i&&i.loc.start.line===e.loc.start.line)i||x(s)||"MemberExpression"===s.type||"ExpressionStatement"===s.type||"AssignmentExpression"===s.type||"Property"===s.type||(n+=F);else if("VariableDeclarator"!==s.type||i===i.parent.declarations[0])if("VariableDeclarator"===s.type&&i.loc.start.line===s.loc.start.line)n+=F*O.VariableDeclarator[i.parent.kind];else if("ObjectExpression"===s.type||"ArrayExpression"===s.type){var l="ObjectExpression"===e.parent.type?e.parent.properties:e.parent.elements;l[0]&&l[0].loc.start.line===s.loc.start.line&&l[0].loc.end.line!==s.loc.start.line||("number"==typeof O[s.type]?n+=O[s.type]*F:n=l[0].loc.start.column)}else"CallExpression"===s.type||"NewExpression"===s.type?"number"==typeof O.CallExpression.arguments?n+=O.CallExpression.arguments*F:"first"===O.CallExpression.arguments?s.arguments.indexOf(e)!==-1&&(n=s.arguments[0].loc.start.column):n+=F:"LogicalExpression"!==s.type&&"ArrowFunctionExpression"!==s.type||(n+=F);p(e,n)}else n=o(e).goodChar;r="first"===O[e.type]?t.length?t[0].loc.start.column:0:n+F*O[e.type],h(e,i)&&(r+=F*O.VariableDeclarator[i.parent.kind]),u(t,r),t.length>0&&t[t.length-1].loc.end.line===e.loc.end.line||c(e,n+(h(e,i)?O.VariableDeclarator[i.parent.kind]*F:0))}}function _(e){return"BlockStatement"===e.type||"ClassBody"===e.type||e.body&&"BlockStatement"===e.body.type||e.consequent&&"BlockStatement"===e.consequent.type}function w(e){if(!y(e)){if(e.parent&&("FunctionExpression"===e.parent.type||"FunctionDeclaration"===e.parent.type||"ArrowFunctionExpression"===e.parent.type))return void v(e);var t=void 0,n=[],r=["IfStatement","WhileStatement","ForStatement","ForInStatement","ForOfStatement","DoWhileStatement","ClassDeclaration","TryStatement"];t=e.parent&&r.indexOf(e.parent.type)!==-1&&_(e)?o(e.parent).goodChar:e.parent&&"CatchClause"===e.parent.type?o(e.parent.parent).goodChar:o(e).goodChar,n="IfStatement"===e.type&&"BlockStatement"!==e.consequent.type?[e.consequent]:Array.isArray(e.body)?e.body:[e.body],n.length>0&&u(n,t+F),"BlockStatement"===e.type&&c(e,t)}}function E(e){return e.declarations.reduce(function(t,n){var r=t[t.length-1];return(n.loc.start.line!==e.loc.start.line&&!r||r&&r.loc.start.line!==n.loc.start.line)&&t.push(n),t},[])}function S(e){var t=E(e),n=o(e).goodChar,r=t[t.length-1],i=n+F*O.VariableDeclarator[e.kind];if(u(t,i),!(N.getLastToken(e).loc.end.line<=r.loc.end.line)){var a=N.getTokenBefore(r);","===a.value?c(e,o(a).goodChar):c(e,i-F)}}function C(e){"BlockStatement"!==e.body.type&&w(e)}function T(e,t){var n="SwitchStatement"===e.type?e:e.parent,r=void 0;return L[n.loc.start.line]?L[n.loc.start.line]:("undefined"==typeof t&&(t=o(n).goodChar),r=n.cases.length>0&&0===O.SwitchCase?t:t+F*O.SwitchCase,L[n.loc.start.line]=r,r)}function D(e){var t=/^return\s*?\(\s*?\);*?/,n=N.getText(e).replace(N.getText(e.argument),"");return t.test(n)}var A=1,P=null,k=1,I="space",F=4,O={SwitchCase:0,VariableDeclarator:{var:A,let:A,const:A},outerIIFEBody:null,FunctionDeclaration:{parameters:P,body:k},FunctionExpression:{parameters:P,body:k},CallExpression:{arguments:P},ArrayExpression:1,ObjectExpression:1},N=e.getSourceCode();if(e.options.length&&("tab"===e.options[0]?(F=1,I="tab"):"number"==typeof e.options[0]&&(F=e.options[0],I="space"),e.options[1])){var j=e.options[1];O.SwitchCase=j.SwitchCase||0;var R=j.VariableDeclarator;"number"==typeof R?O.VariableDeclarator={var:R,let:R,const:R}:"object"===("undefined"==typeof R?"undefined":r(R))&&Object.assign(O.VariableDeclarator,R),"number"==typeof j.outerIIFEBody&&(O.outerIIFEBody=j.outerIIFEBody),"number"==typeof j.MemberExpression&&(O.MemberExpression=j.MemberExpression),"object"===r(j.FunctionDeclaration)&&Object.assign(O.FunctionDeclaration,j.FunctionDeclaration),"object"===r(j.FunctionExpression)&&Object.assign(O.FunctionExpression,j.FunctionExpression),"object"===r(j.CallExpression)&&Object.assign(O.CallExpression,j.CallExpression),"number"!=typeof j.ArrayExpression&&"string"!=typeof j.ArrayExpression||(O.ArrayExpression=j.ArrayExpression),"number"!=typeof j.ObjectExpression&&"string"!=typeof j.ObjectExpression||(O.ObjectExpression=j.ObjectExpression)}var L={};return{Program:function(e){e.body.length>0&&u(e.body,o(e).goodChar)},ClassBody:w,BlockStatement:w,WhileStatement:C,ForStatement:C,ForInStatement:C,ForOfStatement:C,DoWhileStatement:C,IfStatement:function(e){"BlockStatement"!==e.consequent.type&&e.consequent.loc.start.line>e.loc.start.line&&w(e)},VariableDeclaration:function(e){e.declarations[e.declarations.length-1].loc.start.line>e.declarations[0].loc.start.line&&S(e)},ObjectExpression:function(e){b(e)},ArrayExpression:function(e){b(e)},MemberExpression:function(t){if("undefined"!=typeof O.MemberExpression&&!y(t)&&!f(t,"VariableDeclarator",["FunctionExpression","ArrowFunctionExpression"])&&!f(t,"AssignmentExpression",["FunctionExpression"])){var n=o(t).goodChar+F*O.MemberExpression,r=[t.property],i=e.getTokenBefore(t.property);"Punctuator"===i.type&&"."===i.value&&r.push(i),u(r,n)}},SwitchStatement:function(e){var t=o(e).goodChar,n=T(e,t);u(e.cases,n),c(e,t)},SwitchCase:function(e){if(!y(e)){var t=T(e);u(e.consequent,t+F)}},FunctionDeclaration:function(e){y(e)||("first"===O.FunctionDeclaration.parameters&&e.params.length?u(e.params.slice(1),e.params[0].loc.start.column):null!==O.FunctionDeclaration.parameters&&u(e.params,o(e).goodChar+F*O.FunctionDeclaration.parameters))},FunctionExpression:function(e){y(e)||("first"===O.FunctionExpression.parameters&&e.params.length?u(e.params.slice(1),e.params[0].loc.start.column):null!==O.FunctionExpression.parameters&&u(e.params,o(e).goodChar+F*O.FunctionExpression.parameters))},ReturnStatement:function(e){if(!y(e)){var t=o(e).goodChar;D(e)?l(e,t):s(e,t)}},CallExpression:function(e){y(e)||("first"===O.CallExpression.arguments&&e.arguments.length?u(e.arguments.slice(1),e.arguments[0].loc.start.column):null!==O.CallExpression.arguments&&u(e.arguments,o(e).goodChar+F*O.CallExpression.arguments))}}}}},{"../ast-utils":67}],124:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n0?"space"===T?t:t+" "+i:n>0?"tab"===T?n:n+" "+o:"0","Expected indentation of "+r+" but found "+a+"."}function n(n,r){var i=Array.from(k.getTokenIndent(n)),o=i.filter(function(e){return" "===e}).length,a=i.filter(function(e){return"\t"===e}).length,s=r*D;e.report({node:n,message:t(s,o,a),loc:{start:{line:n.loc.start.line,column:0},end:{line:n.loc.start.line,column:n.loc.start.column}},fix:function(e){var t=[n.range[0]-n.loc.start.column,n.range[0]],r=("space"===T?" ":"\t").repeat(s);return e.replaceTextRange(t,r)}})}function r(e,t){var n=k.getTokenIndent(e),r="space"===T?" ":"\t";return n===r.repeat(t*D)||n.includes(" ")&&n.includes("\t")}function i(e){if(!e.parent||"CallExpression"!==e.parent.type||e.parent.callee!==e)return!1;for(var t=e.parent&&e.parent.parent;"UnaryExpression"===t.type&&["!","~","+","-"].indexOf(t.operator)>-1||"AssignmentExpression"===t.type||"LogicalExpression"===t.type||"SequenceExpression"===t.type||"VariableDeclarator"===t.type;)t=t.parent;return("ExpressionStatement"===t.type||"VariableDeclaration"===t.type)&&"Program"===t.parent.type}function l(e){return P.getTokens(e,{includeComments:!0})}function p(e,t,n,r){function i(e){for(var n=P.getTokenBefore(e);a.isOpeningParenToken(n)&&n!==t;)n=P.getTokenBefore(n);return P.getTokenAfter(n)}I.setDesiredOffsets(P.getTokensBetween(t,n,{includeComments:!0}),t,"first"===r?1:r),I.matchIndentOf(t,n),"first"===r&&e.length&&!e[0]||e.forEach(function(n,o){if("off"===r&&I.ignoreToken(i(n)),0!==o&&n)if("first"===r&&k.isFirstTokenOfLine(i(n)))I.matchOffsetOf(i(e[0]),i(n));else{var a=e[o-1],s=a&&i(a);a&&P.getLastToken(a).loc.start.line>t.loc.end.line&&I.matchIndentOf(s,i(n))}})}function f(e){var t=void 0;t=e.parent&&i(e.parent)?A.outerIIFEBody:!e.parent||"FunctionExpression"!==e.parent.type&&"ArrowFunctionExpression"!==e.parent.type?e.parent&&"FunctionDeclaration"===e.parent.type?A.FunctionDeclaration.body:1:A.FunctionExpression.body,a.STATEMENT_LIST_PARENTS.has(e.parent.type)||I.matchIndentOf(P.getFirstToken(e.parent),P.getFirstToken(e)),p(e.body,P.getFirstToken(e),P.getLastToken(e),t)}function d(e){var t=l(e);p(e.elements||e.properties,t[0],t[t.length-1],A[e.type])}function h(e){if("BlockStatement"!==e.type){for(var t=P.getTokenBefore(e,a.isNotOpeningParenToken),n=l(e);a.isOpeningParenToken(P.getTokenBefore(n[0]))&&a.isClosingParenToken(P.getTokenAfter(n[n.length-1]));)n=[P.getTokenBefore(n[0])].concat(n).concat(P.getTokenAfter(n[n.length-1]));I.setDesiredOffsets(n,t,1);var r=P.getLastToken(e);a.isSemicolonToken(r)&&I.matchIndentOf(t,r)}}function m(e,t){var n=e.params.length?P.getTokenBefore(e.params[0]):P.getTokenBefore(e.body,1);if(n){var r=P.getTokenBefore(e.body),i=l(e),a=o.sortedIndexBy(i,n,function(e){return e.range[0]}),s=o.sortedIndexBy(i,r,function(e){return e.range[0]});F.add(i[a]),F.add(i[s]),p(e.params,i[a],i[s],t)}}function g(e){var t=l(e),n=P.getFirstTokenBetween(e.left,e.right,function(t){return t.value===e.operator}),r=P.getTokenAfter(n),i=t.slice(o.sortedIndexBy(t,r,function(e){return e.range[0]}));I.ignoreToken(n),I.ignoreToken(i[0]),I.setDesiredOffset(i[0],P.getFirstToken(e),1),I.setDesiredOffsets(i,i[0],1)}function v(e){var t=void 0;t=e.arguments.length?P.getFirstTokenBetween(e.callee,e.arguments[0],a.isOpeningParenToken):P.getLastToken(e,1);var n=P.getLastToken(e);F.add(t),F.add(n),I.matchIndentOf(P.getLastToken(e.callee),t),p(e.arguments,t,n,A.CallExpression.arguments)}function y(e){if(e.superClass){var t=P.getFirstToken(e),n=P.getTokenBefore(e.superClass,a.isNotOpeningParenToken);I.setDesiredOffset(n,t,1),I.setDesiredOffsets(P.getTokensBetween(n,e.body,{includeComments:!0}),t,1)}}function x(e){var t=[],n=[];e.forEach(function(e){a.isOpeningParenToken(e)?t.push(e):a.isClosingParenToken(e)&&n.unshift({left:t.pop(),right:e})}),n.forEach(function(e){var t=e.left,n=e.right;F.has(t)||F.has(n)||I.setDesiredOffset(P.getTokenAfter(t),t,1),I.matchIndentOf(t,n)})}function b(e){var t=new Set(l(e));t.forEach(function(e){if(!t.has(I.getFirstDependency(e))){var n=k.getFirstTokenOfLine(e);e===n?I.ignoreToken(e):I.matchIndentOf(n,e)}})}function _(e){var t=!s.has(e.type);t&&b(e)}function w(e,t){for(var n=t;n.parent&&!n.parent.type.endsWith("Statement")&&!n.parent.type.endsWith("Declaration");)n=n.parent;return n=n.parent,!n||n.range[0]===e.range[0]}var E=1,S=1,C=1,T="space",D=4,A={SwitchCase:0,VariableDeclarator:{var:E,let:E,const:E},outerIIFEBody:1,FunctionDeclaration:{parameters:S,body:C},FunctionExpression:{parameters:S,body:C},CallExpression:{arguments:S},MemberExpression:1,ArrayExpression:1,ObjectExpression:1,ArrayPattern:1,ObjectPattern:1,flatTernaryExpressions:!1};e.options.length&&("tab"===e.options[0]?(D=1,T="tab"):"number"==typeof e.options[0]&&(D=e.options[0],T="space"),e.options[1]&&(o.merge(A,e.options[1]),"number"==typeof A.VariableDeclarator&&(A.VariableDeclarator={var:A.VariableDeclarator,let:A.VariableDeclarator,const:A.VariableDeclarator})));var P=e.getSourceCode(),k=new u(P),I=new c(k,T,D),F=new WeakSet;return{ArrayExpression:d,ArrayPattern:d,ArrowFunctionExpression:function(e){m(e,A.FunctionExpression.parameters),h(e.body);var t=void 0;t=e.params.length?P.getTokenAfter(e.params[e.params.length-1],a.isArrowToken):P.getFirstToken(e,a.isArrowToken),I.matchIndentOf(P.getFirstToken(e),t)},AssignmentExpression:function(e){var t=P.getFirstTokenBetween(e.left,e.right,function(t){return t.value===e.operator}),n=l(e),r=n.slice(o.sortedIndexBy(n,t,function(e){return e.range[0]}));I.setDesiredOffsets(r,P.getFirstToken(e.left),1),I.ignoreToken(r[0]),I.ignoreToken(r[1])},BinaryExpression:g,BlockStatement:f,CallExpression:v,ClassBody:f,ClassDeclaration:y,ClassExpression:y,ConditionalExpression:function(e){var t=P.getFirstToken(e);if(!A.flatTernaryExpressions||!a.isTokenOnSameLine(e.test,e.consequent)||w(t,e)){var n=P.getFirstTokenBetween(e.test,e.consequent,function(e){return"Punctuator"===e.type&&"?"===e.value}),r=P.getFirstTokenBetween(e.consequent,e.alternate,function(e){return"Punctuator"===e.type&&":"===e.value}),i=P.getTokensBetween(n,r,{includeComments:!0}),o=P.getTokensAfter(r,function(t){return t.range[1]<=e.range[1]});I.setDesiredOffset(n,t,1),I.setDesiredOffset(r,t,1),I.setDesiredOffset(i[0],t,1),i[i.length-1].loc.end.line===o[0].loc.start.line?I.matchIndentOf(i[0],o[0]):I.setDesiredOffset(o[0],t,1),I.setDesiredOffsets(i,i[0],0),I.setDesiredOffsets(o,o[0],0)}},DoWhileStatement:function(e){return h(e.body)},ExportNamedDeclaration:function(e){if(null===e.declaration){var t=l(e),n=P.getLastToken(e,a.isClosingBraceToken),r=o.sortedIndexBy(t,n,function(e){return e.range[0]});p(e.specifiers,P.getFirstToken(e,{skip:1}),n,1),e.source&&I.setDesiredOffsets(t.slice(r+1),P.getFirstToken(e),1)}},ForInStatement:function(e){return h(e.body)},ForOfStatement:function(e){return h(e.body)},ForStatement:function(e){var t=P.getFirstToken(e,1);e.init&&I.setDesiredOffsets(l(e.init),t,1),e.test&&I.setDesiredOffsets(l(e.test),t,1),e.update&&I.setDesiredOffsets(l(e.update),t,1),h(e.body)},FunctionDeclaration:function(e){m(e,A.FunctionDeclaration.parameters)},FunctionExpression:function(e){m(e,A.FunctionExpression.parameters)},IfStatement:function(e){h(e.consequent),e.alternate&&"IfStatement"!==e.alternate.type&&h(e.alternate)},ImportDeclaration:function(e){if(e.specifiers.some(function(e){return"ImportSpecifier"===e.type})){var t=P.getFirstToken(e,a.isOpeningBraceToken),n=P.getLastToken(e,a.isClosingBraceToken);p(e.specifiers.filter(function(e){return"ImportSpecifier"===e.type}),t,n,1)}var r=P.getLastToken(e,function(e){return"Identifier"===e.type&&"from"===e.value});if(r){var i=P.getTokensBetween(r,P.getLastToken(e),1);I.setDesiredOffsets(i,P.getFirstToken(e),1)}},LogicalExpression:g,"MemberExpression, JSXMemberExpression":function(e){var t=P.getFirstTokenBetween(e.object,e.property,a.isNotClosingParenToken),n=P.getTokenAfter(t),r=P.getTokenBefore(e.object,function(e){return a.isNotOpeningParenToken(e)||F.has(e)}),i=r?P.getTokenAfter(r):P.ast.tokens[0],o=P.getTokenBefore(t);if(e.computed&&I.matchIndentOf(t,P.getLastToken(e)),"number"==typeof A.MemberExpression){var s=e.computed?t:n,u=o.loc.end.line===s.loc.start.line?o:i;I.setDesiredOffset(t,u,A.MemberExpression),I.setDesiredOffset(n,e.computed?t:u,A.MemberExpression)}else I.ignoreToken(t),I.ignoreToken(n),I.matchIndentOf(t,n)},NewExpression:function(e){(e.arguments.length>0||a.isClosingParenToken(P.getLastToken(e))&&a.isOpeningParenToken(P.getLastToken(e,1)))&&v(e)},ObjectExpression:d,ObjectPattern:d,Property:function(e){if(!e.computed&&!e.shorthand&&!e.method&&"init"===e.kind){var t=P.getFirstTokenBetween(e.key,e.value,a.isColonToken);I.ignoreToken(P.getTokenAfter(t))}},SwitchStatement:function(e){var t=l(e),n=t.findIndex(function(t){return t.range[0]>=e.discriminant.range[1]&&a.isOpeningBraceToken(t)});I.setDesiredOffsets(t.slice(n+1,-1),t[n],A.SwitchCase);var r=new WeakSet(e.cases.map(function(e){return P.getFirstToken(e)})),i=e.cases.length&&P.getFirstToken(e.cases[e.cases.length-1]),o=new WeakSet(e.cases.filter(function(e){return 1===e.consequent.length&&"BlockStatement"===e.consequent[0].type}).map(function(e){return P.getFirstToken(e)})),s=t[n];t.slice(n+1,-1).forEach(function(e){r.has(e)?s=e:s!==i||"Line"!==e.type&&"Block"!==e.type?o.has(s)||I.setDesiredOffset(e,s,1):I.ignoreToken(e)})},TemplateLiteral:function(e){var t=l(e);I.setDesiredOffsets(l(e.quasis[0]),t[0],0),e.expressions.forEach(function(t,n){var r=e.quasis[n],i=e.quasis[n+1],o=r.loc.start.line===r.loc.end.line?P.getFirstToken(r):null;I.setDesiredOffsets(P.getTokensBetween(r,i),o,1),I.setDesiredOffset(P.getFirstToken(i),o,0)})},VariableDeclaration:function(e){var t=A.VariableDeclarator.hasOwnProperty(e.kind)?A.VariableDeclarator[e.kind]:E;I.setDesiredOffsets(l(e),P.getFirstToken(e),t);var n=P.getLastToken(e);a.isSemicolonToken(n)&&I.ignoreToken(n)},VariableDeclarator:function(e){if(e.init){var t=P.getTokenBefore(e.init,a.isNotOpeningParenToken),n=P.getTokenAfter(t);I.ignoreToken(t),I.ignoreToken(n),I.matchIndentOf(t,n)}},"VariableDeclarator:exit":function(e){if(e.parent.declarations.length>1&&e.parent.declarations[0]===e&&e.init){var t=new Set(l(e.init));t.forEach(function(n){t.has(I.getFirstDependency(n))||I.increaseOffset(n,A.VariableDeclarator[e.parent.kind])})}},WhileStatement:function(e){return h(e.body)},"*:exit":_,"JSXAttribute[value]":function(e){var t=P.getFirstTokenBetween(e.name,e.value,function(e){return"Punctuator"===e.type&&"="===e.value}),n=P.getFirstToken(e.name);I.setDesiredOffset(t,n,1),I.setDesiredOffset(P.getFirstToken(e.value),n,1)},JSXElement:function(e){e.closingElement&&p(e.children,P.getFirstToken(e.openingElement),P.getFirstToken(e.closingElement),1)},JSXOpeningElement:function(e){var t=P.getFirstToken(e),n=void 0;e.selfClosing?(n=P.getLastToken(e,{skip:1}),I.matchIndentOf(n,P.getLastToken(e))):n=P.getLastToken(e),I.setDesiredOffsets(l(e.name),P.getFirstToken(e)),p(e.attributes,t,n,1)},JSXClosingElement:function(e){var t=P.getFirstToken(e);I.setDesiredOffsets(l(e.name),t,1),I.matchIndentOf(t,P.getLastToken(e))},JSXExpressionContainer:function(e){var t=P.getFirstToken(e),n=P.getFirstToken(e.expression);n&&I.setDesiredOffset(n,t,1),I.matchIndentOf(t,P.getLastToken(e))},"Program:exit":function(){x(P.ast.tokens);var e=P.ast.comments.reduce(function(e,t){var n=P.getTokenBefore(t,{includeComments:!0});return e.set(t,e.has(n)?e.get(n):n)},new WeakMap);P.lines.forEach(function(t,i){var o=i+1;if(k.firstTokensByLineNumber.has(o)){var s=k.firstTokensByLineNumber.get(o);if(s.loc.start.line===o&&!r(s,I.getDesiredIndent(s))){if(a.isCommentToken(s)){var u=e.get(s),c=u?P.getTokenAfter(u):P.ast.tokens[0];if(u&&r(s,I.getDesiredIndent(u))||c&&r(s,I.getDesiredIndent(c)))return}n(s,I.getDesiredIndent(s))}}})}}}}},{"../ast-utils":67,lodash:48}],125:[function(e,t,n){"use strict";function r(e){return"ForInStatement"===e.type||"ForOfStatement"===e.type||"ForStatement"===e.type}function i(e){var t=e.parent,n=t.parent;return r(n)?"ForStatement"===n.type?n.init===t:n.left===t:Boolean(e.init)}t.exports={meta:{docs:{description:"require or disallow initialization in variable declarations",category:"Variables",recommended:!1},schema:{anyOf:[{type:"array",items:[{enum:["always"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["never"]},{type:"object",properties:{ignoreForLoopInit:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]}},create:function(e){var t="always",n="never",o=e.options[0]||t,a=e.options[1]||{};return{"VariableDeclaration:exit":function(s){for(var u=s.kind,c=s.declarations,l=0;l1)return!1;return!0}return!1}function n(e){return!(e.method||e.shorthand||"init"!==e.kind||"Property"!==e.type)}function a(e){var t=C.getTokenAfter(e,c.isColonToken);return C.getTokenBefore(t)}function u(e){return C.getTokenAfter(e,c.isColonToken)}function p(e){var t=e.key;return e.computed?C.getText().slice(t.range[0],t.range[1]):e.key.name||e.key.value}function f(t,n,i,o,a){var s=i.length-o,c=u(t.key),f=C.getTokenBefore(c,{includeComments:!0}),d=C.getTokenAfter(c,{includeComments:!0}),h="key"===n,m=h?f.loc.start:d.loc.start,g=s>0,v=Math.abs(s),y=Array(v+1).join(" "),x=void 0;if((s&&"strict"===a||s<0&&"minimum"===a||s>0&&!o&&"minimum"===a)&&(!o||!r(i))){if(g){var b=void 0;b=h?[f.end,f.end+v]:[d.start-v,d.start],x=function(e){return e.removeRange(b)}}else x=h?function(e){return e.insertTextAfter(f,y)}:function(e){return e.insertTextBefore(d,y)};e.report({node:t[n],loc:m,message:l[n],data:{error:g?"Extra":"Missing",computed:t.computed?"computed ":"",key:p(t)},fix:x})}}function d(e){var t=C.getFirstToken(e),n=a(e.key);return n.range[1]-t.range[0]}function h(e){var t=/(\s*):(\s*)/.exec(C.getText().slice(e.key.range[1],e.value.range[0]));return t?{beforeColon:t[1],afterColon:t[2]}:null}function m(e){return 1===e.properties.length?[e.properties]:e.properties.reduce(function(e,n){var r=i(e),o=i(r);return!o||t(o,n)?r.push(n):e.push([n]),e},[[]])}function g(e){var t=e.length,n=e.map(d),r=S.on,i=Math.max.apply(null,n),o=void 0,a=void 0,s=void 0;S&&t>1?(o=S.beforeColon,a=S.afterColon,s=S.mode):(o=w.beforeColon,a=w.afterColon,s=S.mode),i+="colon"===r?o:a;for(var u=0;u]$/,u=/^(?:[([{<~!]|\+\+?|--?)$/,c=/^[)\]}>*]$/,l=/^[{*]$/,p=/\$\{$/,f=/^\}/,d=/^(?:JSXElement|RegularExpression|String|Template)$/,h=a.concat(["as","async","await","from","get","let","of","set","yield"]);!function(){h.sort();for(var e=1;e=S&&(i=!1),!g){var O=w.getTokenBefore(n,{includeComments:!0}),N=w.getTokenAfter(n,{includeComments:!0});if(!I&&s&&!o.includes(A,u)&&(!a.isCommentToken(O)||!a.isTokenOnSameLine(O,n))){var j=n.range[0]-n.loc.start.column,R=[j,j];e.report({node:n,message:"Expected line before comment.",fix:function(e){return e.insertTextBeforeRange(R,"\n"); }})}F||!i||o.includes(A,c)||a.isCommentToken(N)&&a.isTokenOnSameLine(n,N)||e.report({node:n,message:"Expected line after comment.",fix:function(e){return e.insertTextAfter(n,"\n")}})}}}var v=e.options[0]?Object.assign({},e.options[0]):{},y=v.ignorePattern,x=a.COMMENTS_IGNORE_PATTERN,b=new RegExp(y),_=v.applyDefaultIgnorePatterns!==!1;v.beforeLineComment=v.beforeLineComment||!1,v.afterLineComment=v.afterLineComment||!1,v.beforeBlockComment="undefined"==typeof v.beforeBlockComment||v.beforeBlockComment,v.afterBlockComment=v.afterBlockComment||!1,v.allowBlockStart=v.allowBlockStart||!1,v.allowBlockEnd=v.allowBlockEnd||!1;var w=e.getSourceCode(),E=w.lines,S=E.length+1,C=w.getAllComments(),T=i(C),D=r(E),A=T.concat(D);return{Program:function(){C.forEach(function(e){"Line"===e.type?(v.beforeLineComment||v.afterLineComment)&&g(e,{after:v.afterLineComment,before:v.beforeLineComment}):"Block"===e.type&&(v.beforeBlockComment||v.afterBlockComment)&&g(e,{after:v.afterBlockComment,before:v.beforeBlockComment})})}}}}},{"../ast-utils":67,lodash:48}],132:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require or disallow newlines around directives",category:"Stylistic Issues",recommended:!1,replacedBy:["padding-line-between-statements"]},schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{before:{enum:["always","never"]},after:{enum:["always","never"]}},additionalProperties:!1,minProperties:2}]}],fixable:"whitespace",deprecated:!0},create:function(e){function t(e){var t=s.getTokenBefore(e,{includeComments:!0}),n=t?t.loc.end.line:0;return e.loc.start.line-n>=2}function n(e){var t=s.getLastToken(e),n=s.getTokenBefore(t);return r.isSemicolonToken(t)&&t.loc.start.line>n.loc.end.line?n:t}function i(e){var t=n(e),r=s.getTokenAfter(t,{includeComments:!0});return r.loc.start.line-t.loc.end.line>=2}function o(t,r,i){e.report({node:t,message:'{{expected}} newline {{location}} "{{value}}" directive.',data:{expected:i?"Expected":"Unexpected",value:t.expression.value,location:r},fix:function(e){var o=n(t);return i?"before"===r?e.insertTextBefore(t,"\n"):e.insertTextAfter(o,"\n"):e.removeRange("before"===r?[t.range[0]-1,t.range[0]]:[o.range[1],o.range[1]+1])}})}function a(e){var n=r.getDirectivePrologue(e);if(n.length){var a=n[0],u=s.getCommentsBefore(a);u.length?("always"!==c||t(a)||o(a,"before",!0),"never"===c&&t(a)&&o(a,"before",!1)):"Program"===e.type&&"never"===c&&!u.length&&t(a)&&o(a,"before",!1);var p=n[n.length-1],f="Program"===e.type?e.body:e.body.body;(p!==f[f.length-1]||p.trailingComments)&&("always"!==l||i(p)||o(p,"after",!0),"never"===l&&i(p)&&o(p,"after",!1))}}var s=e.getSourceCode(),u=e.options[0]||"always",c="string"==typeof u?u:u.before,l="string"==typeof u?u:u.after;return{Program:a,FunctionDeclaration:a,FunctionExpression:a,ArrowFunctionExpression:a}}}},{"../ast-utils":67}],133:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.exports={meta:{docs:{description:"enforce a maximum depth that blocks can be nested",category:"Stylistic Issues",recommended:!1},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}]},create:function(e){function t(){a.push(0)}function n(){a.pop()}function i(t){var n=++a[a.length-1];n>u&&e.report({node:t,message:"Blocks are nested too deeply ({{depth}}).",data:{depth:n}})}function o(){a[a.length-1]--}var a=[],s=e.options[0],u=4;return"object"===("undefined"==typeof s?"undefined":r(s))&&s.hasOwnProperty("maximum")&&"number"==typeof s.maximum&&(u=s.maximum),"object"===("undefined"==typeof s?"undefined":r(s))&&s.hasOwnProperty("max")&&"number"==typeof s.max&&(u=s.max),"number"==typeof s&&(u=s),{Program:t,FunctionDeclaration:t,FunctionExpression:t,ArrowFunctionExpression:t,IfStatement:function(e){"IfStatement"!==e.parent.type&&i(e)},SwitchStatement:i,TryStatement:i,DoWhileStatement:i,WhileStatement:i,WithStatement:i,ForStatement:i,ForInStatement:i,ForOfStatement:i,"IfStatement:exit":o,"SwitchStatement:exit":o,"TryStatement:exit":o,"DoWhileStatement:exit":o,"WhileStatement:exit":o,"WithStatement:exit":o,"ForStatement:exit":o,"ForInStatement:exit":o,"ForOfStatement:exit":o,"FunctionDeclaration:exit":n,"FunctionExpression:exit":n,"ArrowFunctionExpression:exit":n,"Program:exit":n}}}},{}],134:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i={type:"object",properties:{code:{type:"integer",minimum:0},comments:{type:"integer",minimum:0},tabWidth:{type:"integer",minimum:0},ignorePattern:{type:"string"},ignoreComments:{type:"boolean"},ignoreStrings:{type:"boolean"},ignoreUrls:{type:"boolean"},ignoreTemplateLiterals:{type:"boolean"},ignoreRegExpLiterals:{type:"boolean"},ignoreTrailingComments:{type:"boolean"}},additionalProperties:!1},o={anyOf:[i,{type:"integer",minimum:0}]};t.exports={meta:{docs:{description:"enforce a maximum line length",category:"Stylistic Issues",recommended:!1},schema:[o,o,i]},create:function(e){function t(e,t){var n=0;return e.replace(/\t/g,function(e,r){var i=r+n,o=t?i%t:0,a=t-o;n+=a-1}),Array.from(e).length+n}function n(e,t,n){return n&&n.loc.start.line===t&&t<=n.loc.end.line&&(n.loc.end.line>t||n.loc.end.column===e.length)}function i(e,t,n){var r=n.loc.start,i=n.loc.end,o=!e.slice(0,n.loc.start.column).trim();return n&&(r.linet||i.line===t&&i.column===e.length)}function o(e,t,n){return e.slice(0,n.loc.start.column).replace(/\s+$/,"")}function a(e,t,n){Array.isArray(e[t])||(e[t]=[]),e[t].push(n)}function s(){return d.ast.tokens.filter(function(e){return"String"===e.type})}function u(){return d.ast.tokens.filter(function(e){return"Template"===e.type})}function c(){return d.ast.tokens.filter(function(e){return"RegularExpression"===e.type})}function l(e,t){for(var n=t.loc.start.line;n<=t.loc.end.line;++n)a(e,n,t);return e}function p(r){var a=d.lines,p=y||S||w?d.getAllComments():[],h=0,m=s(),T=m.reduce(l,{}),D=u(),A=D.reduce(l,{}),P=c(),k=P.reduce(l,{});a.forEach(function(a,s){var u=s+1,c=!1;if(hS&&e.report({node:r,loc:{line:u,column:0},message:"Line {{lineNumber}} exceeds the maximum comment line length of {{maxCommentLength}}.",data:{lineNumber:s+1,maxCommentLength:S}}):d>g&&e.report({node:r,loc:{line:u,column:0},message:"Line {{lineNumber}} exceeds the maximum line length of {{maxLength}}.",data:{lineNumber:s+1,maxLength:g}}))}})}var f=/[^:\/?#]:\/\/[^?#]/,d=e.getSourceCode(),h=e.options[e.options.length-1],m="object"===("undefined"==typeof h?"undefined":r(h))?Object.create(h):{};"number"==typeof e.options[0]&&(m.code=e.options[0]),"number"==typeof e.options[1]&&(m.tabWidth=e.options[1]);var g=m.code||80,v=m.tabWidth||4,y=m.ignoreComments||!1,x=m.ignoreStrings||!1,b=m.ignoreTemplateLiterals||!1,_=m.ignoreRegExpLiterals||!1,w=m.ignoreTrailingComments||m.ignoreComments||!1,E=m.ignoreUrls||!1,S=m.comments,C=m.ignorePattern||null;return C&&(C=new RegExp(C)),{Program:p}}}},{}],135:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("lodash"),o=e("../ast-utils");t.exports={meta:{docs:{description:"enforce a maximum number of lines per file",category:"Stylistic Issues",recommended:!1},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"}},additionalProperties:!1}]}]},create:function(e){function t(e){return e&&("Block"===e.type||"Line"===e.type)}function n(e){var n=e.loc.start.line,r=e.loc.end.line,a=void 0;a=e;do a=l.getTokenBefore(a,{includeComments:!0});while(t(a));a&&o.isTokenOnSameLine(a,e)&&(n+=1),a=e;do a=l.getTokenAfter(a,{includeComments:!0});while(t(a));return a&&o.isTokenOnSameLine(e,a)&&(r-=1),n<=r?i.range(n,r+1):[]}var a=e.options[0],s=300;"object"===("undefined"==typeof a?"undefined":r(a))&&a.hasOwnProperty("max")&&"number"==typeof a.max&&(s=a.max),"number"==typeof a&&(s=a);var u=a&&a.skipComments,c=a&&a.skipBlankLines,l=e.getSourceCode();return{"Program:exit":function(){var t=l.lines.map(function(e,t){return{lineNumber:t+1,text:e}});if(c&&(t=t.filter(function(e){return""!==e.text.trim()})),u){var r=l.getAllComments(),o=i.flatten(r.map(function(e){return n(e)}));t=t.filter(function(e){return!i.includes(o,e.lineNumber)})}t.length>s&&e.report({loc:{line:1,column:0},message:"File must be at most {{max}} lines long. It's {{actual}} lines long.",data:{max:s,actual:t.length}})}}}}},{"../ast-utils":67,lodash:48}],136:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.exports={meta:{docs:{description:"enforce a maximum depth that callbacks can be nested",category:"Stylistic Issues",recommended:!1},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}]},create:function(e){function t(t){var n=t.parent;if("CallExpression"===n.type&&a.push(t),a.length>o){var r={num:a.length,max:o};e.report({node:t,message:"Too many nested callbacks ({{num}}). Maximum allowed is {{max}}.",data:r})}}function n(){a.pop()}var i=e.options[0],o=10;"object"===("undefined"==typeof i?"undefined":r(i))&&i.hasOwnProperty("maximum")&&"number"==typeof i.maximum&&(o=i.maximum),"object"===("undefined"==typeof i?"undefined":r(i))&&i.hasOwnProperty("max")&&"number"==typeof i.max&&(o=i.max),"number"==typeof i&&(o=i);var a=[];return{ArrowFunctionExpression:t,"ArrowFunctionExpression:exit":n,FunctionExpression:t,"FunctionExpression:exit":n}}}},{}],137:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("lodash"),o=e("../ast-utils");t.exports={meta:{docs:{description:"enforce a maximum number of parameters in function definitions",category:"Stylistic Issues",recommended:!1},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}]},create:function(e){function t(t){t.params.length>a&&e.report({node:t,message:"{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}.",data:{name:i.upperFirst(o.getFunctionNameWithKind(t)),count:t.params.length,max:a}})}var n=e.options[0],a=3;return"object"===("undefined"==typeof n?"undefined":r(n))&&n.hasOwnProperty("maximum")&&"number"==typeof n.maximum&&(a=n.maximum),"object"===("undefined"==typeof n?"undefined":r(n))&&n.hasOwnProperty("max")&&"number"==typeof n.max&&(a=n.max),"number"==typeof n&&(a=n),{FunctionDeclaration:t,ArrowFunctionExpression:t,FunctionExpression:t}}}},{"../ast-utils":67,lodash:48}],138:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce a maximum number of statements allowed per line",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{max:{type:"integer",minimum:1}},additionalProperties:!1}]},create:function(e){function t(){f&&e.report({node:f,message:c,data:{numberOfStatementsOnThisLine:p,maxStatementsPerLine:u,statements:1===p?"statement":"statements"}}),f=null}function n(e){return a.getLastToken(e,r.isNotSemicolonToken)}function i(e){var n=e.loc.start.line;d.test(e.parent.type)&&e.parent.alternate!==e||(n===l?p+=1:(t(),p=1,l=n),p===u+1&&(f=f||e))}function o(e){var r=n(e).loc.end.line;r!==l&&(t(),p=1,l=r)}var a=e.getSourceCode(),s=e.options[0]||{},u="undefined"!=typeof s.max?s.max:1,c="This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}.",l=0,p=0,f=void 0,d=/^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/;return{BreakStatement:i,ClassDeclaration:i,ContinueStatement:i,DebuggerStatement:i,DoWhileStatement:i,ExpressionStatement:i,ForInStatement:i,ForOfStatement:i,ForStatement:i,FunctionDeclaration:i,IfStatement:i,ImportDeclaration:i,LabeledStatement:i,ReturnStatement:i,SwitchStatement:i,ThrowStatement:i,TryStatement:i,VariableDeclaration:i,WhileStatement:i,WithStatement:i,ExportNamedDeclaration:i,ExportDefaultDeclaration:i,ExportAllDeclaration:i,"BreakStatement:exit":o,"ClassDeclaration:exit":o,"ContinueStatement:exit":o,"DebuggerStatement:exit":o,"DoWhileStatement:exit":o,"ExpressionStatement:exit":o,"ForInStatement:exit":o,"ForOfStatement:exit":o,"ForStatement:exit":o,"FunctionDeclaration:exit":o,"IfStatement:exit":o,"ImportDeclaration:exit":o,"LabeledStatement:exit":o,"ReturnStatement:exit":o,"SwitchStatement:exit":o,"ThrowStatement:exit":o,"TryStatement:exit":o,"VariableDeclaration:exit":o,"WhileStatement:exit":o,"WithStatement:exit":o,"ExportNamedDeclaration:exit":o,"ExportDefaultDeclaration:exit":o,"ExportAllDeclaration:exit":o,"Program:exit":t}}}},{"../ast-utils":67}],139:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("lodash"),o=e("../ast-utils");t.exports={meta:{docs:{description:"enforce a maximum number of statements allowed in function blocks",category:"Stylistic Issues",recommended:!1},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]},{type:"object",properties:{ignoreTopLevelFunctions:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t,n,r){if(n>r){var a=i.upperFirst(o.getFunctionNameWithKind(t));e.report({node:t,message:"{{name}} has too many statements ({{count}}). Maximum allowed is {{max}}.",data:{name:a,count:n,max:r}})}}function n(){u.push(0)}function a(e){var n=u.pop();l&&0===u.length?p.push({node:e,count:n}):t(e,n,f)}function s(e){u[u.length-1]+=e.body.length}var u=[],c=e.options[0],l=e.options[1]&&e.options[1].ignoreTopLevelFunctions||!1,p=[],f=10;return"object"===("undefined"==typeof c?"undefined":r(c))&&c.hasOwnProperty("maximum")&&"number"==typeof c.maximum&&(f=c.maximum),"object"===("undefined"==typeof c?"undefined":r(c))&&c.hasOwnProperty("max")&&"number"==typeof c.max&&(f=c.max),"number"==typeof c&&(f=c),{FunctionDeclaration:n,FunctionExpression:n,ArrowFunctionExpression:n,BlockStatement:s,"FunctionDeclaration:exit":a,"FunctionExpression:exit":a,"ArrowFunctionExpression:exit":a,"Program:exit":function(){1!==p.length&&p.forEach(function(e){var n=e.count,r=e.node;t(r,n,f)})}}}}},{"../ast-utils":67,lodash:48}],140:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce newlines between operands of ternary expressions",category:"Stylistic Issues",recommended:!1},schema:[{enum:["always","never"]}]},create:function(e){function t(t,n,r){e.report({node:t,message:"{{expected}} newline between {{typeOfError}} of ternary expression.",data:{expected:r?"Expected":"Unexpected",typeOfError:t===n.test?"test and consequent":"consequent and alternate"}})}var n="never"!==e.options[0];return{ConditionalExpression:function(e){var i=r.isTokenOnSameLine(e.test,e.consequent),o=r.isTokenOnSameLine(e.consequent,e.alternate);n?(i&&t(e.test,e,!0),o&&t(e.consequent,e,!0)):(i||t(e.test,e,!1),o||t(e.consequent,e,!1))}}}}},{"../ast-utils":67}],141:[function(e,t,n){"use strict";function r(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)&&!Array.isArray(e[t]))throw new TypeError(t+", if provided, must be an Array");return e[t]||n}function i(e,t){return e[t]=!0,e}function o(e){var t=r(e,"capIsNewExceptions",a);return t!==a&&(t=t.concat(a)),t.reduce(i,{})}var a=["Array","Boolean","Date","Error","Function","Number","Object","RegExp","String","Symbol"];t.exports={meta:{docs:{description:"require constructor names to begin with a capital letter",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{newIsCap:{type:"boolean"},capIsNew:{type:"boolean"},newIsCapExceptions:{type:"array",items:{type:"string"}},newIsCapExceptionPattern:{type:"string"},capIsNewExceptions:{type:"array",items:{type:"string"}},capIsNewExceptionPattern:{type:"string"},properties:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){var t="";if("MemberExpression"===e.callee.type){var n=e.callee.property;"Literal"===n.type&&"string"==typeof n.value?t=n.value:"Identifier"!==n.type||e.callee.computed||(t=n.name)}else t=e.callee.name;return t}function n(e){var t=e.charAt(0),n=t.toLowerCase(),r=t.toUpperCase();return n===r?"non-alpha":t===n?"lower":"upper"}function a(e,t,n,r){var i=m.getText(t.callee);return!(!e[n]&&!e[i])||(!(!r||!r.test(i))||("UTC"===n&&"MemberExpression"===t.callee.type?"Identifier"===t.callee.object.type&&"Date"===t.callee.object.name:c&&"MemberExpression"===t.callee.type))}function s(t,n){var r=t.callee;"MemberExpression"===r.type&&(r=r.property),e.report({node:t,loc:r.loc.start,message:n})}var u=e.options[0]?Object.assign({},e.options[0]):{};u.newIsCap=u.newIsCap!==!1,u.capIsNew=u.capIsNew!==!1;var c=u.properties===!1,l=r(u,"newIsCapExceptions",[]).reduce(i,{}),p=u.newIsCapExceptionPattern?new RegExp(u.newIsCapExceptionPattern):null,f=o(u),d=u.capIsNewExceptionPattern?new RegExp(u.capIsNewExceptionPattern):null,h={},m=e.getSourceCode();return u.newIsCap&&(h.NewExpression=function(e){var r=t(e);if(r){var i=n(r),o="lower"!==i||a(l,e,r,p);o||s(e,"A constructor name should not start with a lowercase letter.")}}),u.capIsNew&&(h.CallExpression=function(e){var r=t(e);if(r){var i=n(r),o="upper"!==i||a(f,e,r,d);o||s(e,"A function with a name starting with an uppercase letter should only be used as a constructor.")}}),h}}},{}],142:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require parentheses when invoking a constructor with no arguments",category:"Stylistic Issues",recommended:!1},schema:[],fixable:"code"},create:function(e){var t=e.getSourceCode();return{NewExpression:function(n){if(0===n.arguments.length){var i=t.getLastToken(n),o=i&&r.isClosingParenToken(i),a=o&&r.isOpeningParenToken(t.getTokenBefore(i));a||e.report({node:n,message:"Missing '()' invoking a constructor.",fix:function(e){return e.insertTextAfter(n,"()")}})}}}}}},{"../ast-utils":67}],143:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require or disallow an empty line after variable declarations",category:"Stylistic Issues",recommended:!1,replacedBy:["padding-line-between-statements"]},schema:[{enum:["never","always"]}],fixable:"whitespace",deprecated:!0},create:function(e){function t(e){var t=f.getLastToken(e);if("Punctuator"===t.type&&";"===t.value){var n=f.getTokenBefore(t);if(n.loc.end.line!==t.loc.start.line)return n}return t}function n(e){return"var"===e||"let"===e||"const"===e}function i(e){return"ForStatement"===e||"ForInStatement"===e||"ForOfStatement"===e}function o(e){return"ExportNamedDeclaration"===e||"ExportSpecifier"===e||"ExportDefaultDeclaration"===e||"ExportAllDeclaration"===e}function a(e){var t=f.getTokenAfter(e);return!t||"Punctuator"===t.type&&"}"===t.value}function s(e){var t=h[e];return h[t+1]?s(t+1):t}function u(e,t){return e.loc.start.line>s(t)+1}function c(c){var m=t(c),g=m===f.getLastToken(c)?f.getTokenAfter(c):f.getLastToken(c),v=m.loc.end.line+1;if(g&&!i(c.parent.type)&&!o(c.parent.type)&&!("Keyword"===g.type&&n(g.value)||a(c))){var y=g.loc.start.line>v,x="undefined"!=typeof h[v];"never"===d&&y&&!x&&e.report({node:c,message:p,data:{identifier:c.name},fix:function(e){var t=f.getText().slice(m.range[1],g.range[0]).split(r.LINEBREAK_MATCHER);return e.replaceTextRange([m.range[1],g.range[0]],t.slice(0,-1).join("")+"\n"+t[t.length-1])}}),"always"!==d||y&&(!x||u(g,v))||e.report({node:c,message:l,data:{identifier:c.name},fix:function(e){return(y?s(v):m.loc.end.line)===g.loc.start.line?e.insertTextBefore(g,"\n\n"):e.insertTextBeforeRange([g.range[0]-g.loc.start.column,g.range[1]],"\n")}})}}var l="Expected blank line after variable declarations.",p="Unexpected blank line after variable declarations.",f=e.getSourceCode(),d="never"===e.options[0]?"never":"always",h=f.getAllComments().reduce(function(e,t){return e[t.loc.start.line]=t.loc.end.line,e},{});return{VariableDeclaration:c}}}},{"../ast-utils":67}],144:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require an empty line before `return` statements",category:"Stylistic Issues",recommended:!1,replacedBy:["padding-line-between-statements"]},fixable:"whitespace",schema:[],deprecated:!0},create:function(e){function t(e,t){var n=s.getTokenBefore(e);return t.some(function(e){return n.value===e})}function n(e){var n=e.parent.type;return e.parent.body?Array.isArray(e.parent.body)?e.parent.body[0]===e:e.parent.body===e:"IfStatement"===n?t(e,["else",")"]):"DoWhileStatement"===n?t(e,["do"]):"SwitchCase"===n?t(e,[":"]):t(e,[")"])}function r(e,t){var n=s.getCommentsBefore(e),r=0;return n.length?(n.forEach(function(n){r++,"Block"===n.type&&(r+=n.loc.end.line-n.loc.start.line),n.loc.start.line===t&&r--,n.loc.end.line===e.loc.start.line&&r--}),r):r}function i(e){var t=s.getTokenBefore(e),n=void 0;return n=t?t.loc.end.line:0}function o(e){var t=e.loc.start.line,n=i(e),o=r(e,n);return t-n-o>1}function a(e){var t=s.getCommentsBefore(e),n=t[t.length-1],r=s.getTokenBefore(e);return 0===t.length||n.loc.end.line===r.loc.end.line&&n.loc.end.line!==e.loc.start.line}var s=e.getSourceCode();return{ReturnStatement:function(t){n(t)||o(t)||e.report({node:t,message:"Expected newline before return statement.",fix:function(e){if(a(t)){var n=s.getTokenBefore(t),r=t.loc.start.line===n.loc.end.line?"\n\n":"\n";return e.insertTextBefore(t,r)}return null}})}}}}},{}],145:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require a newline after each call in a method chain",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{ignoreChainWithDepth:{type:"integer",minimum:1,maximum:10}},additionalProperties:!1}]},create:function(e){function t(e){var t=e.computed?"[":".",n=o.getText(e.property).split(r.LINEBREAK_MATCHER),i=e.computed&&1===n.length?"]":"";return t+n[0]+i}var n=e.options[0]||{},i=n.ignoreChainWithDepth||2,o=e.getSourceCode();return{"CallExpression:exit":function(n){if(n.callee&&"MemberExpression"===n.callee.type){for(var r=n.callee,o=r.object,a=1;o&&o.callee;)a+=1,o=o.callee.object;a>i&&r.property.loc.start.line===r.object.loc.end.line&&e.report({node:r.property,loc:r.property.loc.start,message:"Expected line break before `{{callee}}`.",data:{callee:t(r)}})}}}}}},{"../ast-utils":67}],146:[function(e,t,n){"use strict";function r(e){return/^(alert|confirm|prompt)$/.test(e)}function i(e,t,n){e.report(t,"Unexpected {{name}}.",{name:n})}function o(e,t){var n=e.references.filter(function(e){return e.identifier.range[0]===t.range[0]&&e.identifier.range[1]===t.range[1]});return 1===n.length?n[0]:null}function a(e,t,n){var r=o(e,n);return r&&r.resolved&&r.resolved.defs.length>0}function s(e,t,n){return"global"===e.type&&"ThisExpression"===n.type||"window"===n.name&&!a(e,t,n)}var u=e("../ast-utils").getStaticPropertyName;t.exports={meta:{docs:{description:"disallow the use of `alert`, `confirm`, and `prompt`",category:"Best Practices",recommended:!1},schema:[]},create:function(e){var t=void 0;return{Program:function(){t=e.getScope()},CallExpression:function(n){var o=n.callee,c=e.getScope();if("Identifier"===o.type){var l=o.name;!a(c,t,o)&&r(o.name)&&i(e,n,l)}else if("MemberExpression"===o.type&&s(c,t,o.object)){var p=u(o);r(p)&&i(e,n,p)}}}}}},{"../ast-utils":67}],147:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `Array` constructors",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){function t(t){1!==t.arguments.length&&"Identifier"===t.callee.type&&"Array"===t.callee.name&&e.report({node:t,message:"The array literal notation [] is preferrable."})}return{CallExpression:t,NewExpression:t}}}},{}],148:[function(e,t,n){"use strict";var r=new Set(["ForStatement","ForOfStatement","ForInStatement","WhileStatement","DoWhileStatement"]),i=new Set(["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]);t.exports={meta:{docs:{description:"disallow `await` inside of loops",category:"Possible Errors",recommended:!1},schema:[]},create:function(e){return{AwaitExpression:function(t){var n=e.getAncestors();n.reverse();for(var o=new Set(n).add(t),a=0;a>",">>>","^=","|=","&=","<<=",">>=",">>>=","~"];t.exports={meta:{docs:{description:"disallow bitwise operators",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:r},uniqueItems:!0},int32Hint:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){e.report({node:t,message:"Unexpected use of '{{operator}}'.",data:{operator:t.operator}})}function n(e){return r.indexOf(e.operator)!==-1}function i(e){return u.indexOf(e.operator)!==-1}function o(e){return c&&"|"===e.operator&&e.right&&"Literal"===e.right.type&&0===e.right.value}function a(e){!n(e)||i(e)||o(e)||t(e)}var s=e.options[0]||{},u=s.allow||[],c=s.int32Hint===!0;return{AssignmentExpression:a,BinaryExpression:a,UnaryExpression:a}}}},{}],150:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow use of the Buffer() constructor",category:"Node.js and CommonJS",recommended:!1},schema:[]},create:function(e){return{"CallExpression[callee.name='Buffer'], NewExpression[callee.name='Buffer']":function(t){e.report({node:t,message:"{{example}} is deprecated. Use Buffer.from(), Buffer.alloc(), or Buffer.allocUnsafe() instead.",data:{example:"CallExpression"===t.type?"Buffer()":"new Buffer()"}})}}}}},{}],151:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow the use of `arguments.caller` or `arguments.callee`",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{MemberExpression:function(t){var n=t.object.name,r=t.property.name;"arguments"===n&&!t.computed&&r&&r.match(/^calle[er]$/)&&e.report({node:t,message:"Avoid arguments.{{property}}.",data:{property:r}})}}}}},{}],152:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow lexical declarations in case clauses",category:"Best Practices",recommended:!0},schema:[]},create:function(e){function t(e){switch(e.type){case"FunctionDeclaration":case"ClassDeclaration":return!0;case"VariableDeclaration":return"var"!==e.kind;default:return!1}}return{SwitchCase:function(n){for(var r=0;r",">=","<","<=","==","===","!=","!=="]);return{BinaryExpression:function(r){n.has(r.operator)&&(t(r.left)||t(r.right))&&e.report({node:r,message:"Do not use the '{{operator}}' operator to compare against -0.",data:{operator:r.operator}})}}}}},{}],156:[function(e,t,n){"use strict";var r=e("../ast-utils"),i={DoWhileStatement:"a 'do...while' statement",ForStatement:"a 'for' statement",IfStatement:"an 'if' statement",WhileStatement:"a 'while' statement"};t.exports={meta:{docs:{description:"disallow assignment operators in conditional expressions",category:"Possible Errors",recommended:!0},schema:[{enum:["except-parens","always"]}]},create:function(e){function t(e){return e.parent&&e.parent.test&&e===e.parent.test}function n(e){var n=e;do if(t(n))return n.parent;while((n=n.parent)&&!r.isFunction(n));return null}function o(e){var t=c.getTokenBefore(e,1),n=c.getTokenAfter(e,1);return r.isParenthesised(c,e)&&r.isOpeningParenToken(t)&&t.range[1]<=e.range[0]&&r.isClosingParenToken(n)&&n.range[0]>=e.range[1]}function a(t){!t.test||"AssignmentExpression"!==t.test.type||("ForStatement"===t.type?r.isParenthesised(c,t.test):o(t.test))||e.report({node:t,loc:t.test.loc.start,message:"Expected a conditional expression and instead saw an assignment."})}function s(t){var r=n(t);r&&e.report({node:r,message:"Unexpected assignment within {{type}}.",data:{type:i[r.type]||r.type}})}var u=e.options[0]||"except-parens",c=e.getSourceCode();return"always"===u?{AssignmentExpression:s}:{DoWhileStatement:a,ForStatement:a,IfStatement:a,WhileStatement:a}}}},{"../ast-utils":67}],157:[function(e,t,n){"use strict";function r(e){return e&&"ConditionalExpression"===e.type}var i=e("../ast-utils.js");t.exports={meta:{docs:{description:"disallow arrow functions where they could be confused with comparisons",category:"ECMAScript 6",recommended:!1},fixable:"code",schema:[{type:"object",properties:{allowParens:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){var a=t.body;!r(a)||n.allowParens&&i.isParenthesised(o,a)||e.report({node:t,message:"Arrow function used ambiguously with a conditional expression.",fix:function(e){return n.allowParens&&e.replaceText(t.body,"("+o.getText(t.body)+")")}})}var n=e.options[0]||{},o=e.getSourceCode();return{ArrowFunctionExpression:t}}}},{"../ast-utils.js":67}],158:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow the use of `console`",category:"Possible Errors",recommended:!0},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},additionalProperties:!1}]},create:function(e){function t(e){var t=e.identifier;return t&&"console"===t.name}function n(e){var t=r.getStaticPropertyName(e);return t&&s.indexOf(t)!==-1}function i(e){var t=e.identifier,r=t.parent;return"MemberExpression"===r.type&&r.object===t&&!n(r); }function o(t){var n=t.identifier.parent;e.report({node:n,loc:n.loc,message:"Unexpected console statement."})}var a=e.options[0]||{},s=a.allow||[];return{"Program:exit":function(){var n=e.getScope(),a=r.getVariableByName(n,"console"),s=a&&a.defs.length>0,u=a?a.references:n.through.filter(t);s||u.filter(i).forEach(o)}}}}},{"../ast-utils":67}],159:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow reassigning `const` variables",category:"ECMAScript 6",recommended:!0},schema:[]},create:function(e){function t(t){r.getModifyingReferences(t.references).forEach(function(t){e.report({node:t.identifier,message:"'{{name}}' is constant.",data:{name:t.identifier.name}})})}return{VariableDeclaration:function(n){"const"===n.kind&&e.getDeclaredVariables(n).forEach(t)}}}}},{"../ast-utils":67}],160:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow constant expressions in conditions",category:"Possible Errors",recommended:!0},schema:[{type:"object",properties:{checkLoops:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e,n){switch(e.type){case"Literal":return"||"===n&&e.value===!0||"&&"===n&&e.value===!1;case"UnaryExpression":return"&&"===n&&"void"===e.operator;case"LogicalExpression":return t(e.left,e.operator)||t(e.right,e.operator)}return!1}function n(e,r){switch(e.type){case"Literal":case"ArrowFunctionExpression":case"FunctionExpression":case"ObjectExpression":case"ArrayExpression":return!0;case"UnaryExpression":return"void"===e.operator||("typeof"===e.operator&&r||n(e.argument,!0));case"BinaryExpression":return n(e.left,!1)&&n(e.right,!1)&&"in"!==e.operator;case"LogicalExpression":var i=n(e.left,r),o=n(e.right,r),a=i&&t(e.left,e.operator),s=o&&t(e.right,e.operator);return i&&o||a||s;case"AssignmentExpression":return"="===e.operator&&n(e.right,r);case"SequenceExpression":return n(e.expressions[e.expressions.length-1],r)}return!1}function r(t){t.test&&n(t.test,!0)&&e.report({node:t,message:"Unexpected constant condition."})}function i(e){a&&r(e)}var o=e.options[0]||{},a=o.checkLoops!==!1;return{ConditionalExpression:r,IfStatement:r,WhileStatement:i,DoWhileStatement:i,ForStatement:i}}}},{}],161:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `continue` statements",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){return{ContinueStatement:function(t){e.report({node:t,message:"Unexpected use of continue statement."})}}}}},{}],162:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow control characters in regular expressions",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){function t(t){if(t.value instanceof RegExp)return t.value;if("string"==typeof t.value){var n=e.getAncestors().pop();if(("NewExpression"===n.type||"CallExpression"===n.type)&&"Identifier"===n.callee.type&&"RegExp"===n.callee.name)try{return new RegExp(t.value)}catch(e){return null}}return null}function n(e){var t=e.match(r)||[],n=[],u=e.search(a);if(u>-1){var c=e.slice(0,u).match(o),l=null===c||!(c[0].length%2);l&&(n=e.slice(u,-1).split(i).filter(Boolean).map(function(e){var t=e.match(s)||[e];return"\\"+t[0]}))}return t.map(function(e){var t=("0"+e.charCodeAt(0).toString(16)).slice(-2);return"\\x"+t}).concat(n)}var r=/[\x00-\x1f]/g,i=/\\+/g,o=/\\+$/g,a=/\\x[01][0-9a-f]/gi,s=/x[01][0-9a-f]/gi;return{Literal:function(r){var i=t(r);if(i){var o=i.toString(),a=n(o);a.length>0&&e.report({node:r,message:"Unexpected control character(s) in regular expression: {{controlChars}}.",data:{controlChars:a.join(", ")}})}}}}}},{}],163:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow the use of `debugger`",category:"Possible Errors",recommended:!0},fixable:"code",schema:[]},create:function(e){return{DebuggerStatement:function(t){e.report({node:t,message:"Unexpected 'debugger' statement.",fix:function(e){return e.remove(t)}})}}}}},{}],164:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow deleting variables",category:"Variables",recommended:!0},schema:[]},create:function(e){return{UnaryExpression:function(t){"delete"===t.operator&&"Identifier"===t.argument.type&&e.report({node:t,message:"Variables should not be deleted."})}}}}},{}],165:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow division operators explicitly at the beginning of regular expressions",category:"Best Practices",recommended:!1},schema:[]},create:function(e){var t=e.getSourceCode();return{Literal:function(n){var r=t.getFirstToken(n);"RegularExpression"===r.type&&"="===r.value[1]&&e.report({node:n,message:"A regular expression literal can be confused with '/='."})}}}}},{}],166:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow duplicate arguments in `function` definitions",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){function t(e){return"Parameter"===e.type}function n(n){for(var r=e.getDeclaredVariables(n),i=0;i=2&&e.report({node:n,message:"Duplicate param '{{name}}'.",data:{name:o.name}})}}return{FunctionDeclaration:n,FunctionExpression:n}}}},{}],167:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow duplicate class members",category:"ECMAScript 6",recommended:!0},schema:[]},create:function(e){function t(e,t){var n=r[r.length-1],i="$"+e;return n[i]||(n[i]={nonStatic:{init:!1,get:!1,set:!1},static:{init:!1,get:!1,set:!1}}),n[i][t?"static":"nonStatic"]}function n(e){switch(e.type){case"Identifier":return e.name;case"Literal":return String(e.value);default:return""}}var r=[];return{Program:function(){r=[]},ClassBody:function(){r.push(Object.create(null))},"ClassBody:exit":function(){r.pop()},MethodDefinition:function(r){if(!r.computed){var i=n(r.key),o=t(i,r.static),a=!1;"get"===r.kind?(a=o.init||o.get,o.get=!0):"set"===r.kind?(a=o.init||o.set,o.set=!0):(a=o.init||o.get||o.set,o.init=!0),a&&e.report({node:r,message:"Duplicate name '{{name}}'.",data:{name:i}})}}}}}},{}],168:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n0||e.report({node:t,message:"Empty block statement."}))},SwitchStatement:function(t){"undefined"!=typeof t.cases&&0!==t.cases.length||e.report({node:t,message:"Empty switch statement."})}}}}},{"../ast-utils":67}],176:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `null` comparisons without type-checking operators",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{BinaryExpression:function(t){var n="=="===t.operator||"!="===t.operator;("Literal"===t.right.type&&"null"===t.right.raw&&n||"Literal"===t.left.type&&"null"===t.left.raw&&n)&&e.report({node:t,message:"Use ‘===’ to compare with ‘null’."})}}}}},{}],177:[function(e,t,n){"use strict";function r(e,t){return"Identifier"===e.type&&e.name===t}function i(e,t){switch(e.type){case"Literal":return e.value===t;case"TemplateLiteral":return 0===e.expressions.length&&e.quasis[0].value.cooked===t;default:return!1}}function o(e,t){return"MemberExpression"===e.type&&(e.computed?i:r)(e.property,t)}var a=e("../ast-utils"),s=Object.freeze(["global","window"]);t.exports={meta:{docs:{description:"disallow the use of `eval()`",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{allowIndirect:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){var n=e.getScope().isStrict;f={upper:f,node:t,strict:n,defaultThis:!1,initialized:n}}function n(){f=f.upper}function i(t){var n=t,r=t.parent;"MemberExpression"===t.type&&(n=t.property),"CallExpression"===r.type&&r.callee===t&&(t=r),e.report({node:t,loc:n.loc.start,message:"eval can be harmful."})}function u(e){for(var t=0;t1||"SpreadElement"===i.arguments[0].type)return null;var t=i.arguments[0];return r.getPrecedence(t)=e.range[1]}function i(e){return t(e)&&E(e)}function o(e){return t(e)&&n(e)}function a(e){return T&&"AssignmentExpression"===e.test.type}function s(e){for(;e;){if("ReturnStatement"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type)return!0;e=e.parent}return!1}function u(e){var t=_.getLastToken(e),n=_.getTokenBefore(t);return e.arguments.length>0||r.isOpeningParenToken(n)&&r.isClosingParenToken(t)}function c(e){return"AssignmentExpression"===e.type||("ConditionalExpression"===e.type&&("AssignmentExpression"===e.consequent.type||"AssignmentExpression"===e.alternate.type)||!!(e.left&&"AssignmentExpression"===e.left.type||e.right&&"AssignmentExpression"===e.right.type))}function l(e){return!(!A||!s(e))&&("ReturnStatement"===e.type?e.argument&&c(e.argument):c("ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type?e.body:e))}function p(e,t){return e.loc.end.line===t.loc.start.line?i(t):o(t)}function f(e){var t=_.getTokenBefore(e),n=_.getTokenBefore(e,1),i=_.getFirstToken(e);return n&&n.range[1]===t.range[0]&&t.range[1]===i.range[0]&&!r.canTokensBeAdjacent(n,i)}function d(e){var t=_.getTokensAfter(e,{count:2}),n=t[0],i=t[1],o=_.getLastToken(e);return n&&i&&!_.isSpaceBetweenTokens(n,i)&&!r.canTokensBeAdjacent(o,i)}function h(t){var r=_.getTokenBefore(t),i=_.getTokenAfter(t);w.has(_.getFirstToken(t))&&!n(t)||e.report({node:t,loc:r.loc.start,message:"Gratuitous parentheses around expression.",fix:function(e){var n=_.text.slice(r.range[1],i.range[0]);return e.replaceTextRange([r.range[0],i.range[1]],(f(t)?" ":"")+n+(d(t)?" ":""))}})}function m(e){"UnaryExpression"===e.type&&"BinaryExpression"===e.argument.type&&"**"===e.argument.operator||i(e.argument)&&S(e.argument)>=S(e)&&h(e.argument)}function g(e){i(e.callee)&&S(e.callee)>=S(e)&&("CallExpression"!==e.type||"FunctionExpression"!==e.callee.type&&("NewExpression"!==e.callee.type||u(e.callee))||o(e.callee))&&h(e.callee),1===e.arguments.length?o(e.arguments[0])&&S(e.arguments[0])>=k&&h(e.arguments[0]):[].forEach.call(e.arguments,function(e){i(e)&&S(e)>=k&&h(e)})}function v(e){var t=S(e),n=S(e.left),r=S(e.right),o="**"===e.operator,a=D&&("BinaryExpression"===e.left.type||"LogicalExpression"===e.left.type)||"UnaryExpression"===e.left.type&&o,s=D&&("BinaryExpression"===e.right.type||"LogicalExpression"===e.right.type);!a&&i(e.left)&&(n>t||n===t&&!o)&&h(e.left),!s&&i(e.right)&&(r>t||r===t&&o)&&h(e.right)}function y(e){if(e.superClass){var t=S(e.superClass)>I?i(e.superClass):o(e.superClass);t&&h(e.superClass)}}function x(e){var t=S(e.argument)>=k?i(e.argument):o(e.argument);t&&h(e.argument)}function b(e){var t=E(e)?_.getTokenBefore(e):_.getFirstToken(e),n=_.getTokenAfter(t,r.isNotOpeningParenToken);r.isOpeningParenToken(t)&&(r.isOpeningBraceToken(n)||"Keyword"===n.type&&("function"===n.value||"class"===n.value||"let"===n.value&&r.isOpeningBracketToken(_.getTokenAfter(n))))&&w.add(n),i(e)&&h(e)}var _=e.getSourceCode(),w=new WeakSet,E=r.isParenthesised.bind(r,_),S=r.getPrecedence,C="functions"!==e.options[0],T=C&&e.options[1]&&e.options[1].conditionalAssign===!1,D=C&&e.options[1]&&e.options[1].nestedBinaryExpressions===!1,A=C&&e.options[1]&&e.options[1].returnAssign===!1,P=C&&e.options[1]&&e.options[1].ignoreJSX,k=S({type:"AssignmentExpression"}),I=S({type:"UpdateExpression"});return{ArrayExpression:function(e){[].forEach.call(e.elements,function(e){e&&i(e)&&S(e)>=k&&h(e)})},ArrowFunctionExpression:function(e){if(!l(e)&&"BlockStatement"!==e.body.type){var t=_.getFirstToken(e.body,r.isNotOpeningParenToken),n=_.getTokenBefore(t);r.isOpeningParenToken(n)&&r.isOpeningBraceToken(t)&&w.add(t),i(e.body)&&S(e.body)>=k&&h(e.body)}},AssignmentExpression:function(e){l(e)||i(e.right)&&S(e.right)>=S(e)&&h(e.right)},BinaryExpression:v,CallExpression:g,ConditionalExpression:function(e){l(e)||(i(e.test)&&S(e.test)>=S({type:"LogicalExpression",operator:"||"})&&h(e.test),i(e.consequent)&&S(e.consequent)>=k&&h(e.consequent),i(e.alternate)&&S(e.alternate)>=k&&h(e.alternate))},DoWhileStatement:function(e){o(e.test)&&!a(e)&&h(e.test)},ExportDefaultDeclaration:function(e){return b(e.declaration)},ExpressionStatement:function(e){return b(e.expression)},ForInStatement:function(e){i(e.right)&&h(e.right),i(e.left)&&h(e.left)},ForOfStatement:function(e){i(e.right)&&h(e.right),i(e.left)&&h(e.left)},ForStatement:function(e){e.init&&i(e.init)&&h(e.init),e.test&&i(e.test)&&!a(e)&&h(e.test),e.update&&i(e.update)&&h(e.update)},IfStatement:function(e){o(e.test)&&!a(e)&&h(e.test)},LogicalExpression:v,MemberExpression:function(e){i(e.object)&&S(e.object)>=S(e)&&(e.computed||!(r.isDecimalInteger(e.object)||"Literal"===e.object.type&&e.object.regex))&&h(e.object),e.computed&&i(e.property)&&h(e.property)},NewExpression:g,ObjectExpression:function(e){[].forEach.call(e.properties,function(e){var t=e.value;t&&i(t)&&S(t)>=k&&h(t)})},ReturnStatement:function(e){var t=_.getFirstToken(e);l(e)||!e.argument||!p(t,e.argument)||"Literal"===e.argument.type&&e.argument.regex||h(e.argument)},SequenceExpression:function(e){[].forEach.call(e.expressions,function(t){i(t)&&S(t)>=S(e)&&h(t)})},SwitchCase:function(e){e.test&&i(e.test)&&h(e.test)},SwitchStatement:function(e){o(e.discriminant)&&h(e.discriminant)},ThrowStatement:function(e){var t=_.getFirstToken(e);p(t,e.argument)&&h(e.argument)},UnaryExpression:m,UpdateExpression:m,AwaitExpression:m,VariableDeclarator:function(e){e.init&&i(e.init)&&S(e.init)>=k&&("Literal"!==e.init.type||!e.init.regex)&&h(e.init)},WhileStatement:function(e){o(e.test)&&!a(e)&&h(e.test)},WithStatement:function(e){o(e.object)&&h(e.object)},YieldExpression:function(e){if(e.argument){var t=_.getFirstToken(e);(S(e.argument)>=S(e)&&p(t,e.argument)||o(e.argument))&&h(e.argument)}},ClassDeclaration:y,ClassExpression:y,SpreadElement:x,SpreadProperty:x,ExperimentalSpreadProperty:x}}}},{"../ast-utils.js":67}],184:[function(e,t,n){"use strict";var r=e("../util/fix-tracker"),i=e("../ast-utils");t.exports={meta:{docs:{description:"disallow unnecessary semicolons",category:"Possible Errors",recommended:!0},fixable:"code",schema:[]},create:function(e){function t(t){e.report({node:t,message:"Unnecessary semicolon.",fix:function(n){return new r(n,e.getSourceCode()).retainSurroundingTokens(t).remove(t)}})}function n(e){for(var n=e;"Punctuator"===n.type&&!i.isClosingBraceToken(n);n=o.getTokenAfter(n))i.isSemicolonToken(n)&&t(n)}var o=e.getSourceCode();return{EmptyStatement:function(e){var n=e.parent,r=["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement","IfStatement","LabeledStatement","WithStatement"];r.indexOf(n.type)===-1&&t(e)},ClassBody:function(e){n(o.getFirstToken(e,1))},MethodDefinition:function(e){n(o.getTokenAfter(e))}}}}},{"../ast-utils":67,"../util/fix-tracker":348}],185:[function(e,t,n){"use strict";function r(e,t,n){var r=t.getSourceCode(),i=a.last(r.getCommentsBefore(e));return Boolean(i&&n.test(i.value))}function i(e){return e.reachable}function o(e,t){return t.loc.start.line>e.loc.end.line+1}var a=e("lodash"),s=/falls?\s?through/i;t.exports={meta:{docs:{description:"disallow fallthrough of `case` statements",category:"Best Practices",recommended:!0},schema:[{type:"object",properties:{commentPattern:{type:"string"}},additionalProperties:!1}]},create:function(e){var t=e.options[0]||{},n=null,u=e.getSourceCode(),c=null,l=null;return l=t.commentPattern?new RegExp(t.commentPattern):s,{onCodePathStart:function(e){n=e},onCodePathEnd:function(){n=n.upper},SwitchCase:function(t){c&&!r(t,e,l)&&e.report({message:"Expected a 'break' statement before '{{type}}'.",data:{type:t.test?"case":"default"},node:t}),c=null},"SwitchCase:exit":function(e){var t=u.getTokenAfter(e);n.currentSegments.some(i)&&(e.consequent.length>0||o(e,t))&&a.last(e.parent.cases)!==e&&(c=e)}}}}},{lodash:48}],186:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow leading or trailing decimal points in numeric literals",category:"Best Practices",recommended:!1},schema:[],fixable:"code"},create:function(e){var t=e.getSourceCode();return{Literal:function(n){"number"==typeof n.value&&(n.raw.startsWith(".")&&e.report({node:n,message:"A leading decimal point can be confused with a dot.",fix:function(e){var i=t.getTokenBefore(n),o=i&&i.range[1]===n.range[0]&&!r.canTokensBeAdjacent(i,"0"+n.raw);return e.insertTextBefore(n,o?" 0":"0")}}),n.raw.indexOf(".")===n.raw.length-1&&e.report({node:n,message:"A trailing decimal point can be confused with a dot.",fix:function(e){return e.insertTextAfter(n,"0")}}))}}}}},{"../ast-utils":67}],187:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow reassigning `function` declarations",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){function t(t){r.getModifyingReferences(t).forEach(function(t){e.report({node:t.identifier,message:"'{{name}}' is a function.",data:{name:t.identifier.name}})})}function n(e){"FunctionName"===e.defs[0].type&&t(e.references)}function i(t){e.getDeclaredVariables(t).forEach(n)}return{FunctionDeclaration:i,FunctionExpression:i}}}},{"../ast-utils":67}],188:[function(e,t,n){"use strict";t.exports={meta:{docs:{ description:"disallow assignments to native objects or read-only global variables",category:"Best Practices",recommended:!0},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]},create:function(e){function t(t,n,r){var i=t.identifier;t.init!==!1||!t.isWrite()||0!==n&&r[n-1].identifier===i||e.report({node:i,message:"Read-only global '{{name}}' should not be modified.",data:i})}function n(e){e.writeable===!1&&i.indexOf(e.name)===-1&&e.references.forEach(t)}var r=e.options[0],i=r&&r.exceptions||[];return{Program:function(){var t=e.getScope();t.variables.forEach(n)}}}}},{}],189:[function(e,t,n){"use strict";function r(e){return e=e||{},{boolean:!("boolean"in e)||Boolean(e.boolean),number:!("number"in e)||Boolean(e.number),string:!("string"in e)||Boolean(e.string),allow:e.allow||[]}}function i(e){return"!"===e.operator&&"UnaryExpression"===e.argument.type&&"!"===e.argument.operator}function o(e){return"~"===e.operator&&"CallExpression"===e.argument.type&&"MemberExpression"===e.argument.callee.type&&"Identifier"===e.argument.callee.property.type&&h.test(e.argument.callee.property.name)}function a(e){return"*"===e.operator&&("Literal"===e.left.type&&1===e.left.value||"Literal"===e.right.type&&1===e.right.value)}function s(e){return"Literal"===e.type&&"number"==typeof e.value||"CallExpression"===e.type&&("Number"===e.callee.name||"parseInt"===e.callee.name||"parseFloat"===e.callee.name)}function u(e){var t=e.left,n=e.right;return"BinaryExpression"===n.type||s(n)?"BinaryExpression"===t.type||s(t)?null:t:n}function c(e){return d.isStringLiteral(e)&&(""===e.value||"TemplateLiteral"===e.type&&1===e.quasis.length&&""===e.quasis[0].value.cooked)}function l(e){return"+"===e.operator&&(c(e.left)&&!d.isStringLiteral(e.right)||c(e.right)&&!d.isStringLiteral(e.left))}function p(e){return"+="===e.operator&&c(e.right)}function f(e){return c(e.left)?e.right:e.left}var d=e("../ast-utils"),h=/^(?:i|lastI)ndexOf$/,m=["~","!!","+","*"];t.exports={meta:{docs:{description:"disallow shorthand type conversions",category:"Best Practices",recommended:!1},fixable:"code",schema:[{type:"object",properties:{boolean:{type:"boolean"},number:{type:"boolean"},string:{type:"boolean"},allow:{type:"array",items:{enum:m},uniqueItems:!0}},additionalProperties:!1}]},create:function(e){function t(t,n,r){r="undefined"==typeof r||r,e.report({node:t,message:"use `{{recommendation}}` instead.",data:{recommendation:n},fix:function(e){if(!r)return null;var i=c.getTokenBefore(t);return i&&i.range[1]===t.range[0]&&!d.canTokensBeAdjacent(i,n)?e.replaceText(t," "+n):e.replaceText(t,n)}})}var n=r(e.options[0]),c=e.getSourceCode();return{UnaryExpression:function(e){var r=void 0;if(r=n.allow.indexOf("!!")>=0,!r&&n.boolean&&i(e)){var a="Boolean("+c.getText(e.argument.argument)+")";t(e,a)}if(r=n.allow.indexOf("~")>=0,!r&&n.boolean&&o(e)){var u=c.getText(e.argument)+" !== -1";t(e,u,!1)}if(r=n.allow.indexOf("+")>=0,!r&&n.number&&"+"===e.operator&&!s(e.argument)){var l="Number("+c.getText(e.argument)+")";t(e,l)}},"BinaryExpression:exit":function(e){var r=void 0;r=n.allow.indexOf("*")>=0;var i=!r&&n.number&&a(e)&&u(e);if(i){var o="Number("+c.getText(i)+")";t(e,o)}if(r=n.allow.indexOf("+")>=0,!r&&n.string&&l(e)){var s="String("+c.getText(f(e))+")";t(e,s)}},AssignmentExpression:function(e){var r=n.allow.indexOf("+")>=0;if(!r&&n.string&&p(e)){var i=c.getText(f(e)),o=i+" = String("+i+")";t(e,o)}}}}}},{"../ast-utils":67}],190:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow variable and `function` declarations in the global scope",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{Program:function(){var t=e.getScope();t.variables.forEach(function(t){t.writeable||t.defs.forEach(function(t){("FunctionName"===t.type||"Variable"===t.type&&"var"===t.parent.kind)&&e.report({node:t.node,message:"Implicit global variable, assign as global property instead."})})}),t.implicit.variables.forEach(function(n){var r=t.set.get(n.name);r&&r.writeable||n.defs.forEach(function(t){e.report({node:t.node,message:"Implicit global variable, assign as global property instead."})})})}}}}},{}],191:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow the use of `eval()`-like methods",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(e){return e?e[e.length-1]:null}function n(e){var t=e.object,n=e.property,r=a.test(n.name)||a.test(n.value);return"window"===t.name&&r}function r(e){var t="MemberExpression"===e.callee.type,r="Identifier"===e.callee.type,i=r&&a.test(e.callee.name)||t&&n(e.callee);return i&&e.arguments.length}function i(e){return e.parent===t(t(s))&&("CallExpression"!==e.parent.type||e===e.parent.arguments[0])}function o(t){if(i(t)){var n=s.pop();e.report({node:n[0],message:"Implied eval. Consider passing a function instead of a string."})}}var a=/^(setTimeout|setInterval|execScript)$/,s=[];return{CallExpression:function(e){r(e)&&s.push([e])},"CallExpression:exit":function(e){e===t(t(s))&&s.pop()},BinaryExpression:function(e){"+"===e.operator&&i(e)&&t(s).push(e)},"BinaryExpression:exit":function(e){e===t(t(s))&&t(s).pop()},Literal:function(e){"string"==typeof e.value&&o(e)},TemplateLiteral:function(e){o(e)}}}}},{}],192:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow inline comments after code",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){function t(t){var i=String(n.lines[t.loc.start.line-1]),o=String(n.lines[t.loc.end.line-1]),a=i.slice(0,t.loc.start.column).trim(),s=o.slice(t.loc.end.column).trim(),u=r.isDirectiveComment(t);u||!a&&!s||e.report({node:t,message:"Unexpected comment inline with code."})}var n=e.getSourceCode();return{Program:function(){var e=n.getAllComments();e.filter(function(e){return"Shebang"!==e.type}).forEach(t)}}}}},{"../ast-utils":67}],193:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow variable or `function` declarations in nested blocks",category:"Possible Errors",recommended:!0},schema:[{enum:["functions","both"]}]},create:function(e){function t(){for(var t=e.getAncestors(),n=t.pop(),r=1;n&&["Program","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"].indexOf(n.type)<0;)r+=1,n=t.pop();return{type:n.type,distance:r}}function n(n){var r=t(),i="Program"===r.type&&1===r.distance||2===r.distance;i||e.report({node:n,message:"Move {{type}} declaration to {{body}} root.",data:{type:"FunctionDeclaration"===n.type?"function":"variable",body:"Program"===r.type?"program":"function body"}})}return{FunctionDeclaration:n,VariableDeclaration:function(t){"both"===e.options[0]&&"var"===t.kind&&n(t)}}}}},{}],194:[function(e,t,n){"use strict";var r=e("espree");t.exports={meta:{docs:{description:"disallow invalid regular expression strings in `RegExp` constructors",category:"Possible Errors",recommended:!0},schema:[{type:"object",properties:{allowConstructorFlags:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},create:function(e){function t(e){return e&&"Literal"===e.type&&"string"==typeof e.value}function n(n){if("Identifier"===n.callee.type&&"RegExp"===n.callee.name&&t(n.arguments[0])){var i=t(n.arguments[1])?n.arguments[1].value:"";o&&(i=i.replace(new RegExp("["+o+"]","gi"),""));try{void new RegExp(n.arguments[0].value)}catch(t){e.report({node:n,message:"{{message}}.",data:t})}if(i)try{r.parse("/./"+i,e.parserOptions)}catch(t){e.report({node:n,message:"Invalid flags supplied to RegExp constructor '{{flags}}'.",data:{flags:i}})}}}var i=e.options[0],o="";return i&&i.allowConstructorFlags&&(o=i.allowConstructorFlags.join("")),{CallExpression:n,NewExpression:n}}}},{espree:"espree"}],195:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow `this` keywords outside of classes or class-like objects",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(t){i.push({init:!e.getScope().isStrict,node:t,valid:!0})}function n(){i.pop()}var i=[],o=e.getSourceCode();return i.getCurrent=function(){var e=this[this.length-1];return e.init||(e.init=!0,e.valid=!r.isDefaultThisBinding(e.node,o)),e},{Program:function(t){var n=e.getScope(),r=e.parserOptions.ecmaFeatures||{};i.push({init:!0,node:t,valid:!(n.isStrict||"module"===t.sourceType||r.globalReturn&&n.childScopes[0].isStrict)})},"Program:exit":function(){i.pop()},FunctionDeclaration:t,"FunctionDeclaration:exit":n,FunctionExpression:t,"FunctionExpression:exit":n,ThisExpression:function(t){var n=i.getCurrent();n&&!n.valid&&e.report({node:t,message:"Unexpected 'this'."})}}}}},{"../ast-utils":67}],196:[function(e,t,n){"use strict";var r=e("../ast-utils"),i=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000\u2028\u2029]/,o=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/gm,a=/[\u2028\u2029]/gm,s=r.createGlobalLinebreakMatcher();t.exports={meta:{docs:{description:"disallow irregular whitespace outside of strings and comments",category:"Possible Errors",recommended:!0},schema:[{type:"object",properties:{skipComments:{type:"boolean"},skipStrings:{type:"boolean"},skipTemplates:{type:"boolean"},skipRegExps:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){var t=e.loc.start,n=e.loc.end;f=f.filter(function(e){var r=e[1];return!(r.line>=t.line&&r.line<=n.line&&r.column>=t.column&&(r.column<=n.column||r.line=6&&(o={BlockStatement:function(e){n(e)&&i.push(e)},"BlockStatement:exit":function(e){i.length>0&&i[i.length-1]===e&&(i.pop(),t(e))}},o.VariableDeclaration=function(e){"let"!==e.kind&&"const"!==e.kind||r()},o.FunctionDeclaration=function(){e.getScope().isStrict&&r()},o.ClassDeclaration=r),o}}},{}],201:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `if` statements as the only statement in `else` blocks",category:"Stylistic Issues",recommended:!1},schema:[],fixable:"code"},create:function(e){var t=e.getSourceCode();return{IfStatement:function(n){var r=e.getAncestors(),i=r.pop(),o=r.pop();i&&"BlockStatement"===i.type&&1===i.body.length&&o&&"IfStatement"===o.type&&i===o.alternate&&e.report({node:n,message:"Unexpected if as the only statement in an else block.",fix:function(e){var r=t.getFirstToken(i),o=t.getLastToken(i),a=t.getTokenBefore(r),s=t.getTokenAfter(o),u=t.getLastToken(n.consequent),c=t.getText();return c.slice(r.range[1],n.range[0]).trim()||c.slice(n.range[1],o.range[0]).trim()?null:"BlockStatement"!==n.consequent.type&&";"!==u.value&&s&&(n.consequent.loc.end.line===s.loc.start.line||/^[([\/+`-]/.test(s.value)||"++"===u.value||"--"===u.value)?null:e.replaceTextRange([r.range[0],o.range[1]],(a.range[1]===r.range[0]?" ":"")+t.getText(n))}})}}}}},{}],202:[function(e,t,n){"use strict";function r(e){for(var t=e.parent;t;){switch(t.type){case"WhileStatement":case"DoWhileStatement":return t;case"ForStatement":if(t.init!==e)return t;break;case"ForInStatement":case"ForOfStatement":if(t.right!==e)return t;break;case"ArrowFunctionExpression":case"FunctionExpression":case"FunctionDeclaration":return null}e=t,t=e.parent}return null}function i(e,t){for(var n=e,i=t?t.range[1]:0;e&&e.range[0]>=i;)n=e,e=r(e);return n}function o(e,t,n){function r(e){var t=e.identifier;return!e.isWrite()||o.scope.variableScope===e.from.variableScope&&t.range[0]t.range[0]&&s.range[1]0&&!i.every(o.bind(null,t,n))&&e.report({node:t,message:"Don't make functions within a loop."})}}return{ArrowFunctionExpression:t,FunctionExpression:t,FunctionDeclaration:t}}}},{}],203:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow magic numbers",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{detectObjects:{type:"boolean"},enforceConst:{type:"boolean"},ignore:{type:"array",items:{type:"number"},uniqueItems:!0},ignoreArrayIndexes:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){return"number"==typeof e.value}function n(e){return c.indexOf(e)!==-1}function r(e,t){return"CallExpression"===e.type&&t===e.arguments[1]&&("parseInt"===e.callee.name||"MemberExpression"===e.callee.type&&"Number"===e.callee.object.name&&"parseInt"===e.callee.property.name)}function i(e){return 0===e.type.indexOf("JSX")}function o(e){return"MemberExpression"===e.type&&l}var a=e.options[0]||{},s=!!a.detectObjects,u=!!a.enforceConst,c=a.ignore||[],l=!!a.ignoreArrayIndexes;return{Literal:function(a){var c=a.parent,l=a.value,p=a.raw,f=s?[]:["ObjectExpression","Property","AssignmentExpression"];t(a)&&("UnaryExpression"===c.type&&"-"===c.operator&&(a=c,c=a.parent,l=-l,p="-"+p),n(l)||r(c,a)||o(c)||i(c)||("VariableDeclarator"===c.type?u&&"const"!==c.parent.kind&&e.report({node:a,message:"Number constants declarations must use 'const'."}):(f.indexOf(c.type)===-1||"AssignmentExpression"===c.type&&"Identifier"===c.left.type)&&e.report({node:a,message:"No magic number: {{raw}}.",data:{raw:p}})))}}}}},{}],204:[function(e,t,n){"use strict";function r(e){var t=e&&e.groups&&e.groups.length>0,n=t?e.groups:f,r=(e&&e.allowSamePrecedence)!==!1;return{groups:n,allowSamePrecedence:r}}function i(e,t,n){return e.some(function(e){return e.indexOf(t)!==-1&&e.indexOf(n)!==-1})}var o=e("../ast-utils.js"),a=["+","-","*","/","%","**"],s=["&","|","^","~","<<",">>",">>>"],u=["==","!=","===","!==",">",">=","<","<="],c=["&&","||"],l=["in","instanceof"],p=[].concat(a,s,u,c,l),f=[a,s,u,c,l],d=/^(?:Binary|Logical)Expression$/;t.exports={meta:{docs:{description:"disallow mixed binary operators",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{groups:{type:"array",items:{type:"array",items:{enum:p},minItems:2,uniqueItems:!0},uniqueItems:!0},allowSamePrecedence:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){var t=e,n=e.parent;return!i(l.groups,t.operator,n.operator)||l.allowSamePrecedence&&o.getPrecedence(t)===o.getPrecedence(n)}function n(e){return e.operator!==e.parent.operator&&!o.isParenthesised(c,e)}function a(e){return c.getTokenAfter(e.left,o.isNotClosingParenToken)}function s(t){var n=t.parent,r=n.left===t?t:n,i=n.left!==t?t:n,o="Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'.",s={leftOperator:r.operator,rightOperator:i.operator};e.report({node:r,loc:a(r).loc.start,message:o,data:s}),e.report({node:i,loc:a(i).loc.start,message:o,data:s})}function u(e){d.test(e.parent.type)&&n(e)&&!t(e)&&s(e)}var c=e.getSourceCode(),l=r(e.options[0]);return{BinaryExpression:u,LogicalExpression:u}}}},{"../ast-utils.js":67}],205:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.exports={meta:{docs:{description:"disallow `require` calls to be mixed with regular variable declarations",category:"Node.js and CommonJS",recommended:!1},schema:[{oneOf:[{type:"boolean"},{type:"object",properties:{grouping:{type:"boolean"},allowCall:{type:"boolean"}},additionalProperties:!1}]}]},create:function(e){function t(){return["assert","buffer","child_process","cluster","crypto","dgram","dns","domain","events","fs","http","https","net","os","path","punycode","querystring","readline","repl","smalloc","stream","string_decoder","tls","tty","url","util","v8","vm","zlib"]}function n(e){return e?"CallExpression"===e.type&&"Identifier"===e.callee.type&&"require"===e.callee.name?p:c&&"CallExpression"===e.type&&"CallExpression"===e.callee.type?n(e.callee):"MemberExpression"===e.type?n(e.object):d:f}function i(e){if("MemberExpression"===e.type)return i(e.object);if(0===e.arguments.length)return v;var t=e.arguments[0];return"Literal"!==t.type||"string"!=typeof t.value?v:l.indexOf(t.value)!==-1?h:/^\.{0,2}\//.test(t.value)?m:g}function o(e){var t={};return e.forEach(function(e){var r=n(e.init);t[r]=!0}),!(!t[p]||!t[f]&&!t[d])}function a(e){var t={};return e.forEach(function(e){n(e.init)===p&&(t[i(e.init)]=!0)}),Object.keys(t).length<=1}var s=e.options[0],u=!1,c=!1;"object"===("undefined"==typeof s?"undefined":r(s))?(u=s.grouping,c=s.allowCall):u=!!s;var l=t(),p="require",f="uninitialized",d="other",h="core",m="file",g="module",v="computed";return{VariableDeclaration:function(t){o(t.declarations)?e.report({node:t,message:"Do not mix 'require' and other declarations."}):u&&!a(t.declarations)&&e.report({node:t,message:"Do not mix core, module, file and computed requires."})}}}}},{}],206:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow mixed spaces and tabs for indentation",category:"Stylistic Issues",recommended:!0},schema:[{enum:["smart-tabs",!0,!1]}]},create:function(e){function t(e,t,n){return te.end.line||t===e.end.line&&n>e.end.column}var r=e.getSourceCode(),i=void 0,o=[];switch(e.options[0]){case!0:case"smart-tabs":i=!0;break;default:i=!1}return{TemplateElement:function(e){o.push(e.loc)},"Program:exit":function(a){var s=/^(?=[\t ]*(\t | \t))/,u=r.lines,c=r.getAllComments();c.forEach(function(e){o.push(e.loc)}),o.sort(function(e,n){return t(e,n.start.line,n.start.column)?1:t(n,e.start.line,n.start.column)?-1:0}),i&&(s=/^(?=[\t ]* \t)/),u.forEach(function(r,i){var u=s.exec(r);if(u){for(var c=i+1,l=u.index+1,p=0;pn.range[1]))break;p++}return!1}function i(e){var t=e.value.split("\n"),n=t[0],r=n.substring(0,12)+"...";return 1===t.length&&n.length<=12?n:r}function o(e,t){return function(n){return n.replaceTextRange([e.range[1],t.range[0]]," ")}}var a=e.getSourceCode(),s={Property:!0},u=e.options[0]||{},c=u.ignoreEOLComments,l=!0,p=0;return u&&u.exceptions&&(Object.keys(u.exceptions).forEach(function(e){u.exceptions[e]?s[e]=!0:delete s[e]}),l=Object.keys(s).length>0),{Program:function(){for(var u=a.getText(),p=a.getAllComments(),f=/[^\s].*? {2,}/g,d=void 0;f.test(u);)if(!n(f.lastIndex,p)){var h=a.getTokenByRangeStart(f.lastIndex,{includeComments:!0});if(h){if(c&&r.isCommentToken(h)&&t(h))return;var m=a.getTokenBefore(h,{includeComments:!0});if(l&&(d=a.getNodeByRangeIndex(f.lastIndex-1)),!d||!s[d.type]){var g=h.value;"Block"===h.type?g="/*"+i(h)+"*/":"Line"===h.type&&(g="//"+i(h)),e.report({node:h,loc:h.loc.start,message:"Multiple spaces found before '{{value}}'.",data:{value:g},fix:o(m,h)})}}}}}}}},{"../ast-utils":67}],209:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow multiline strings",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(e){return 0===e.type.indexOf("JSX")}return{Literal:function(n){r.LINEBREAK_MATCHER.test(n.raw)&&!t(n.parent)&&e.report({node:n,message:"Multiline support is limited to browsers supporting ES5 only."})}}}}},{"../ast-utils":67}],210:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow multiple empty lines",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{type:"object",properties:{max:{type:"integer",minimum:0},maxEOF:{type:"integer",minimum:0},maxBOF:{type:"integer",minimum:0}},required:["max"],additionalProperties:!1}]},create:function(e){var t=2,n=t,r=t;e.options.length&&(t=e.options[0].max,n="undefined"!=typeof e.options[0].maxEOF?e.options[0].maxEOF:t,r="undefined"!=typeof e.options[0].maxBOF?e.options[0].maxBOF:t);var i=e.getSourceCode(),o=""===i.lines[i.lines.length-1]?i.lines.slice(0,-1):i.lines,a=new Set;return{TemplateLiteral:function(e){e.quasis.forEach(function(e){for(var t=e.loc.start.line;tl&&e.report({node:s,loc:{start:{line:a+1,column:0},end:{line:u,column:0}},message:c,data:{max:l,pluralizedLines:1===l?"line":"lines"},fix:function(e){var t=i.getIndexFromLoc({line:a+1,column:0}),n=u-l,r=n<=o.length?i.getIndexFromLoc({line:n,column:0}):i.text.length;return e.removeRange([t,r])}}),u},0)}}}}},{}],211:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow assignments to native objects or read-only global variables",category:"Best Practices",recommended:!1,replacedBy:["no-global-assign"]},deprecated:!0,schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]},create:function(e){function t(t,n,r){var i=t.identifier;t.init!==!1||!t.isWrite()||0!==n&&r[n-1].identifier===i||e.report({node:i,message:"Read-only global '{{name}}' should not be modified.",data:i})}function n(e){e.writeable===!1&&i.indexOf(e.name)===-1&&e.references.forEach(t)}var r=e.options[0],i=r&&r.exceptions||[];return{Program:function(){var t=e.getScope();t.variables.forEach(n)}}}}},{}],212:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow negated conditions",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){function t(e){return e.alternate&&"IfStatement"!==e.alternate.type}function n(e){return"UnaryExpression"===e.type&&"!"===e.operator}function r(e){return"BinaryExpression"===e.type&&("!="===e.operator||"!=="===e.operator)}function i(e){return n(e.test)||r(e.test)}return{IfStatement:function(n){t(n)&&i(n)&&e.report({node:n,message:"Unexpected negated condition."})},ConditionalExpression:function(t){i(t)&&e.report({node:t,message:"Unexpected negated condition."})}}}}},{}],213:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow negating the left operand in `in` expressions",category:"Possible Errors",recommended:!1,replacedBy:["no-unsafe-negation"]},deprecated:!0,schema:[]},create:function(e){return{BinaryExpression:function(t){"in"===t.operator&&"UnaryExpression"===t.left.type&&"!"===t.left.operator&&e.report({node:t,message:"The 'in' expression's left operand is negated."})}}}}},{}],214:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow nested ternary expressions",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){return{ConditionalExpression:function(t){"ConditionalExpression"!==t.alternate.type&&"ConditionalExpression"!==t.consequent.type||e.report({node:t,message:"Do not nest ternary expressions."})}}}}},{}],215:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `new` operators with the `Function` object",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(t){e.report({node:t,message:"The Function constructor is eval."})}return{"NewExpression[callee.name = 'Function']":t,"CallExpression[callee.name = 'Function']":t}}}},{}],216:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `Object` constructors",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){return{NewExpression:function(t){"Object"===t.callee.name&&e.report({node:t,message:"The object literal notation {} is preferrable."})}}}}},{}],217:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `new` operators with calls to `require`",category:"Node.js and CommonJS",recommended:!1},schema:[]},create:function(e){return{NewExpression:function(t){"Identifier"===t.callee.type&&"require"===t.callee.name&&e.report({node:t,message:"Unexpected use of new with require."})}}}}},{}],218:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `new` operators with the `Symbol` object",category:"ECMAScript 6",recommended:!0},schema:[]},create:function(e){return{"Program:exit":function(){var t=e.getScope(),n=t.set.get("Symbol");n&&0===n.defs.length&&n.references.forEach(function(t){var n=t.identifier;n.parent&&"NewExpression"===n.parent.type&&e.report({node:n,message:"`Symbol` cannot be called as a constructor."})})}}}}},{}],219:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `new` operators with the `String`, `Number`, and `Boolean` objects",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{NewExpression:function(t){var n=["String","Number","Boolean","Math","JSON"];n.indexOf(t.callee.name)>-1&&e.report({node:t,message:"Do not use {{fn}} as a constructor.",data:{fn:t.callee.name}})}}}}},{}],220:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `new` operators outside of assignments or comparisons",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{"ExpressionStatement > NewExpression":function(t){e.report({node:t.parent,message:"Do not use 'new' for side effects."})}}}}},{}],221:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow calling global object properties as functions",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){return{CallExpression:function(t){if("Identifier"===t.callee.type){var n=t.callee.name;"Math"!==n&&"JSON"!==n&&"Reflect"!==n||e.report({node:t,message:"'{{name}}' is not a function.",data:{name:n}})}}}}}},{}],222:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow octal escape sequences in string literals",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{Literal:function(t){if("string"==typeof t.value){var n=t.raw.match(/^([^\\]|\\[^0-7])*\\([0-3][0-7]{1,2}|[4-7][0-7]|[0-7])/);if(n){var r=n[2];"0"===n[2]&&"undefined"==typeof n[3]||e.report({node:t,message:"Don't use octal: '\\{{octalDigit}}'. Use '\\u....' instead.",data:{octalDigit:r}})}}}}}}},{}],223:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow octal literals",category:"Best Practices",recommended:!0},schema:[]},create:function(e){return{Literal:function(t){"number"==typeof t.value&&/^0[0-7]/.test(t.raw)&&e.report({node:t,message:"Octal literals should not be used."})}}}}},{}],224:[function(e,t,n){"use strict";var r=/(?:Statement|Declaration|Function(?:Expression)?|Program)$/;t.exports={meta:{docs:{description:"disallow reassigning `function` parameters",category:"Best Practices",recommended:!1},schema:[{oneOf:[{type:"object",properties:{props:{enum:[!1]}},additionalProperties:!1},{type:"object",properties:{props:{enum:[!0]},ignorePropertyModificationsFor:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]}]},create:function(e){function t(e){for(var t=e.identifier,n=t.parent;n&&!r.test(n.type);){ switch(n.type){case"AssignmentExpression":return n.left===t;case"UpdateExpression":return!0;case"UnaryExpression":if("delete"===n.operator)return!0;break;case"CallExpression":if(n.callee!==t)return!1;break;case"MemberExpression":if(n.property===t)return!1;break;case"Property":if(n.key===t)return!1}t=n,n=t.parent}return!1}function n(n,r,i){var o=n.identifier;!o||n.init||0!==r&&i[r-1].identifier===o||(n.isWrite()?e.report({node:o,message:"Assignment to function parameter '{{name}}'.",data:{name:o.name}}):a&&t(n)&&s.indexOf(o.name)===-1&&e.report({node:o,message:"Assignment to property of function parameter '{{name}}'.",data:{name:o.name}}))}function i(e){"Parameter"===e.defs[0].type&&e.references.forEach(n)}function o(t){e.getDeclaredVariables(t).forEach(i)}var a=e.options[0]&&Boolean(e.options[0].props),s=e.options[0]&&e.options[0].ignorePropertyModificationsFor||[];return{"FunctionDeclaration:exit":o,"FunctionExpression:exit":o,"ArrowFunctionExpression:exit":o}}}},{}],225:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow string concatenation with `__dirname` and `__filename`",category:"Node.js and CommonJS",recommended:!1},schema:[]},create:function(e){var t=/^__(?:dir|file)name$/;return{BinaryExpression:function(n){var r=n.left,i=n.right;"+"===n.operator&&("Identifier"===r.type&&t.test(r.name)||"Identifier"===i.type&&t.test(i.name))&&e.report({node:n,message:"Use path.join() or path.resolve() instead of + to create paths."})}}}}},{}],226:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.exports={meta:{docs:{description:"disallow the unary operators `++` and `--`",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{allowForLoopAfterthoughts:{type:"boolean"}},additionalProperties:!1}]},create:function(e){var t=e.options[0],n=!1;return"object"===("undefined"==typeof t?"undefined":r(t))&&(n=t.allowForLoopAfterthoughts===!0),{UpdateExpression:function(t){n&&"ForStatement"===t.parent.type||e.report({node:t,message:"Unary operator '{{operator}}' used.",data:{operator:t.operator}})}}}}},{}],227:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow the use of `process.env`",category:"Node.js and CommonJS",recommended:!1},schema:[]},create:function(e){return{MemberExpression:function(t){var n=t.object.name,r=t.property.name;"process"===n&&!t.computed&&r&&"env"===r&&e.report({node:t,message:"Unexpected use of process.env."})}}}}},{}],228:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow the use of `process.exit()`",category:"Node.js and CommonJS",recommended:!1},schema:[]},create:function(e){return{"CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']":function(t){e.report({node:t.parent,message:"Don't use process.exit(); throw an error instead."})}}}}},{}],229:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow the use of the `__proto__` property",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{MemberExpression:function(t){(t.property&&"Identifier"===t.property.type&&"__proto__"===t.property.name&&!t.computed||"Literal"===t.property.type&&"__proto__"===t.property.value)&&e.report({node:t,message:"The '__proto__' property is deprecated."})}}}}},{}],230:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow calling some `Object.prototype` methods directly on objects",category:"Possible Errors",recommended:!1},schema:[]},create:function(e){function t(t){if("MemberExpression"===t.callee.type&&!t.callee.computed){var r=t.callee.property.name;n.indexOf(r)>-1&&e.report({message:"Do not access Object.prototype method '{{prop}}' from target object.",loc:t.callee.property.loc.start,data:{prop:r},node:t})}}var n=["hasOwnProperty","isPrototypeOf","propertyIsEnumerable"];return{CallExpression:t}}}},{}],231:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow variable redeclaration",category:"Best Practices",recommended:!0},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){t.variables.forEach(function(t){var n=i.builtinGlobals&&"writeable"in t,r=(n?1:0)+t.identifiers.length;if(r>=2){t.identifiers.sort(function(e,t){return e.range[1]-t.range[1]});for(var o=n?0:1,a=t.identifiers.length;o=6?{Program:n,BlockStatement:r,SwitchStatement:r}:{Program:n,FunctionDeclaration:r,FunctionExpression:r,ArrowFunctionExpression:r}}}},{}],232:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow multiple spaces in regular expressions",category:"Possible Errors",recommended:!0},schema:[],fixable:"code"},create:function(e){function t(t,n,r){var i=/( {2,})+?/,o=i.exec(n);if(null!==o){var a=o[0].length;e.report({node:t,message:"Spaces are hard to count. Use {{{count}}}.",data:{count:a},fix:function(e){return e.replaceTextRange([r+o.index,r+o.index+a]," {"+a+"}")}})}}function n(e){var n=a.getFirstToken(e),r=n.type,i=n.value;"RegularExpression"===r&&t(e,i,n.start)}function i(e){return e&&"Literal"===e.type&&"string"==typeof e.value}function o(n){var o=e.getScope(),a=r.getVariableByName(o,"RegExp"),s=a&&a.defs.length>0;"Identifier"===n.callee.type&&"RegExp"===n.callee.name&&i(n.arguments[0])&&!s&&t(n,n.arguments[0].value,n.arguments[0].start+1)}var a=e.getSourceCode();return{Literal:n,CallExpression:o,NewExpression:o}}}},{"../ast-utils":67}],233:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow specified global variables",category:"Variables",recommended:!1},schema:{type:"array",items:{type:"string"},uniqueItems:!0}},create:function(e){function t(t){e.report({node:t.identifier,message:"Unexpected use of '{{name}}'.",data:{name:t.identifier.name}})}function n(e){return r.indexOf(e)>=0}var r=e.options;return 0===r.length?{}:{Program:function(){var r=e.getScope();r.variables.forEach(function(e){!e.defs.length&&n(e.name)&&e.references.forEach(t)}),r.through.forEach(function(e){n(e.identifier.name)&&t(e)})}}}}},{}],234:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("ignore"),o={type:"array",items:{type:"string"},uniqueItems:!0};t.exports={meta:{docs:{description:"disallow specified modules when loaded by `import`",category:"ECMAScript 6",recommended:!1},schema:{anyOf:[o,{type:"array",items:[{type:"object",properties:{paths:o,patterns:o},additionalProperties:!1}],additionalItems:!1}]}},create:function(e){var t=Array.isArray(e.options)?e.options:[],n="object"!==r(t[0]),o=new Set(n?e.options:t[0].paths||[]),a=n?[]:t[0].patterns||[];if(0===o.size&&0===a.length)return{};var s=i().add(a);return{ImportDeclaration:function(t){if(t&&t.source&&t.source.value){var n=t.source.value.trim();o.has(n)&&e.report({node:t,message:"'{{importName}}' import is restricted from being used.",data:{importName:n}}),a.length>0&&s.ignores(n)&&e.report({node:t,message:"'{{importName}}' import is restricted from being used by a pattern.",data:{importName:n}})}}}}}},{ignore:39}],235:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("ignore"),o={type:"array",items:{type:"string"},uniqueItems:!0};t.exports={meta:{docs:{description:"disallow specified modules when loaded by `require`",category:"Node.js and CommonJS",recommended:!1},schema:{anyOf:[o,{type:"array",items:[{type:"object",properties:{paths:o,patterns:o},additionalProperties:!1}],additionalItems:!1}]}},create:function(e){function t(e){return e&&"Literal"===e.type&&"string"==typeof e.value}function n(e){return"Identifier"===e.callee.type&&"require"===e.callee.name}var o=Array.isArray(e.options)?e.options:[],a="object"!==r(o[0]),s=new Set(a?e.options:o[0].paths||[]),u=a?[]:o[0].patterns||[];if(0===s.size&&0===u.length)return{};var c=i().add(u);return{CallExpression:function(r){if(n(r)&&r.arguments.length&&t(r.arguments[0])){var i=r.arguments[0].value.trim();s.has(i)&&e.report({node:r,message:"'{{moduleName}}' module is restricted from being used.",data:{moduleName:i}}),u.length>0&&c.ignores(i)&&e.report({node:r,message:"'{{moduleName}}' module is restricted from being used by a pattern.",data:{moduleName:i}})}}}}}},{ignore:39}],236:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow certain properties on certain objects",category:"Best Practices",recommended:!1},schema:{type:"array",items:{anyOf:[{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["object"]},{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["property"]}]},uniqueItems:!0}},create:function(e){function t(t,n,r){if(null!==r){var i=o.get(n),u=i?i.get(r):a.get(n),c=s.get(r);if(u){var l=u.message?" "+u.message:"";e.report({node:t,message:"'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",data:{objectName:n,propertyName:r,message:l}})}else if(c){var p=c.message?" "+c.message:"";e.report({node:t,message:"'{{propertyName}}' is restricted from being used.{{message}}",data:{propertyName:r,message:p}})}}}function n(e){if("Identifier"===e.right.type){var n=e.right.name;"ObjectPattern"===e.left.type&&e.left.properties.forEach(function(i){t(e.left,n,r.getStaticPropertyName(i))})}}var i=e.options;if(0===i.length)return{};var o=new Map,a=new Map,s=new Map;return i.forEach(function(e){var t=e.object,n=e.property;"undefined"==typeof t?s.set(n,{message:e.message}):"undefined"==typeof n?a.set(t,{message:e.message}):(o.has(t)||o.set(t,new Map),o.get(t).set(n,{message:e.message}))}),{MemberExpression:function(e){t(e,e.object&&e.object.name,r.getStaticPropertyName(e))},VariableDeclarator:function(e){if(e.init&&"Identifier"===e.init.type){var n=e.init.name;"ObjectPattern"===e.id.type&&e.id.properties.forEach(function(i){t(e.id,n,r.getStaticPropertyName(i))})}},AssignmentExpression:n,AssignmentPattern:n}}}},{"../ast-utils":67}],237:[function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.exports={meta:{docs:{description:"disallow specified syntax",category:"Stylistic Issues",recommended:!1},schema:{type:"array",items:[{oneOf:[{type:"string"},{type:"object",properties:{selector:{type:"string"},message:{type:"string"}},required:["selector"],additionalProperties:!1}]}],uniqueItems:!0,minItems:0}},create:function(e){return e.options.reduce(function(t,n){var i="string"==typeof n,o=!i&&Boolean(n.message),a=i?n:n.selector,s=o?n.message:"Using '{{selector}}' is not allowed.";return Object.assign(t,r({},a,function(t){e.report({node:t,message:s,data:o?{}:{selector:a}})}))},{})}}},{}],238:[function(e,t,n){"use strict";var r=e("../ast-utils"),i=/^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/;t.exports={meta:{docs:{description:"disallow assignment operators in `return` statements",category:"Best Practices",recommended:!1},schema:[{enum:["except-parens","always"]}]},create:function(e){var t="except-parens"!==(e.options[0]||"except-parens"),n=e.getSourceCode();return{AssignmentExpression:function(o){if(t||!r.isParenthesised(n,o)){for(var a=o.parent;a&&!i.test(a.type);)o=a,a=a.parent;a&&"ReturnStatement"===a.type?e.report({node:a,message:"Return statement should not contain assignment."}):a&&"ArrowFunctionExpression"===a.type&&a.body===o&&e.report({node:a,message:"Arrow function should not return assignment."})}}}}}},{"../ast-utils":67}],239:[function(e,t,n){"use strict";var r=e("../ast-utils"),i="Redundant use of `await` on a return value.";t.exports={meta:{docs:{description:"disallow unnecessary `return await`",category:"Best Practices",recommended:!1},fixable:null,schema:[]},create:function(e){function t(t){e.report({node:e.getSourceCode().getFirstToken(t),loc:t.loc,message:i})}function n(e){for(var t=e;!r.isFunction(t)&&"Program"!==t.type;){if("TryStatement"===t.parent.type&&(t===t.parent.block||t===t.parent.handler&&t.parent.finalizer))return!0;t=t.parent}return!1}function o(e){return"ArrowFunctionExpression"===e.parent.type||("ReturnStatement"===e.parent.type?!n(e.parent):"ConditionalExpression"!==e.parent.type||e!==e.parent.consequent&&e!==e.parent.alternate?"LogicalExpression"===e.parent.type&&e===e.parent.right?o(e.parent):"SequenceExpression"===e.parent.type&&e===e.parent.expressions[e.parent.expressions.length-1]&&o(e.parent):o(e.parent))}return{AwaitExpression:function(e){o(e)&&!n(e)&&t(e)}}}}},{"../ast-utils":67}],240:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `javascript:` urls",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{Literal:function(t){if(t.value&&"string"==typeof t.value){var n=t.value.toLowerCase();0===n.indexOf("javascript:")&&e.report({node:t,message:"Script URL is a form of eval."})}}}}}},{}],241:[function(e,t,n){"use strict";function r(e,t){if("Identifier"===e.property.type&&e.property.type===t.property.type&&e.property.name===t.property.name&&e.computed===t.computed)return!0;var n=a.getStaticPropertyName(e),r=a.getStaticPropertyName(t);return null!==n&&n===r}function i(e,t){if(!r(e,t))return!1;var n=e.object,o=t.object;return n.type===o.type&&("MemberExpression"===n.type?i(n,o):"Identifier"===n.type&&n.name===o.name)}function o(e,t,n,r){if(e&&t)if("Identifier"===e.type&&"Identifier"===t.type&&e.name===t.name)r(t);else if("ArrayPattern"===e.type&&"ArrayExpression"===t.type)for(var a=Math.min(e.elements.length,t.elements.length),s=0;s=1){for(var c=0,l=t.properties.length-1;l>=0;--l)if("ExperimentalSpreadProperty"===t.properties[l].type){c=l+1;break}for(var p=0;p","<",">=","<="]);r.has(n.operator)&&t(n.left,n.right)&&e.report({node:n,message:"Comparing to itself is potentially pointless."})}}}}},{}],243:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow comma operators",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(e){return e.parent&&a[e.parent.type]&&e===e.parent[a[e.parent.type]]}function n(e){return r.isParenthesised(o,e)}function i(e){var t=o.getTokenBefore(e,1),i=o.getTokenAfter(e,1);return n(e)&&t&&i&&r.isOpeningParenToken(t)&&t.range[1]<=e.range[0]&&r.isClosingParenToken(i)&&i.range[0]>=e.range[1]}var o=e.getSourceCode(),a={DoWhileStatement:"test",IfStatement:"test",SwitchStatement:"discriminant",WhileStatement:"test",WithStatement:"object",ArrowFunctionExpression:"body"};return{SequenceExpression:function(r){if("ForStatement"!==r.parent.type||r!==r.parent.init&&r!==r.parent.update){if(t(r)){if(i(r))return}else if(n(r))return;var a=o.getTokenAfter(r.expressions[0]);e.report({node:r,loc:a.loc.start,message:"Unexpected use of comma operator."})}}}}}},{"../ast-utils":67}],244:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow identifiers from shadowing restricted names",category:"Variables",recommended:!1},schema:[]},create:function(e){function t(t){n.indexOf(t.name)>-1&&e.report({node:t,message:"Shadowing of global property '{{idName}}'.",data:{idName:t.name}})}var n=["undefined","NaN","Infinity","arguments","eval"];return{VariableDeclarator:function(e){t(e.id)},ArrowFunctionExpression:function(e){[].map.call(e.params,t)},FunctionExpression:function(e){e.id&&t(e.id),[].map.call(e.params,t)},FunctionDeclaration:function(e){e.id&&(t(e.id),[].map.call(e.params,t))},CatchClause:function(e){t(e.param)}}}}},{}],245:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow variable declarations from shadowing variables declared in the outer scope",category:"Variables",recommended:!1},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean"},hoist:{enum:["all","functions","never"]},allow:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},create:function(e){function t(e){return u.allow.indexOf(e.name)!==-1}function n(e){var t=e.scope.block;return"ClassDeclaration"===t.type&&t.id===e.identifiers[0]}function i(e,t){var n=t.scope,r=t.defs[0],i=r&&r.parent&&r.parent.range,o=e.scope,a=e.defs[0],s=a&&a.name.range;return i&&s&&i[0]0||u.builtinGlobals&&"writeable"in p)||i(l,p)||"all"!==u.hoist&&a(l,p)||e.report({node:l.identifiers[0],message:"'{{name}}' is already declared in the upper scope.",data:l})}}}var u={builtinGlobals:Boolean(e.options[0]&&e.options[0].builtinGlobals),hoist:e.options[0]&&e.options[0].hoist||"functions",allow:e.options[0]&&e.options[0].allow||[]};return{"Program:exit":function(){for(var t=e.getScope(),n=t.childScopes.slice();n.length;){var r=n.pop();n.push.apply(n,r.childScopes),s(r)}}}}}},{"../ast-utils":67}],246:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow spacing between function identifiers and their applications (deprecated)",category:"Stylistic Issues",recommended:!1,replacedBy:["func-call-spacing"]},deprecated:!0,fixable:"whitespace",schema:[]},create:function(e){function t(t){for(var r=n.getLastToken(t.callee),i=r,o=n.getTokenAfter(r);o&&o.range[1]-1;n&&e.report({node:t,message:"Unexpected comma in middle of array."})}}}}},{}],248:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow synchronous methods",category:"Node.js and CommonJS",recommended:!1},schema:[]},create:function(e){return{"MemberExpression[property.name=/.*Sync$/]":function(t){e.report({node:t,message:"Unexpected sync method: '{{propertyName}}'.",data:{propertyName:t.property.name}})}}}}},{}],249:[function(e,t,n){"use strict";var r=/\t/;t.exports={meta:{docs:{description:"disallow all tabs",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){return{Program:function(t){e.getSourceLines().forEach(function(n,i){var o=r.exec(n);o&&e.report({node:t,loc:{line:i+1,column:o.index+1},message:"Unexpected tab character."})})}}}}},{}],250:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow template literal placeholder syntax in regular strings",category:"Possible Errors",recommended:!1},schema:[]},create:function(e){var t=/\$\{[^}]+\}/;return{Literal:function(n){"string"==typeof n.value&&t.test(n.value)&&e.report({node:n,message:"Unexpected template string expression."})}}}}},{}],251:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow ternary operators",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){return{ConditionalExpression:function(t){e.report({node:t,message:"Ternary operator used."})}}}}},{}],252:[function(e,t,n){"use strict";function r(e){return"FunctionExpression"===e.type&&"MethodDefinition"===e.parent.type&&"constructor"===e.parent.kind}var i=e("../ast-utils");t.exports={meta:{docs:{description:"disallow `this`/`super` before calling `super()` in constructors",category:"ECMAScript 6",recommended:!0},schema:[]},create:function(e){function t(e){return!e.reachable||c[e.id].superCalled}function n(){return Boolean(u&&u.isConstructor&&u.hasExtends)}function o(){return n()&&!u.codePath.currentSegments.every(t)}function a(e){for(var t=u.codePath.currentSegments,n=0;n0&&e.prevSegments.every(t),invalidNodes:[]})},onCodePathSegmentLoop:function(e,r){n()&&u.codePath.traverseSegments({first:r,last:e},function(e,n){var r=c[e.id];r.superCalled?(r.invalidNodes=[],n.skip()):e.prevSegments.length>0&&e.prevSegments.every(t)&&(r.superCalled=!0,r.invalidNodes=[])})},ThisExpression:function(e){o()&&a(e)},Super:function(e){!i.isCallee(e)&&o()&&a(e)},"CallExpression:exit":function(e){"Super"===e.callee.type&&o()&&s()},"Program:exit":function(){c=Object.create(null)}}}}},{"../ast-utils":67}],253:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow throwing literals as exceptions",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{ThrowStatement:function(t){r.couldBeError(t.argument)?"Identifier"===t.argument.type&&"undefined"===t.argument.name&&e.report({node:t,message:"Do not throw undefined."}):e.report({node:t,message:"Expected an object to be thrown."})}}}}},{"../ast-utils":67}],254:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow trailing whitespace at the end of lines",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{type:"object",properties:{skipBlankLines:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t,n,r){e.report({node:t,loc:n,message:"Trailing spaces not allowed.",fix:function(e){return e.removeRange(r)}})}var n=e.getSourceCode(),i="[ \t  -​ ]",o="^"+i+"*$",a=i+"+$",s=e.options[0]||{},u=s.skipBlankLines||!1;return{Program:function(e){for(var i=new RegExp(a),s=new RegExp(o),c=n.lines,l=n.getText().match(r.createGlobalLinebreakMatcher()),p=0,f=[],d=0,h=c.length;d_.parent.range[0]&&b<_.parent.range[1]){p+=v;continue}if(u&&s.test(c[d])){p+=v;continue}f=[x,b],t(e,y,f)}p+=v}}}}}},{"../ast-utils":67}],255:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow initializing variables to `undefined`",category:"Variables",recommended:!1},schema:[],fixable:"code"},create:function(e){var t=e.getSourceCode();return{VariableDeclarator:function(n){var i=t.getText(n.id),o=n.init&&n.init.name,a=e.getScope(),s=r.getVariableByName(a,"undefined"),u=s&&s.defs.length>0;"undefined"!==o||"const"===n.parent.kind||u||e.report({node:n,message:"It's not necessary to initialize '{{name}}' to undefined.",data:{name:i},fix:function(e){return"ArrayPattern"===n.id.type||"ObjectPattern"===n.id.type?null:e.removeRange([n.id.range[1],n.range[1]])}})}}}}},{"../ast-utils":67}],256:[function(e,t,n){"use strict";function r(e){var t=e.parent;return"UnaryExpression"===t.type&&"typeof"===t.operator}t.exports={meta:{docs:{description:"disallow the use of undeclared variables unless mentioned in `/*global */` comments",category:"Variables",recommended:!0},schema:[{type:"object",properties:{typeof:{type:"boolean"}},additionalProperties:!1}]},create:function(e){var t=e.options[0],n=t&&t.typeof===!0||!1;return{"Program:exit":function(){var t=e.getScope();t.through.forEach(function(t){var i=t.identifier;!n&&r(i)||e.report({node:i,message:"'{{name}}' is not defined.",data:i})})}}}}},{}],257:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow the use of `undefined` as an identifier",category:"Variables",recommended:!1},schema:[]},create:function(e){function t(t){e.report({node:t,message:"Unexpected use of undefined."})}function n(e){var n=e.set.get("undefined");if(n){var r=n.references,i=n.defs;r.filter(function(e){return!e.init}).forEach(function(e){return t(e.identifier)}),i.forEach(function(e){return t(e.name)})}}return{"Program:exit":function(){for(var t=e.getScope(),r=[t];r.length;){var i=r.pop();r.push.apply(r,i.childScopes),n(i)}}}}}},{}],258:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow dangling underscores in identifiers",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"}},allowAfterThis:{type:"boolean"},allowAfterSuper:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){return c.some(function(t){return t===e})}function n(e){var t=e.length;return"_"!==e&&("_"===e[0]||"_"===e[t-1])}function r(e){return"__proto__"===e}function i(e){return"_"===e}function o(r){if(r.id){var i=r.id.name;"undefined"!=typeof i&&n(i)&&!t(i)&&e.report({node:r,message:"Unexpected dangling '_' in '{{identifier}}'.",data:{identifier:i}})}}function a(r){var o=r.id.name;"undefined"==typeof o||!n(o)||i(o)||t(o)||e.report({node:r,message:"Unexpected dangling '_' in '{{identifier}}'.",data:{identifier:o}})}function s(i){var o=i.property.name,a="ThisExpression"===i.object.type,s="Super"===i.object.type;"undefined"==typeof o||!n(o)||a&&l||s&&p||r(o)||t(o)||e.report({node:i,message:"Unexpected dangling '_' in '{{identifier}}'.",data:{identifier:o}})}var u=e.options[0]||{},c=u.allow?u.allow:[],l="undefined"!=typeof u.allowAfterThis&&u.allowAfterThis,p="undefined"!=typeof u.allowAfterSuper&&u.allowAfterSuper;return{FunctionDeclaration:o,VariableDeclarator:a,MemberExpression:s}}}},{}],259:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow confusing multiline expressions",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){function t(t,n){var i=u.getTokenAfter(t,r.isNotClosingParenToken),o=u.getTokenBefore(i);i.loc.start.line!==o.loc.end.line&&e.report({node:t,loc:i.loc.start,message:n,data:{char:i.value}})}var n="Unexpected newline between function and ( of function call.",i="Unexpected newline between object and [ of property access.",o="Unexpected newline between template tag and template literal.",a="Unexpected newline between numerator and division operator.",s=/^[gimuy]+$/,u=e.getSourceCode();return{MemberExpression:function(e){e.computed&&t(e.object,i)},TaggedTemplateExpression:function(t){t.tag.loc.end.line!==t.quasi.loc.start.line&&e.report({node:t,loc:t.loc.start,message:o})},CallExpression:function(e){0!==e.arguments.length&&t(e.callee,n)},"BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left":function(e){var n=u.getTokenAfter(e,function(e){return"/"===e.value}),r=u.getTokenAfter(n);"Identifier"===r.type&&s.test(r.value)&&n.range[1]===r.range[0]&&t(e.left,a)}}}}},{"../ast-utils":67}],260:[function(e,t,n){"use strict";function r(e){if(e.init){var t=e.resolved&&e.resolved.defs[0];if(!t||"Variable"!==t.type||"var"!==t.parent.kind)return!1}return e.isWrite()}function i(e){return!e.modified}function o(e){return!(e.modified||e.group)}function a(e,t){var n=e.range,r=t.identifier.range;return n[0]<=r[0]&&r[1]<=n[1]}function s(e){var t=!1,n=new p;return n.traverse(e,{enter:function(e){y.test(e.type)?(t=!0,this.break()):v.test(e.type)&&this.skip()}}),t}function u(e){if(e.init)return null;for(var t=null,n=e.identifier,r=n.parent;r;){if(h.test(r.type)){if(m.test(r.type)&&r.test===n)return{reference:e,group:t,isInLoop:x[r.type].bind(null,r),modified:!1};break}if(g.test(r.type)){if(s(r))break;t=r}n=r,r=r.parent}return null}function c(e){for(var t=e.identifier;t;){if("FunctionDeclaration"===t.type)return t.id?t:null;t=t.parent}return null}function l(e,t){for(var n=void 0,r=void 0,i=0;i0&&l(i,a),i.filter(o).forEach(t)}}var c=null;return{"Program:exit":function(){var t=[e.getScope()];c=new Map;for(var n=void 0;n=t.pop();)d(t,n.childScopes),n.variables.forEach(s);c.forEach(a),c=null}}}}},{"../ast-utils":67,"../util/traverser":354}],261:[function(e,t,n){"use strict";var r=e("../ast-utils"),i=new Set(["==","===","!=","!==",">",">=","<","<=","in","instanceof"]),o={"==":"!=","!=":"==","===":"!==","!==":"==="};t.exports={meta:{docs:{description:"disallow ternary operators when simpler alternatives exist",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{defaultAssignment:{type:"boolean"}},additionalProperties:!1}],fixable:"code"},create:function(e){function t(e){return"Literal"===e.type&&"boolean"==typeof e.value}function n(e){if("BinaryExpression"===e.type&&Object.prototype.hasOwnProperty.call(o,e.operator)){var t=l.getFirstTokenBetween(e.left,e.right,function(t){return t.value===e.operator});return l.getText().slice(e.range[0],t.range[0])+o[e.operator]+l.getText().slice(t.range[1],e.range[1])}return r.getPrecedence(e)=this.startNode.range[0]&&e.range[1]<=this.endNode.range[1]}},{key:"isConsecutive",value:function(e){return this.contains(this.sourceCode.getTokenBefore(e))}},{key:"merge",value:function(e){this.endNode=e}},{key:"reset",value:function(e){this.startNode=this.endNode=e}},{key:"location",get:function(){return{start:this.startNode.loc.start,end:this.endNode.loc.end}}},{key:"isEmpty",get:function(){return!(this.startNode&&this.endNode)}}]),e}();t.exports={meta:{docs:{description:"disallow unreachable code after `return`, `throw`, `continue`, and `break` statements",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){function t(t){var i=null;if(t&&n.currentSegments.every(o)){if(r.isEmpty)return void r.reset(t);if(r.contains(t))return;if(r.isConsecutive(t))return void r.merge(t);i=t}r.isEmpty||e.report({message:"Unreachable code.",loc:r.location,node:r.startNode}),r.reset(i)}var n=null,r=new s(e.getSourceCode());return{onCodePathStart:function(e){n=e},onCodePathEnd:function(){n=n.upper},BlockStatement:t,BreakStatement:t,ClassDeclaration:t,ContinueStatement:t,DebuggerStatement:t,DoWhileStatement:t,EmptyStatement:t,ExpressionStatement:t,ForInStatement:t,ForOfStatement:t,ForStatement:t,IfStatement:t,ImportDeclaration:t,LabeledStatement:t,ReturnStatement:t,SwitchStatement:t,ThrowStatement:t,TryStatement:t,VariableDeclaration:function(e){("var"!==e.kind||e.declarations.some(i))&&t(e)},WhileStatement:t,WithStatement:t,ExportNamedDeclaration:t,ExportDefaultDeclaration:t,ExportAllDeclaration:t,"Program:exit":function(){t()}}}}},{}],263:[function(e,t,n){"use strict";var r=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression)$/,i=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement|SwitchStatement)$/,o=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement)$/;t.exports={meta:{docs:{description:"disallow control flow statements in `finally` blocks",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){function t(e){return"TryStatement"===e.parent.type&&e.parent.finalizer===e}function n(e,n){var a=!1,s=void 0;for(s="BreakStatement"!==e.type||e.label?"ContinueStatement"===e.type?o:r:i;e&&!s.test(e.type);){if(e.parent.label&&n&&e.parent.label.name===n.name&&(a=!0),t(e))return!n||!a;e=e.parent}return!1}function a(t){n(t,t.label)&&e.report({message:"Unsafe usage of {{nodeType}}.",data:{nodeType:t.type},node:t,line:t.loc.line,column:t.loc.column})}return{ReturnStatement:a,ThrowStatement:a,BreakStatement:a,ContinueStatement:a}}}},{}],264:[function(e,t,n){"use strict";function r(e){return"in"===e||"instanceof"===e}function i(e){return"UnaryExpression"===e.type&&"!"===e.operator}var o=e("../ast-utils");t.exports={meta:{docs:{description:"disallow negating the left operand of relational operators",category:"Possible Errors",recommended:!0},schema:[],fixable:"code"},create:function(e){var t=e.getSourceCode();return{BinaryExpression:function(n){r(n.operator)&&i(n.left)&&!o.isParenthesised(t,n.left)&&e.report({node:n,loc:n.left.loc,message:"Unexpected negating the left operand of '{{operator}}' operator.",data:n,fix:function(e){var r=t.getFirstToken(n.left),i=[r.range[1],n.range[1]],o=t.text.slice(i[0],i[1]);return e.replaceTextRange(i,"("+o+")")}})}}}}},{"../ast-utils":67}],265:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow unused expressions",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{allowShortCircuit:{type:"boolean"},allowTernary:{type:"boolean"},allowTaggedTemplates:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value}function n(e,t){for(var n=0;n=0}function o(e){return u&&"ConditionalExpression"===e.type?o(e.consequent)&&o(e.alternate):s&&"LogicalExpression"===e.type?o(e.right):!(!c||"TaggedTemplateExpression"!==e.type)||(/^(?:Assignment|Call|New|Update|Yield|Await)Expression$/.test(e.type)||"UnaryExpression"===e.type&&["delete","void"].indexOf(e.operator)>=0)}var a=e.options[0]||{},s=a.allowShortCircuit||!1,u=a.allowTernary||!1,c=a.allowTaggedTemplates||!1;return{ExpressionStatement:function(t){o(t.expression)||i(t,e.getAncestors())||e.report({node:t,message:"Expected an assignment or function call and instead saw an expression."})}}}}},{}],266:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow unused labels",category:"Best Practices",recommended:!0},schema:[],fixable:"code"},create:function(e){function t(e){o={label:e.label.name,used:!1,upper:o}}function n(t){o.used||e.report({node:t.label,message:"'{{name}}:' is defined but never used.",data:t.label,fix:function(e){return i.getTokenAfter(t.label,{includeComments:!0})===i.getTokenBefore(t.body,{includeComments:!0})?e.removeRange([t.range[0],t.body.range[0]]):null}}),o=o.upper}function r(e){if(e.label)for(var t=e.label.name,n=o;n;){if(n.label===t){n.used=!0;break}n=n.upper}}var i=e.getSourceCode(),o=null;return{LabeledStatement:t,"LabeledStatement:exit":n,BreakStatement:r,ContinueStatement:r}}}},{}],267:[function(e,t,n){"use strict";var r=e("lodash"),i=e("../ast-utils");t.exports={meta:{docs:{description:"disallow unused variables",category:"Variables",recommended:!0},schema:[{oneOf:[{enum:["all","local"]},{type:"object",properties:{vars:{enum:["all","local"]},varsIgnorePattern:{type:"string"},args:{enum:["all","after-used","none"]},ignoreRestSiblings:{type:"boolean"},argsIgnorePattern:{type:"string"},caughtErrors:{enum:["all","none"]},caughtErrorsIgnorePattern:{type:"string"}}}]}]},create:function(e){function t(e){var t=e.defs[0];if(t){var n=t.node;if("VariableDeclarator"===n.type)n=n.parent;else if("Parameter"===t.type)return!1;return 0===n.parent.type.indexOf("Export")}return!1}function n(e){return!!w.ignoreRestSiblings&&e.defs.some(function(e){var t=e.name.parent,n=t.parent;return"Property"===t.type&&"ObjectPattern"===n.type&&_.test(n.properties[n.properties.length-1].type)})}function o(e){return e.isRead()}function a(e,t){for(var n=e.from;n;){if(t.indexOf(n.block)>=0)return!0;n=n.upper}return!1}function s(e,t){return e.range[0]>=t.range[0]&&e.range[1]<=t.range[1]}function u(e,t){var n=e.identifier,r=n.parent,o=r.parent,a=e.from.variableScope,u=e.resolved.scope.variableScope,c=a!==u||i.isInLoop(n);return t&&s(n,t)?t:"AssignmentExpression"!==r.type||"ExpressionStatement"!==o.type||n!==r.left||c?null:r.right}function c(e,t){for(var n=e,r=e.parent;r&&s(r,t);){switch(r.type){case"SequenceExpression":if(r.expressions[r.expressions.length-1]!==n)return!1;break;case"CallExpression":case"NewExpression":return r.callee!==n;case"AssignmentExpression":case"TaggedTemplateExpression":case"YieldExpression":return!0;default:if(S.test(r.type))return!0}n=r,r=r.parent}return!1}function l(e,t){var n=i.getUpperFunction(e);return n&&s(n,t)&&c(n,t)}function p(e,t){var n=e.identifier,r=n.parent,i=r.parent;return e.isRead()&&("AssignmentExpression"===r.type&&"ExpressionStatement"===i.type&&r.left===n||"UpdateExpression"===r.type&&"ExpressionStatement"===i.type||t&&s(n,t)&&!l(n,t))}function f(e){var t=e.identifier.parent;return"VariableDeclarator"===t.type&&(t=t.parent.parent),"ForInStatement"===t.type&&(t="BlockStatement"===t.body.type?t.body.body[0]:t.body,!!t&&"ReturnStatement"===t.type)}function d(e){var t=e.defs.filter(function(e){return"FunctionName"===e.type}).map(function(e){return e.node}),n=t.length>0,r=null;return e.references.some(function(e){if(f(e))return!0;var i=p(e,r);return r=u(e,r),o(e)&&!i&&!(n&&a(e,t))})}function h(t){var n=t.defs[0];if(n.index===n.node.params.length-1)return!0;if(w.argsIgnorePattern){var r=e.getDeclaredVariables(n.node),i=r.slice(r.indexOf(t)+1);if(i.every(function(e){return 0===e.references.length&&w.argsIgnorePattern.test(e.name)}))return!0}return!1}function m(e,r){var o=e.variables,a=e.childScopes,s=void 0,u=void 0;if("TDZ"!==e.type&&("global"!==e.type||"all"===w.vars))for(s=0,u=o.length;s0&&e.report({node:o.identifiers[0],message:o.references.some(function(e){return e.isWrite()})?b:x,data:o})}}}}}},{"../ast-utils":67,lodash:48}],268:[function(e,t,n){"use strict";function r(e){var t=!0,n=!0,r=!0;return"string"==typeof e?t="nofunc"!==e:"object"===("undefined"==typeof e?"undefined":c(e))&&null!==e&&(t=e.functions!==!1,n=e.classes!==!1,r=e.variables!==!1),{functions:t,classes:n,variables:r}}function i(e){return"FunctionName"===e.defs[0].type}function o(e,t){return"ClassName"===e.defs[0].type&&e.scope.variableScope!==t.from.variableScope}function a(e,t){return"Variable"===e.defs[0].type&&e.scope.variableScope!==t.from.variableScope}function s(e,t){return e&&e.range[0]<=t&&t<=e.range[1]}function u(e,t){if(e.scope!==t.from)return!1;for(var n=e.identifiers[0].parent,r=t.identifier.range[1];n;){if("VariableDeclarator"===n.type){if(s(n.init,r))return!0;if(p.test(n.parent.parent.type)&&s(n.parent.parent.right,r))return!0;break}if("AssignmentPattern"===n.type){if(s(n.right,r))return!0}else if(l.test(n.type))break;n=n.parent}return!1}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/,p=/^For(?:In|Of)Statement$/;t.exports={meta:{docs:{description:"disallow the use of variables before they are defined",category:"Variables",recommended:!1},schema:[{oneOf:[{enum:["nofunc"]},{type:"object",properties:{functions:{type:"boolean"},classes:{type:"boolean"},variables:{type:"boolean"}},additionalProperties:!1}]}]},create:function(e){function t(e,t){return i(e)?c.functions:o(e,t)?c.classes:!a(e,t)||c.variables}function n(n){n.references.forEach(function(n){var r=n.resolved;n.init||!r||0===r.identifiers.length||r.identifiers[0].range[1]=6?(l["BlockStatement:exit"]=l["SwitchStatement:exit"]=s,l["ArrowFunctionExpression:exit"]=function(e){"BlockStatement"!==e.body.type&&s()}):l["FunctionExpression:exit"]=l["FunctionDeclaration:exit"]=l["ArrowFunctionExpression:exit"]=s,l}}},{}],269:[function(e,t,n){"use strict";function r(e){return"MemberExpression"===e.callee.type&&"Identifier"===e.callee.property.type&&e.callee.computed===!1&&("call"===e.callee.property.name&&e.arguments.length>=1||"apply"===e.callee.property.name&&2===e.arguments.length&&"ArrayExpression"===e.arguments[1].type)}function i(e,t,n){var r=n.getTokens(e),i=n.getTokens(t);if(r.length!==i.length)return!1;for(var o=0;o=2}function c(e){function t(t){var n=e.range,r=t.identifier.range;return r[0]n[1]}return function(e){return e.references.some(t)}}function l(e){var t=e.range[0],n=e.range[1];return function(e){var r=e.defs[0].name,i=r.range[0],o="AssignmentPattern"===r.parent.type?r.parent.right:null,a=o&&o.range[0],s=o&&o.range[1];return e.references.some(function(e){var r=e.identifier.range[0],u=e.identifier.range[1];return!e.init&&(r=a&&u<=s||r>=t&&u<=n)})}}var p=e("../ast-utils"),f=/^(?:Program|BlockStatement|SwitchStatement|ForStatement|ForInStatement|ForOfStatement)$/;t.exports={meta:{docs:{description:"require `let` or `const` instead of `var`",category:"ECMAScript 6",recommended:!1},schema:[],fixable:"code"},create:function(e){function t(t){if(!t.init)return!1;var n=e.getDeclaredVariables(t);return n.some(l(t.init))}function n(n){var r=e.getDeclaredVariables(n),l=s(n);if("SwitchCase"===n.parent.type||n.declarations.some(t)||r.some(u)||r.some(c(l)))return!1;if(p.isInLoop(n)){if(r.some(i))return!1;if(!o(n)&&!a(n))return!1}return!!(o(n)||"ForStatement"===n.parent.type&&n.parent.init===n||p.STATEMENT_LIST_PARENTS.has(n.parent.type))}function r(t){var r=f.getFirstToken(t);e.report({node:t,message:"Unexpected var, use let or const instead.",fix:function(e){return n(t)?e.replaceText(r,"let"):null}})}var f=e.getSourceCode();return{"VariableDeclaration:exit":function(e){"var"===e.kind&&r(e)}}}}},{"../ast-utils":67}],277:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `void` operators",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{UnaryExpression:function(t){"void"===t.operator&&e.report({node:t,message:"Expected 'undefined' and instead saw 'void'."})}}}}},{}],278:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow specified warning terms in comments",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{terms:{type:"array",items:{type:"string"}},location:{enum:["start","anywhere"]}},additionalProperties:!1}]},create:function(e){function t(e){var t=e.replace(/[-\/\\$^*+?.()|[\]{}]/g,"\\$&"),n=void 0,r=/\w$/.test(e)?"\\b":"";return n="start"===u?"^\\s*":/^\w/.test(e)?"\\b":"",new RegExp(n+t+r,"i")}function n(e){var t=[];return l.forEach(function(n,r){n.test(e)&&t.push(s[r])}),t}function i(t){if(!r.isDirectiveComment(t)||!c.test(t.value)){var i=n(t.value);i.forEach(function(n){e.report({node:t,message:"Unexpected '{{matchedTerm}}' comment.",data:{matchedTerm:n}})})}}var o=e.getSourceCode(),a=e.options[0]||{},s=a.terms||["todo","fixme","xxx"],u=a.location||"start",c=/\bno-warning-comments\b/,l=s.map(t);return{Program:function(){var e=o.getAllComments();e.filter(function(e){return"Shebang"!==e.type}).forEach(i)}}}}},{"../ast-utils":67}],279:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow whitespace before properties",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[]},create:function(e){function t(t,i,o){var a=t.computed?"":".";e.report({node:t,message:"Unexpected whitespace before property {{propName}}.",data:{propName:n.getText(t.property)},fix:function(e){return!t.computed&&r.isDecimalInteger(t.object)?null:e.replaceTextRange([i.range[1],o.range[0]],a)}})}var n=e.getSourceCode();return{MemberExpression:function(e){var i=void 0,o=void 0;r.isTokenOnSameLine(e.object,e.property)&&(e.computed?(i=n.getTokenBefore(e.property,r.isOpeningBracketToken),o=n.getTokenBefore(i)):(i=n.getFirstToken(e.property),o=n.getTokenBefore(i,1)),n.isSpaceBetweenTokens(o,i)&&t(e,o,i))}}}}},{"../ast-utils":67}],280:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `with` statements",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{WithStatement:function(t){e.report({node:t,message:"Unexpected use of 'with' statement."})}}}}},{}],281:[function(e,t,n){"use strict";var r={enum:["beside","below","any"]};t.exports={meta:{docs:{description:"enforce the location of single-line statements",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[r,{properties:{overrides:{properties:{if:r,else:r,while:r,do:r,for:r},additionalProperties:!1}},additionalProperties:!1}]},create:function(e){function t(t){return e.options[1]&&e.options[1].overrides&&e.options[1].overrides[t]||e.options[0]||"beside"}function n(n,i){var o=t(i);if("BlockStatement"!==n.type&&"any"!==o){var a=r.getTokenBefore(n);a.loc.end.line===n.loc.start.line&&"below"===o?e.report({node:n,message:"Expected a linebreak before this statement.",fix:function(e){return e.insertTextBefore(n,"\n")}}):a.loc.end.line!==n.loc.start.line&&"beside"===o&&e.report({node:n,message:"Expected no linebreak before this statement.", fix:function(e){return r.getText().slice(a.range[1],n.range[0]).trim()?null:e.replaceTextRange([a.range[1],n.range[0]]," ")}})}}var r=e.getSourceCode();return{IfStatement:function(e){n(e.consequent,"if"),e.alternate&&"IfStatement"!==e.alternate.type&&n(e.alternate,"else")},WhileStatement:function(e){return n(e.body,"while")},DoWhileStatement:function(e){return n(e.body,"do")},ForStatement:function(e){return n(e.body,"for")},ForInStatement:function(e){return n(e.body,"for")},ForOfStatement:function(e){return n(e.body,"for")}}}}},{}],282:[function(e,t,n){"use strict";function r(e){var t=!1,n=Number.POSITIVE_INFINITY,r=!1;return e?"always"===e?n=0:"never"===e?n=Number.POSITIVE_INFINITY:(t=Boolean(e.multiline),n=e.minProperties||Number.POSITIVE_INFINITY,r=Boolean(e.consistent)):t=!0,{multiline:t,minProperties:n,consistent:r}}function i(e){if(e&&(e.ObjectExpression||e.ObjectPattern))return{ObjectExpression:r(e.ObjectExpression),ObjectPattern:r(e.ObjectPattern)};var t=r(e);return{ObjectExpression:t,ObjectPattern:t}}var o=e("../ast-utils"),a={oneOf:[{enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]};t.exports={meta:{docs:{description:"enforce consistent line breaks inside braces",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{oneOf:[a,{type:"object",properties:{ObjectExpression:a,ObjectPattern:a},additionalProperties:!1,minProperties:1}]}]},create:function(e){function t(t){var i=r[t.type],a=n.getFirstToken(t),s=n.getLastToken(t),u=n.getTokenAfter(a,{includeComments:!0}),c=n.getTokenBefore(s,{includeComments:!0}),l=t.properties.length>=i.minProperties||i.multiline&&t.properties.length>0&&u.loc.start.line!==c.loc.end.line;if(u=n.getTokenAfter(a),c=n.getTokenBefore(s),l)o.isTokenOnSameLine(a,u)&&e.report({message:"Expected a line break after this opening brace.",node:t,loc:a.loc.start,fix:function(e){return e.insertTextAfter(a,"\n")}}),o.isTokenOnSameLine(c,s)&&e.report({message:"Expected a line break before this closing brace.",node:t,loc:s.loc.start,fix:function(e){return e.insertTextBefore(s,"\n")}});else{var p=i.consistent,f=!o.isTokenOnSameLine(a,u),d=!o.isTokenOnSameLine(c,s);(!p&&f||p&&f&&!d)&&e.report({message:"Unexpected line break after this opening brace.",node:t,loc:a.loc.start,fix:function(e){return e.removeRange([a.range[1],u.range[0]])}}),(!p&&d||p&&!f&&d)&&e.report({message:"Unexpected line break before this closing brace.",node:t,loc:s.loc.start,fix:function(e){return e.removeRange([c.range[1],s.range[0]])}})}}var n=e.getSourceCode(),r=i(e.options[0]);return{ObjectExpression:t,ObjectPattern:t}}}},{"../ast-utils":67}],283:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing inside braces",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{arraysInObjects:{type:"boolean"},objectsInObjects:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){return!!e.options[1]&&e.options[1][t]===!f}function n(t,n){e.report({node:t,loc:n.loc.start,message:"There should be no space after '{{token}}'.",data:{token:n.value},fix:function(t){var r=e.getSourceCode().getTokenAfter(n);return t.removeRange([n.range[1],r.range[0]])}})}function i(t,n){e.report({node:t,loc:n.loc.start,message:"There should be no space before '{{token}}'.",data:{token:n.value},fix:function(t){var r=e.getSourceCode().getTokenBefore(n);return t.removeRange([r.range[1],n.range[0]])}})}function o(t,n){e.report({node:t,loc:n.loc.start,message:"A space is required after '{{token}}'.",data:{token:n.value},fix:function(e){return e.insertTextAfter(n," ")}})}function a(t,n){e.report({node:t,loc:n.loc.start,message:"A space is required before '{{token}}'.",data:{token:n.value},fix:function(e){return e.insertTextBefore(n," ")}})}function s(e,t,s,u,c){if(r.isTokenOnSameLine(t,s)){var l=d.isSpaceBetweenTokens(t,s);h.spaced&&!l&&o(e,t),!h.spaced&&l&&n(e,t)}if(r.isTokenOnSameLine(u,c)){var p=h.arraysInObjectsException&&r.isClosingBracketToken(u)||h.objectsInObjectsException&&r.isClosingBraceToken(u),f=p&&d.getNodeByRangeIndex(u.start).type,m=h.arraysInObjectsException&&"ArrayExpression"===f||h.objectsInObjectsException&&("ObjectExpression"===f||"ObjectPattern"===f)?!h.spaced:h.spaced,g=d.isSpaceBetweenTokens(u,c);m&&!g&&a(e,c),!m&&g&&i(e,c)}}function u(e){var t=e.properties[e.properties.length-1];return d.getTokenAfter(t,r.isClosingBraceToken)}function c(e){if(0!==e.properties.length){var t=d.getFirstToken(e),n=u(e),r=d.getTokenAfter(t),i=d.getTokenBefore(n);s(e,t,r,i,n)}}function l(e){if(0!==e.specifiers.length){var t=e.specifiers[0],n=e.specifiers[e.specifiers.length-1];if("ImportSpecifier"===n.type){"ImportSpecifier"!==t.type&&(t=e.specifiers[1]);var i=d.getTokenBefore(t),o=d.getTokenAfter(n,r.isNotCommaToken),a=d.getTokenAfter(i),u=d.getTokenBefore(o);s(e,i,a,u,o)}}}function p(e){if(0!==e.specifiers.length){var t=e.specifiers[0],n=e.specifiers[e.specifiers.length-1],i=d.getTokenBefore(t),o=d.getTokenAfter(n,r.isNotCommaToken),a=d.getTokenAfter(i),u=d.getTokenBefore(o);s(e,i,a,u,o)}}var f="always"===e.options[0],d=e.getSourceCode(),h={spaced:f,arraysInObjectsException:t("arraysInObjects"),objectsInObjectsException:t("objectsInObjects")};return{ObjectPattern:c,ObjectExpression:c,ImportDeclaration:l,ExportNamedDeclaration:p}}}},{"../ast-utils":67}],284:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce placing object properties on separate lines",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{allowMultiplePropertiesPerLine:{type:"boolean"}},additionalProperties:!1}],fixable:"whitespace"},create:function(e){var t=e.options[0]&&Boolean(e.options[0].allowMultiplePropertiesPerLine),n=t?"Object properties must go on a new line if they aren't all on the same line.":"Object properties must go on a new line.",r=e.getSourceCode();return{ObjectExpression:function(i){if(t&&i.properties.length>1){var o=r.getFirstToken(i.properties[0]),a=r.getLastToken(i.properties[i.properties.length-1]);if(o.loc.end.line===a.loc.start.line)return}for(var s=function(t){var o=r.getLastToken(i.properties[t-1]),a=r.getFirstToken(i.properties[t]);o.loc.end.line===a.loc.start.line&&e.report({node:i,loc:a.loc.start,message:n,fix:function(e){var t=r.getTokenBefore(a),n=[t.range[1],a.range[0]];return r.text.slice(n[0],n[1]).trim()?null:e.replaceTextRange(n,"\n")}})},u=1;u0){var o=i.filter(a);if(o.length!==i.length)if(o.length>0)e.report({node:t,message:"Unexpected mix of shorthand and non-shorthand properties."});else if(r){var u=i.every(s);u&&e.report({node:t,message:"Expected shorthand for all properties."})}}}function c(e,t){var n=t.computed?S.getFirstToken(t,i.isOpeningBracketToken):S.getFirstToken(t.key),r=t.computed?S.getFirstTokenBetween(t.key,t.value,i.isClosingBracketToken):S.getLastToken(t.key),o=S.text.slice(n.range[0],r.range[1]),a="";if(t.value.generator?a="*":t.value.async&&(a="async "),"FunctionExpression"===t.value.type){var s=S.getTokens(t.value).find(function(e){return"Keyword"===e.type&&"function"===e.value}),u=t.value.generator?S.getTokenAfter(s):s;return e.replaceTextRange([n.range[0],t.range[1]],a+o+S.text.slice(u.range[1],t.value.range[1]))}var c=S.getTokens(t.value).find(function(e){return"=>"===e.value}),l=S.getTokenBefore(c),p="Punctuator"===l.type&&")"===l.value,f=S.text.slice(S.getFirstToken(t.value,t.value.async?1:0).range[0],l.range[1]),d=p?f:"("+f+")";return e.replaceTextRange([n.range[0],t.range[1]],a+o+d+S.text.slice(c.range[1],t.value.range[1]))}function l(e,t){var n=t.computed?S.getTokens(t).find(function(e){return"["===e.value}):S.getFirstToken(t.key),r=t.computed?S.getTokensBetween(t.key,t.value).find(function(e){return"]"===e.value}):S.getLastToken(t.key),i=S.text.slice(n.range[0],r.range[1]),o="function";return t.value.generator?o="function*":t.value.async&&(o="async function"),e.replaceTextRange([t.range[0],r.range[1]],i+": "+o)}function p(){C.unshift(new Set),e.getScope().variables.filter(function(e){return"arguments"===e.name}).forEach(function(e){e.references.map(function(e){return e.identifier}).forEach(function(e){return D.add(e)})})}function f(){C.shift()}function d(){C[0].forEach(function(e){return T.add(e)})}var h=e.options[0]||r.always,m=h===r.methods||h===r.always,g=h===r.properties||h===r.always,v=h===r.never,y=h===r.consistent,x=h===r.consistentAsNeeded,b=e.options[1]||{},_=b.ignoreConstructors,w=b.avoidQuotes,E=!!b.avoidExplicitReturnArrows,S=e.getSourceCode(),C=[],T=new WeakSet,D=new WeakSet;return{Program:p,FunctionDeclaration:p,FunctionExpression:p,"Program:exit":f,"FunctionDeclaration:exit":f,"FunctionExpression:exit":f,ArrowFunctionExpression:function(e){C[0].add(e)},"ArrowFunctionExpression:exit":function(e){C[0].delete(e)},ThisExpression:d,Super:d,MetaProperty:function(e){"new"===e.meta.name&&"target"===e.property.name&&d()},Identifier:function(e){D.has(e)&&d()},ObjectExpression:function(e){y?u(e,!1):x&&u(e,!0)},"Property:exit":function(n){var r=n.method||n.shorthand;if("ObjectPattern"!==n.parent.type&&"get"!==n.kind&&"set"!==n.kind&&(!n.computed||"FunctionExpression"===n.value.type||"ArrowFunctionExpression"===n.value.type))if(r)if(n.method&&(v||w&&o(n.key))){var i=v?"Expected longform method syntax.":"Expected longform method syntax for string literal keys.";e.report({node:n,message:i,fix:function(e){return l(e,n)}})}else v&&e.report({node:n,message:"Expected longform property syntax.",fix:function(e){return e.insertTextAfter(n.key,": "+n.key.name)}});else if(!m||n.value.id||"FunctionExpression"!==n.value.type&&"ArrowFunctionExpression"!==n.value.type){if("Identifier"===n.value.type&&n.key.name===n.value.name&&g)e.report({node:n,message:"Expected property shorthand.",fix:function(e){return e.replaceText(n,n.value.name)}});else if("Identifier"===n.value.type&&"Literal"===n.key.type&&n.key.value===n.value.name&&g){if(w)return;e.report({node:n,message:"Expected property shorthand.",fix:function(e){return e.replaceText(n,n.value.name)}})}}else{if(_&&"Identifier"===n.key.type&&t(n.key.name))return;if(w&&o(n.key))return;("FunctionExpression"===n.value.type||"ArrowFunctionExpression"===n.value.type&&"BlockStatement"===n.value.body.type&&E&&!T.has(n.value))&&e.report({node:n,message:"Expected method shorthand.",fix:function(e){return c(e,n)}})}}}}}},{"../ast-utils":67}],286:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require or disallow newlines around variable declarations",category:"Stylistic Issues",recommended:!1},schema:[{enum:["always","initializations"]}],fixable:"whitespace"},create:function(e){function t(e){return"ForStatement"===e||"ForInStatement"===e||"ForOfStatement"===e}function n(n){if(!t(n.parent.type)){var o=n.declarations,a=void 0;o.forEach(function(t){a&&a.loc.end.line===t.loc.start.line&&(i||a.init||t.init)&&e.report({node:n,message:r,loc:t.loc.start,fix:function(e){return e.insertTextBefore(t,"\n")}}),a=t})}}var r="Expected variable declaration to be on a new line.",i="always"===e.options[0];return{VariableDeclaration:n}}}},{}],287:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.exports={meta:{docs:{description:"enforce variables to be declared either together or separately in functions",category:"Stylistic Issues",recommended:!1},schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{var:{enum:["always","never"]},let:{enum:["always","never"]},const:{enum:["always","never"]}},additionalProperties:!1},{type:"object",properties:{initialized:{enum:["always","never"]},uninitialized:{enum:["always","never"]}},additionalProperties:!1}]}]},create:function(e){function t(){m.push({let:{initialized:!1,uninitialized:!1},const:{initialized:!1,uninitialized:!1}})}function n(){h.push({initialized:!1,uninitialized:!1}),t()}function i(){m.pop()}function o(){h.pop(),i()}function a(e,t,n){for(var r=0;r0&&r.uninitialized===l&&i.uninitialized)&&(!(n.initialized>0&&r.initialized===l&&i.initialized)&&(a(e,t,i),!0)))}var l="always",p="never",f=e.options[0]||l,d={};"string"==typeof f?(d.var={uninitialized:f,initialized:f},d.let={uninitialized:f,initialized:f},d.const={uninitialized:f,initialized:f}):"object"===("undefined"==typeof f?"undefined":r(f))&&(f.hasOwnProperty("var")&&"string"==typeof f.var&&(d.var={uninitialized:f.var,initialized:f.var}),f.hasOwnProperty("let")&&"string"==typeof f.let&&(d.let={uninitialized:f.let,initialized:f.let}),f.hasOwnProperty("const")&&"string"==typeof f.const&&(d.const={uninitialized:f.const,initialized:f.const}),f.hasOwnProperty("uninitialized")&&(d.var||(d.var={}),d.let||(d.let={}),d.const||(d.const={}),d.var.uninitialized=f.uninitialized,d.let.uninitialized=f.uninitialized,d.const.uninitialized=f.uninitialized),f.hasOwnProperty("initialized")&&(d.var||(d.var={}),d.let||(d.let={}),d.const||(d.const={}),d.var.initialized=f.initialized,d.let.initialized=f.initialized,d.const.initialized=f.initialized));var h=[],m=[];return{Program:n,FunctionDeclaration:n,FunctionExpression:n,ArrowFunctionExpression:n,BlockStatement:t,ForStatement:t,ForInStatement:t,ForOfStatement:t,SwitchStatement:t,VariableDeclaration:function(t){var n=t.parent,r=t.kind;if(d[r]){var i=t.declarations,o=u(i);if(!c(r,i))if(d[r].initialized===l&&d[r].uninitialized===l)e.report({node:t,message:"Combine this with the previous '{{type}}' statement.",data:{type:r}});else if(d[r].initialized===l&&e.report({node:t,message:"Combine this with the previous '{{type}}' statement with initialized variables.",data:{type:r}}),d[r].uninitialized===l){if(t.parent.left===t&&("ForInStatement"===t.parent.type||"ForOfStatement"===t.parent.type))return;e.report({node:t,message:"Combine this with the previous '{{type}}' statement with uninitialized variables.",data:{type:r}})}if("ForStatement"!==n.type||n.init!==t){var a=o.uninitialized+o.initialized;a>1&&(d[r].initialized===p&&d[r].uninitialized===p?e.report({node:t,message:"Split '{{type}}' declarations into multiple statements.",data:{type:r}}):d[r].initialized===p&&o.initialized>0?e.report({node:t,message:"Split initialized '{{type}}' declarations into multiple statements.",data:{type:r}}):d[r].uninitialized===p&&o.uninitialized>0&&e.report({node:t,message:"Split uninitialized '{{type}}' declarations into multiple statements.",data:{type:r}}))}}},"ForStatement:exit":i,"ForOfStatement:exit":i,"ForInStatement:exit":i,"SwitchStatement:exit":i,"BlockStatement:exit":i,"Program:exit":o,"FunctionDeclaration:exit":o,"FunctionExpression:exit":o,"ArrowFunctionExpression:exit":o}}}},{}],288:[function(e,t,n){"use strict";function r(e){return["*","&","^","|"].indexOf(e)>=0}function i(e){return["+","-","/","%","<<",">>",">>>","**"].indexOf(e)>=0}function o(e,t){if(e.type!==t.type)return!1;switch(e.type){case"Identifier":return e.name===t.name;case"Literal":return e.value===t.value;case"MemberExpression":return o(e.object,t.object)&&o(e.property,t.property);default:return!1}}function a(e){return"Identifier"===e.type||"MemberExpression"===e.type&&"Identifier"===e.object.type&&(!e.computed||"Literal"===e.property.type)}var s=e("../ast-utils");t.exports={meta:{docs:{description:"require or disallow assignment operator shorthand where possible",category:"Stylistic Issues",recommended:!1},schema:[{enum:["always","never"]}],fixable:"code"},create:function(e){function t(e){return c.getFirstTokenBetween(e.left,e.right,function(t){return t.value===e.operator})}function n(n){if("="===n.operator&&"BinaryExpression"===n.right.type){var s=n.left,u=n.right,l=u.operator;(r(l)||i(l))&&(o(s,u.left)?e.report({node:n,message:"Assignment can be replaced with operator assignment.",fix:function(e){if(a(s)){var r=t(n),i=t(u),o=c.getText().slice(n.range[0],r.range[0]),l=c.getText().slice(i.range[1],n.right.range[1]);return e.replaceText(n,""+o+u.operator+"="+l)}return null}}):o(s,u.right)&&r(l)&&e.report({node:n,message:"Assignment can be replaced with operator assignment."}))}}function u(n){"="!==n.operator&&e.report({node:n,message:"Unexpected operator assignment shorthand.",fix:function(e){if(a(n.left)){var r=t(n),i=c.getText().slice(n.range[0],r.range[0]),o=n.operator.slice(0,-1),u=void 0;return u=s.getPrecedence(n.right)<=s.getPrecedence({type:"BinaryExpression",operator:o})&&!s.isParenthesised(c,n.right)?c.text.slice(r.range[1],n.right.range[0])+"("+c.getText(n.right)+")":c.text.slice(r.range[1],n.range[1]),e.replaceText(n,i+"= "+i+o+u)}return null}})}var c=e.getSourceCode();return{AssignmentExpression:"never"!==e.options[0]?n:u}}}},{"../ast-utils":67}],289:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent linebreak style for operators",category:"Stylistic Issues",recommended:!1},schema:[{enum:["after","before","none",null]},{type:"object",properties:{overrides:{type:"object",properties:{anyOf:{type:"string",enum:["after","before","none","ignore"]}}}},additionalProperties:!1}],fixable:"code"},create:function(e){function t(e,t){return function(n){var i=c.getTokenBefore(e),o=c.getTokenAfter(e),a=c.text.slice(i.range[1],e.range[0]),s=c.text.slice(e.range[1],o.range[0]),u=!r.isTokenOnSameLine(i,e),l=!r.isTokenOnSameLine(e,o),p=void 0,f=void 0;if(u!==l&&"none"!==t){if(c.getTokenBefore(e,{includeComments:!0})!==i&&c.getTokenAfter(e,{includeComments:!0})!==o)return null;p=s,f=a}else{var d=r.createGlobalLinebreakMatcher();if(p="before"===t||a.trim()?a:a.replace(d,""),f="after"===t||s.trim()?s:s.replace(d,""),p===a&&f===s)return null}return""===f&&"Punctuator"===o.type&&"+-".includes(e.value)&&o.value===e.value&&(f+=" "),n.replaceTextRange([i.range[1],o.range[0]],p+e.value+f)}}function n(n,i){var o=c.getTokenAfter(i,r.isNotClosingParenToken),s=c.getTokenBefore(o),l=c.getTokenAfter(o),p=o.value,f=u[p],d=f||a,h=t(o,d);r.isTokenOnSameLine(s,o)&&r.isTokenOnSameLine(o,l)||("ignore"===f||r.isTokenOnSameLine(s,o)||r.isTokenOnSameLine(o,l)?"before"===d&&r.isTokenOnSameLine(s,o)?e.report({node:n,loc:{line:o.loc.end.line,column:o.loc.end.column},message:"'{{operator}}' should be placed at the beginning of the line.",data:{operator:p},fix:h}):"after"===d&&r.isTokenOnSameLine(o,l)?e.report({node:n,loc:{line:o.loc.end.line,column:o.loc.end.column},message:"'{{operator}}' should be placed at the end of the line.",data:{operator:p},fix:h}):"none"===d&&e.report({node:n,loc:{line:o.loc.end.line,column:o.loc.end.column},message:"There should be no line break before or after '{{operator}}'.",data:{operator:p},fix:h}):e.report({node:n,loc:{line:o.loc.end.line,column:o.loc.end.column},message:"Bad line breaking before and after '{{operator}}'.",data:{operator:p},fix:h}))}function i(e){n(e,e.left)}var o=!e.options[0],a=e.options[0]||"after",s=e.options[1]||{},u=s.overrides?Object.assign({},s.overrides):{};o&&!u["?"]&&(u["?"]="before"),o&&!u[":"]&&(u[":"]="before");var c=e.getSourceCode();return{BinaryExpression:i,LogicalExpression:i,AssignmentExpression:i,VariableDeclarator:function(e){e.init&&n(e,e.id)},ConditionalExpression:function(e){n(e,e.test),n(e,e.consequent)}}}}},{"../ast-utils":67}],290:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require or disallow padding within blocks",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{blocks:{enum:["always","never"]},switches:{enum:["always","never"]},classes:{enum:["always","never"]}},additionalProperties:!1,minProperties:1}]}]},create:function(e){function t(e){return"SwitchStatement"===e.type?d.getTokenBefore(e.cases[0]):d.getFirstToken(e)}function n(e){return"Line"===e.type||"Block"===e.type}function r(e,t){return t.loc.start.line-e.loc.end.line>=2}function i(e){var t=e,r=e;do t=r,r=d.getTokenAfter(r,{includeComments:!0});while(n(r)&&r.loc.start.line===t.loc.end.line);return r}function o(e){var t=e,r=e;do r=t,t=d.getTokenBefore(t,{includeComments:!0});while(n(t)&&t.loc.end.line===r.loc.start.line);return t}function a(e){switch(e.type){case"BlockStatement":return u.blocks;case"SwitchStatement":return u.switches;case"ClassBody":return u.classes;default:throw new Error("unreachable")}}function s(n){var s=t(n),u=i(s),c=d.getTokenBefore(u,{includeComments:!0}),l=d.getLastToken(n),h=o(l),m=d.getTokenAfter(h,{includeComments:!0}),g=r(c,u),v=r(h,m);a(n)?(g||e.report({node:n,loc:{line:c.loc.start.line,column:c.loc.start.column},fix:function(e){return e.insertTextAfter(c,"\n")},message:p}),v||e.report({node:n,loc:{line:m.loc.end.line,column:m.loc.end.column-1},fix:function(e){return e.insertTextBefore(m,"\n")},message:p})):(g&&e.report({node:n,loc:{line:c.loc.start.line,column:c.loc.start.column},fix:function(e){return e.replaceTextRange([c.end,u.start-u.loc.start.column],"\n")},message:f}),v&&e.report({node:n,loc:{line:m.loc.end.line,column:m.loc.end.column-1},message:f,fix:function(e){return e.replaceTextRange([h.end,m.start-m.loc.start.column],"\n")}}))}var u={},c=e.options[0]||"always";if("string"==typeof c){var l="always"===c;u.blocks=l,u.switches=l,u.classes=l}else c.hasOwnProperty("blocks")&&(u.blocks="always"===c.blocks),c.hasOwnProperty("switches")&&(u.switches="always"===c.switches),c.hasOwnProperty("classes")&&(u.classes="always"===c.classes);var p="Block must be padded by blank lines.",f="Block must not be padded by blank lines.",d=e.getSourceCode(),h={};return u.hasOwnProperty("switches")&&(h.SwitchStatement=function(e){0!==e.cases.length&&s(e)}),u.hasOwnProperty("blocks")&&(h.BlockStatement=function(e){0!==e.body.length&&s(e)}),u.hasOwnProperty("classes")&&(h.ClassBody=function(e){0!==e.body.length&&s(e)}),h}}},{}],291:[function(e,t,n){"use strict";function r(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function i(e){return{test:function(t,n){return n.getFirstToken(t).value===e}}}function o(e){return{test:function(t){return t.type===e}}}function a(e){if("ExpressionStatement"===e.type){var t=e.expression;return"UnaryExpression"===t.type&&(t=t.argument),"CallExpression"===t.type&&g.isFunction(t.callee)}return!1}function s(e,t){if("DoWhileStatement"===t.type&&"BlockStatement"===t.body.type)return!0;if(a(t))return!0;var n=e.getLastToken(t,g.isNotSemicolonToken),r=g.isClosingBraceToken(n)?e.getNodeByRangeIndex(n.range[0]):null;return Boolean(r)&&("BlockStatement"===r.type||"SwitchStatement"===r.type)}function u(e,t){return"ExpressionStatement"===e.type&&("Program"===e.parent.type||"BlockStatement"===e.parent.type&&g.isFunction(e.parent.parent))&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&!g.isParenthesised(t,e.expression)}function c(e,t){if(u(e,t)){var n=!0,r=!1,i=void 0;try{for(var o,a=e.parent.body[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(s===e)break;if(!u(s,t))return!1}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return!0}return!1}function l(e,t){var n=e.getLastToken(t),r=e.getTokenBefore(n),i=e.getTokenAfter(n),o=Boolean(r&&i&&r.range[0]>=t.range[0]&&g.isSemicolonToken(n)&&n.loc.start.line!==r.loc.end.line&&n.loc.end.line===i.loc.start.line);return o?r:n}function p(e,t,n){return t+n}function f(){}function d(e,t,n,r){0!==r.length&&e.report({node:n,message:"Unexpected blank line before this statement.",fix:function(t){if(r.length>=2)return null;var n=r[0][0],i=r[0][1],o=n.range[1],a=i.range[0],s=e.getSourceCode().text.slice(o,a).replace(y,p);return t.replaceTextRange([o,a],s)}})}function h(e,t,n,r){r.length>0||e.report({node:n,message:"Expected blank line before this statement.",fix:function(r){var i=e.getSourceCode(),o=l(i,t),a=i.getFirstTokenBetween(o,n,{includeComments:!0,filter:function(e){return!g.isTokenOnSameLine(o,e)||(o=e,!1)}})||n,s=g.isTokenOnSameLine(o,a)?"\n\n":"\n";return r.insertTextAfter(o,s)}})}var m=r(["^(s*?",")s*","(s*;?)$"],["^(\\s*?",")\\s*","(\\s*;?)$"]),g=e("../ast-utils"),v="["+Array.from(g.LINEBREAKS).join("")+"]",y=new RegExp(String.raw(m,v,v)),x=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/,b=/^require\(/,_={any:{verify:f},never:{verify:d},always:{verify:h}},w={"*":{test:function(){return!0}},"block-like":{test:function(e,t){return s(t,e)}},"cjs-export":{test:function(e,t){return"ExpressionStatement"===e.type&&"AssignmentExpression"===e.expression.type&&x.test(t.getText(e.expression.left))}},"cjs-import":{test:function(e,t){return"VariableDeclaration"===e.type&&e.declarations.length>0&&Boolean(e.declarations[0].init)&&b.test(t.getText(e.declarations[0].init))}},directive:{test:c},expression:{test:function(e,t){return"ExpressionStatement"===e.type&&!c(e,t)}},"multiline-block-like":{test:function(e,t){return e.loc.start.line!==e.loc.end.line&&s(t,e)}},block:o("BlockStatement"),empty:o("EmptyStatement"),break:i("break"),case:i("case"),class:i("class"),const:i("const"),continue:i("continue"),debugger:i("debugger"),default:i("default"),do:i("do"),export:i("export"),for:i("for"),function:i("function"),if:i("if"),import:i("import"),let:i("let"),return:i("return"),switch:i("switch"),throw:i("throw"),try:i("try"),var:i("var"),while:i("while"),with:i("with")};t.exports={meta:{docs:{description:"require or disallow padding lines between statements",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:{definitions:{paddingType:{enum:Object.keys(_)},statementType:{anyOf:[{enum:Object.keys(w)},{type:"array",items:{enum:Object.keys(w)},minItems:1,uniqueItems:!0,additionalItems:!1}]}},type:"array",items:{type:"object",properties:{blankLine:{$ref:"#/definitions/paddingType"},prev:{$ref:"#/definitions/statementType"},next:{$ref:"#/definitions/statementType"}},additionalProperties:!1,required:["blankLine","prev","next"]},additionalItems:!1}},create:function(e){function t(){p={upper:p,prevNode:null}}function n(){p=p.upper}function r(e,t){for(;"LabeledStatement"===e.type;)e=e.body;return Array.isArray(t)?t.some(r.bind(null,e)):w[t].test(e,u)}function i(e,t){for(var n=c.length-1;n>=0;--n){var i=c[n],o=r(e,i.prev)&&r(t,i.next);if(o)return _[i.blankLine]}return _.any}function o(e,t){var n=[],r=l(u,e);if(t.loc.start.line-r.loc.end.line>=2)do{var i=u.getTokenAfter(r,{includeComments:!0});i.loc.start.line-r.loc.end.line>=2&&n.push([r,i]),r=i}while(r.range[0]0)){var f=o(e.getScope());if(!(f&&f.references.length>0)){var d=a(t);!d.isCallback||c&&i.this&&!d.isLexicalThis||i.super||i.meta||e.report({node:t,message:"Unexpected function expression.",fix:function(e){if(!d.isLexicalThis&&i.this||s(t.params))return null;var n=t.params.length?p.getTokenBefore(t.params[0]):p.getTokenBefore(t.body,1),r=p.getTokenBefore(t.body),o=t.async?"async ":"",a=p.text.slice(n.range[0],r.range[1]),u=""+o+a+" => "+p.getText(t.body),c=d.isLexicalThis?t.parent.parent:t,l="CallExpression"!==c.parent.type&&"ConditionalExpression"!==c.parent.type,f=l?"("+u+")":u;return e.replaceText(c,f)}})}}}}}}}},{}],293:[function(e,t,n){"use strict";function r(e){return"ForStatement"===e.parent.type&&e.parent.init===e}function i(e){for(var t=e.parent;c.test(t.type);)t=t.parent;return"VariableDeclarator"===t.type||"AssignmentExpression"===t.type&&"ExpressionStatement"===t.parent.type&&l.test(t.parent.parent.type)}function o(e,t){if(e.eslintUsed&&"global"===e.scope.type)return null;for(var n=null,r=!1,o=e.references,a=0;a1&&"Identifier"===n.arguments[0].params[1].type&&e.getDeclaredVariables(n.arguments[0]).find(function(e){return e.name===n.arguments[0].params[1].name}).references.filter(function(e){return e.isRead()}).filter(function(e){return"CallExpression"===e.identifier.parent.type&&e.identifier===e.identifier.parent.callee}).forEach(function(e){return t(e.identifier.parent)})}}}}},{"../ast-utils":67}],297:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require `Reflect` methods where applicable",category:"ECMAScript 6",recommended:!1,replacedBy:[]},deprecated:!0,schema:[{type:"object",properties:{exceptions:{type:"array",items:{enum:["apply","call","delete","defineProperty","getOwnPropertyDescriptor","getPrototypeOf","setPrototypeOf","isExtensible","getOwnPropertyNames","preventExtensions"]},uniqueItems:!0}},additionalProperties:!1}]},create:function(e){function t(t,n,r){e.report({node:t,message:"Avoid using {{existing}}, instead use {{substitute}}.",data:{existing:n,substitute:r}})}var n={apply:"Function.prototype.apply",call:"Function.prototype.call",defineProperty:"Object.defineProperty",getOwnPropertyDescriptor:"Object.getOwnPropertyDescriptor",getPrototypeOf:"Object.getPrototypeOf",setPrototypeOf:"Object.setPrototypeOf",isExtensible:"Object.isExtensible",getOwnPropertyNames:"Object.getOwnPropertyNames",preventExtensions:"Object.preventExtensions"},r={apply:"Reflect.apply",call:"Reflect.apply",defineProperty:"Reflect.defineProperty",getOwnPropertyDescriptor:"Reflect.getOwnPropertyDescriptor",getPrototypeOf:"Reflect.getPrototypeOf",setPrototypeOf:"Reflect.setPrototypeOf",isExtensible:"Reflect.isExtensible",getOwnPropertyNames:"Reflect.getOwnPropertyNames",preventExtensions:"Reflect.preventExtensions"},i=(e.options[0]||{}).exceptions||[];return{CallExpression:function(e){var o=(e.callee.property||{}).name,a="Reflect"===(e.callee.object||{}).name,s=r.hasOwnProperty(o),u=i.indexOf(o)!==-1;!s||a||u||t(e,n[o],r[o])},UnaryExpression:function(e){var n="delete"===e.operator,r="Identifier"===e.argument.type,o=i.indexOf("delete")!==-1;!n||r||o||t(e,"the delete keyword","Reflect.deleteProperty")}}}}},{}],298:[function(e,t,n){"use strict";function r(e){for(var t=e.variables,n=0;n=0}function n(e,t,n){return 1===t.length&&0===t[0].start&&t[0].end===e.length&&(["Identifier","Keyword","Null","Boolean"].indexOf(t[0].type)>=0||"Numeric"===t[0].type&&!n&&String(+t[0].value)===t[0].value)}function o(e){return"Identifier"===e.type?e.name:e.value}function a(e){return"Literal"===e.type&&"string"==typeof e.value?y.getText(e):'"'+("Identifier"===e.type?e.name:e.value)+'"'}function s(i){var s=i.key,u=void 0;if(!(i.method||i.computed||i.shorthand))if("Literal"===s.type&&"string"==typeof s.value){try{u=r.tokenize(s.value)}catch(e){return}if(1!==u.length)return;var c=t(u[0].value);if(c&&p)return;f&&n(s.value,u,d)&&e.report({node:i,message:h,data:{property:s.value},fix:function(e){return e.replaceText(s,o(s))}})}else p&&"Identifier"===s.type&&t(s.name)?e.report({node:i,message:v,data:{property:s.name},fix:function(e){return e.replaceText(s,a(s))}}):d&&"Literal"===s.type&&"number"==typeof s.value&&e.report({node:i,message:g,data:{property:s.value},fix:function(e){return e.replaceText(s,a(s))}})}function u(t){var n=t.key;t.method||t.computed||t.shorthand||"Literal"===n.type&&"string"==typeof n.value||e.report({node:t,message:m,data:{property:n.name||n.value},fix:function(e){return e.replaceText(n,a(n))}})}function c(i,s){var u=[],c=[],l=null,f=!1;i.properties.forEach(function(e){var i=e.key,o=void 0;if(i&&!e.method&&!e.computed&&!e.shorthand)if("Literal"===i.type&&"string"==typeof i.value){if(u.push(e),s){try{o=r.tokenize(i.value)}catch(e){return void(f=!0)}f=f||!n(i.value,o)||p&&t(o[0].value)}}else p&&s&&"Identifier"===i.type&&t(i.name)?(c.push(e),f=!0,l=i.name):c.push(e)}),s&&u.length&&!f?u.forEach(function(t){e.report({node:t,message:"Properties shouldn't be quoted as all quotes are redundant.",fix:function(e){return e.replaceText(t.key,o(t.key))}})}):c.length&&l?c.forEach(function(t){e.report({node:t,message:"Properties should be quoted as '{{property}}' is a reserved word.",data:{property:l},fix:function(e){return e.replaceText(t.key,a(t.key))}})}):u.length&&c.length&&c.forEach(function(t){e.report({node:t,message:"Inconsistently quoted property '{{key}}' found.",data:{key:t.key.name||t.key.value},fix:function(e){return e.replaceText(t.key,a(t.key))}})})}var l=e.options[0],p=e.options[1]&&e.options[1].keywords,f=!e.options[1]||e.options[1].unnecessary!==!1,d=e.options[1]&&e.options[1].numbers,h="Unnecessarily quoted property '{{property}}' found.",m="Unquoted property '{{property}}' found.",g="Unquoted number literal '{{property}}' used as key.",v="Unquoted reserved word '{{property}}' used as key.",y=e.getSourceCode();return{Property:function(e){"always"!==l&&l||u(e),"as-needed"===l&&s(e)},ObjectExpression:function(e){"consistent"===l&&c(e,!1),"consistent-as-needed"===l&&c(e,!0)}}}}},{"../util/keywords":349,espree:"espree"}],302:[function(e,t,n){"use strict";function r(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var i=r(["(^|[^\\])(\\\\)*[","]"],["(^|[^\\\\])(\\\\\\\\)*[","]"]),o=e("../ast-utils"),a={double:{quote:'"',alternateQuote:"'",description:"doublequote"},single:{quote:"'",alternateQuote:'"',description:"singlequote"},backtick:{quote:"`",alternateQuote:'"',description:"backtick"}},s=new RegExp(String.raw(i,Array.from(o.LINEBREAKS).join("")));a.double.convert=a.single.convert=a.backtick.convert=function(e){var t=this.quote,n=e[0];return t===n?e:t+e.slice(1,-1).replace(/\\(\${|\r\n?|\n|.)|["'`]|\${|(\r\n?|\n)/g,function(e,r,i){return r===n||"`"===n&&"${"===r?r:e===t||"`"===t&&"${"===e?"\\"+e:i&&"`"===n?"\\n":e})+t};var u="avoid-escape";t.exports={meta:{docs:{description:"enforce the consistent use of either backticks, double, or single quotes",category:"Stylistic Issues",recommended:!1},fixable:"code",schema:[{enum:["single","double","backtick"]},{anyOf:[{enum:["avoid-escape"]},{type:"object",properties:{avoidEscape:{type:"boolean"},allowTemplateLiterals:{type:"boolean"}},additionalProperties:!1}]}]},create:function(e){function t(e){return"JSXAttribute"===e.parent.type||"JSXElement"===e.parent.type}function n(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value}function r(e){var t=e.parent.parent;if("Program"!==t.type&&("BlockStatement"!==t.type||!o.isFunction(t.parent)))return!1;for(var r=0;r=0),s||e.report({node:n,message:"Strings must use {{description}}.",data:{description:l.description},fix:function(e){return e.replaceText(n,l.convert(n.raw))}}))},TemplateLiteral:function(t){if(!(f||"backtick"===c||"TaggedTemplateExpression"===t.parent.type&&t===t.parent.quasi)){var n=1===t.quasis.length&&!s.test(t.quasis[0].value.raw);n&&e.report({node:t,message:"Strings must use {{description}}.",data:{description:l.description},fix:function(e){return r(t)?null:e.replaceText(t,l.convert(d.getText(t)))}})}}}}}},{"../ast-utils":67}],303:[function(e,t,n){"use strict";function r(e){return e.defs.length>=1}function i(e){return"MemberExpression"===e.type&&!e.computed&&"Identifier"===e.property.type&&"parseInt"===e.property.name}function o(e){return!("Literal"===e.type&&"number"!=typeof e.value||"Identifier"===e.type&&"undefined"===e.name)}function a(e){return"Literal"===e.type&&10===e.value}var s=e("../ast-utils"),u="always",c="as-needed";t.exports={meta:{docs:{description:"enforce the consistent use of the radix argument when using `parseInt()`",category:"Best Practices",recommended:!1},schema:[{enum:["always","as-needed"]}]},create:function(e){function t(t){var r=t.arguments;switch(r.length){case 0:e.report({node:t,message:"Missing parameters."});break;case 1:n===u&&e.report({node:t,message:"Missing radix parameter."});break;default:n===c&&a(r[1])?e.report({node:t,message:"Redundant radix parameter."}):o(r[1])||e.report({node:t,message:"Invalid radix parameter."})}}var n=e.options[0]||u;return{"Program:exit":function(){var n=e.getScope(),o=void 0;o=s.getVariableByName(n,"parseInt"),r(o)||o.references.forEach(function(e){var n=e.identifier;s.isCallee(n)&&t(n.parent)}),o=s.getVariableByName(n,"Number"),r(o)||o.references.forEach(function(e){var n=e.identifier.parent;i(n)&&s.isCallee(n)&&t(n.parent)})}}}}},{"../ast-utils":67}],304:[function(e,t,n){"use strict";function r(e){return e[0].toUpperCase()+e.slice(1)}var i=e("../ast-utils");t.exports={meta:{docs:{description:"disallow async functions which have no `await` expression",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(){a={upper:a,hasAwait:!1}}function n(t){!t.async||a.hasAwait||i.isEmptyFunction(t)||e.report({node:t,loc:i.getFunctionHeadLoc(t,o),message:"{{name}} has no 'await' expression.",data:{name:r(i.getFunctionNameWithKind(t))}}),a=a.upper}var o=e.getSourceCode(),a=null;return{FunctionDeclaration:t,FunctionExpression:t,ArrowFunctionExpression:t,"FunctionDeclaration:exit":n,"FunctionExpression:exit":n,"ArrowFunctionExpression:exit":n,AwaitExpression:function(){a.hasAwait=!0}}}}},{"../ast-utils":67}],305:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require JSDoc comments",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{require:{type:"object",properties:{ClassDeclaration:{type:"boolean"},MethodDefinition:{type:"boolean"},FunctionDeclaration:{type:"boolean"},ArrowFunctionExpression:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]},create:function(e){function t(t){e.report({node:t,message:"Missing JSDoc comment."})}function n(e){if("MethodDefinition"===e.parent.type){var n=i.getJSDocComment(e);n||t(e)}}function r(e){var n=i.getJSDocComment(e);n||t(e)}var i=e.getSourceCode(),o={FunctionDeclaration:!0,MethodDefinition:!1,ClassDeclaration:!1},a=Object.assign(o,e.options[0]&&e.options[0].require||{});return{FunctionDeclaration:function(e){a.FunctionDeclaration&&r(e)},FunctionExpression:function(e){a.MethodDefinition&&n(e)},ClassDeclaration:function(e){a.ClassDeclaration&&r(e)},ArrowFunctionExpression:function(e){a.ArrowFunctionExpression&&"VariableDeclarator"===e.parent.type&&r(e)}}}}},{}],306:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require generator functions to contain `yield`",category:"ECMAScript 6",recommended:!0},schema:[]},create:function(e){function t(e){e.generator&&r.push(0)}function n(t){if(t.generator){var n=r.pop();0===n&&t.body.body.length>0&&e.report({node:t,message:"This generator function does not have 'yield'."})}}var r=[];return{FunctionDeclaration:t,"FunctionDeclaration:exit":n,FunctionExpression:t,"FunctionExpression:exit":n,YieldExpression:function(){r.length>0&&(r[r.length-1]+=1)}}}}},{}],307:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce spacing between rest and spread operators and their expressions",category:"ECMAScript 6",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]}]},create:function(e){function t(t){var i=n.getFirstToken(t),o=n.getTokenAfter(i),a=n.isSpaceBetweenTokens(i,o),s=void 0;switch(t.type){case"SpreadElement":s="spread";break;case"RestElement":s="rest";break;case"ExperimentalSpreadProperty":s="spread property";break;case"ExperimentalRestProperty":s="rest property";break;default:return}r&&!a?e.report({node:t,loc:{line:i.loc.end.line,column:i.loc.end.column},message:"Expected whitespace after {{type}} operator.",data:{type:s},fix:function(e){return e.replaceTextRange([i.range[1],o.range[0]]," ")}}):!r&&a&&e.report({node:t,loc:{line:i.loc.end.line,column:i.loc.end.column},message:"Unexpected whitespace after {{type}} operator.",data:{type:s},fix:function(e){return e.removeRange([i.range[1],o.range[0]])}})}var n=e.getSourceCode(),r="always"===e.options[0];return{SpreadElement:t,RestElement:t,ExperimentalSpreadProperty:t,ExperimentalRestProperty:t}}}},{}],308:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing before and after semicolons",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){var t=p.getTokenBefore(e);return t&&i.isTokenOnSameLine(t,e)&&p.isSpaceBetweenTokens(t,e)}function n(e){var t=p.getTokenAfter(e);return t&&i.isTokenOnSameLine(e,t)&&p.isSpaceBetweenTokens(e,t)}function o(e){var t=p.getTokenAfter(e);return!(t&&i.isTokenOnSameLine(e,t))}function a(e){var t=p.getTokenBefore(e);return!(t&&i.isTokenOnSameLine(e,t))}function s(e){var t=p.getTokenAfter(e);return t&&i.isClosingBraceToken(t)||i.isClosingParenToken(t)}function u(r,u){if(i.isSemicolonToken(r)){var c=r.loc.start;t(r)?f||e.report({node:u,loc:c,message:"Unexpected whitespace before semicolon.",fix:function(e){var t=p.getTokenBefore(r);return e.removeRange([t.range[1],r.range[0]])}}):f&&e.report({node:u,loc:c,message:"Missing whitespace before semicolon.",fix:function(e){return e.insertTextBefore(r," ")}}),a(r)||o(r)||s(r)||(n(r)?d||e.report({node:u,loc:c,message:"Unexpected whitespace after semicolon.",fix:function(e){var t=p.getTokenAfter(r);return e.removeRange([r.range[1],t.range[0]])}}):d&&e.report({node:u,loc:c,message:"Missing whitespace after semicolon.",fix:function(e){return e.insertTextAfter(r," ")}}))}}function c(e){var t=p.getLastToken(e);u(t,e)}var l=e.options[0],p=e.getSourceCode(),f=!1,d=!0;return"object"===("undefined"==typeof l?"undefined":r(l))&&(l.hasOwnProperty("before")&&(f=l.before),l.hasOwnProperty("after")&&(d=l.after)),{VariableDeclaration:c,ExpressionStatement:c,BreakStatement:c,ContinueStatement:c,DebuggerStatement:c,ReturnStatement:c,ThrowStatement:c,ImportDeclaration:c,ExportNamedDeclaration:c,ExportAllDeclaration:c,ExportDefaultDeclaration:c,ForStatement:function(e){e.init&&u(p.getTokenAfter(e.init),e),e.test&&u(p.getTokenAfter(e.test),e)}}}}},{"../ast-utils":67}],309:[function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=e("../ast-utils"),o=":matches("+["BreakStatement","ContinueStatement","DebuggerStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ImportDeclaration","ReturnStatement","ThrowStatement","VariableDeclaration"].join(",")+")";t.exports={meta:{docs:{description:"enforce location of semicolons",category:"Stylistic Issues",recommended:!1},schema:[{enum:["last","first"]}],fixable:"whitespace"},create:function(e){function t(e,t){return null!==s.getFirstTokenBetween(e,t,{includeComments:!0,filter:i.isCommentToken})}function n(n,r){var o=s.getTokenBefore(n),a=s.getTokenAfter(n),u=!o||i.isTokenOnSameLine(o,n),c=!a||i.isTokenOnSameLine(n,a);("last"===r&&!u||"first"===r&&!c)&&e.report({loc:n.loc,message:"Expected this semicolon to be at {{pos}}.",data:{pos:"last"===r?"the end of the previous line":"the beginning of the next line"},fix:function(e){if(o&&a&&t(o,a))return null;var i=o?o.range[1]:n.range[0],s=a?a.range[0]:n.range[1],u="last"===r?";\n":"\n;";return e.replaceTextRange([i,s],u)}})}var a,s=e.getSourceCode(),u=e.options[0]||"last";return a={},r(a,o,function(e){var t=s.getLastToken(e);i.isSemicolonToken(t)&&n(t,u)}),r(a,"ForStatement",function(e){var t=e.init&&s.getTokenAfter(e.init,i.isSemicolonToken),r=e.test&&s.getTokenAfter(e.test,i.isSemicolonToken);t&&n(t,"last"),r&&n(r,"last")}),a}}},{"../ast-utils":67}],310:[function(e,t,n){"use strict";var r=e("../util/fix-tracker"),i=e("../ast-utils");t.exports={meta:{docs:{description:"require or disallow semicolons instead of ASI",category:"Stylistic Issues",recommended:!1},fixable:"code",schema:{anyOf:[{type:"array",items:[{enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always"]},{type:"object",properties:{omitLastInOneLineBlock:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]}},create:function(e){function t(t,n){var i=f.getLastToken(t),o=void 0,a=void 0,s=i.loc;n?(o="Extra semicolon.",s=s.start,a=function(e){return new r(e,f).retainSurroundingTokens(i).remove(i)}):(o="Missing semicolon.",s=s.end,a=function(e){return e.insertTextAfter(i,";")}),e.report({node:t,loc:s,message:o,fix:a})}function n(e){if(!i.isSemicolonToken(e))return!1;var t=f.getTokenAfter(e);if(!t)return!0;var n=e.loc.end.line,r=t.loc.start.line,o=u.test(t.value)&&"++"!==t.value&&"--"!==t.value,a=i.isClosingBraceToken(t)||i.isSemicolonToken(t);return n!==r&&!o||a}function o(e){var t=f.getTokenAfter(e);if(!t||"}"!==t.value)return!1;var n=e.parent;return n&&"BlockStatement"===n.type&&n.loc.start.line===n.loc.end.line}function a(e){var r=f.getLastToken(e);l?n(r)&&t(e,!0):i.isSemicolonToken(r)?p&&o(e)&&t(e,!0):p&&o(e)||t(e)}function s(t){var n=e.getAncestors(),r=n.length-1,i=n[r];"ForStatement"===i.type&&i.init===t||/^For(?:In|Of)Statement/.test(i.type)&&i.left===t||a(t)}var u=/^[-[(\/+`]/,c=e.options[1],l="never"===e.options[0],p=c&&c.omitLastInOneLineBlock===!0,f=e.getSourceCode();return{VariableDeclaration:s,ExpressionStatement:a,ReturnStatement:a,ThrowStatement:a,DoWhileStatement:a,DebuggerStatement:a,BreakStatement:a,ContinueStatement:a,ImportDeclaration:a,ExportAllDeclaration:a,ExportNamedDeclaration:function(e){e.declaration||a(e)},ExportDefaultDeclaration:function(e){/(?:Class|Function)Declaration/.test(e.declaration.type)||a(e)}}}}},{"../ast-utils":67,"../util/fix-tracker":348}],311:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce sorted import declarations within modules",category:"ECMAScript 6",recommended:!1},schema:[{type:"object",properties:{ignoreCase:{type:"boolean"},memberSyntaxSortOrder:{type:"array",items:{enum:["none","all","multiple","single"]},uniqueItems:!0,minItems:4,maxItems:4},ignoreMemberSort:{type:"boolean"}},additionalProperties:!1}],fixable:"code"},create:function(e){function t(e){return 0===e.specifiers.length?"none":"ImportNamespaceSpecifier"===e.specifiers[0].type?"all":1===e.specifiers.length?"single":"multiple"}function n(e){return s.indexOf(t(e))}function r(e){return e.specifiers[0]?e.specifiers[0].local.name:null}var i=e.options[0]||{},o=i.ignoreCase||!1,a=i.ignoreMemberSort||!1,s=i.memberSyntaxSortOrder||["none","all","multiple","single"],u=e.getSourceCode(),c=null;return{ImportDeclaration:function(t){if(c){var i=n(t),l=n(c),p=r(t),f=r(c);o&&(f=f&&f.toLowerCase(),p=p&&p.toLowerCase()),i!==l?ie});m!==-1&&e.report({node:d[m],message:"Member '{{memberName}}' of the import declaration should be sorted alphabetically.",data:{memberName:d[m].local.name},fix:function(e){return d.some(function(e){return u.getCommentsBefore(e).length||u.getCommentsAfter(e).length})?null:e.replaceTextRange([d[0].range[0],d[d.length-1].range[1]],d.slice().sort(function(e,t){var n=h(e),r=h(t);return n>r?1:-1}).reduce(function(e,t,n){var r=n===d.length-1?"":u.getText().slice(d[n].range[1],d[n+1].range[0]);return e+u.getText(t)+r},""))}})}c=t}}}}},{}],312:[function(e,t,n){"use strict";function r(e){return i.getStaticPropertyName(e)||e.key.name||null}var i=e("../ast-utils"),o=e("natural-compare"),a={asc:function(e,t){return e<=t},ascI:function(e,t){return e.toLowerCase()<=t.toLowerCase()},ascN:function(e,t){return o(e,t)<=0},ascIN:function(e,t){return o(e.toLowerCase(),t.toLowerCase())<=0},desc:function(e,t){return a.asc(t,e)},descI:function(e,t){return a.ascI(t,e)},descN:function(e,t){return a.ascN(t,e)},descIN:function(e,t){return a.ascIN(t,e)}};t.exports={meta:{docs:{description:"require object keys to be sorted",category:"Stylistic Issues",recommended:!1},schema:[{enum:["asc","desc"]},{type:"object",properties:{caseSensitive:{type:"boolean"},natural:{type:"boolean"}},additionalProperties:!1}]},create:function(e){var t=e.options[0]||"asc",n=e.options[1],i=(n&&n.caseSensitive)===!1,o=Boolean(n&&n.natural),s=a[t+(i?"I":"")+(o?"N":"")],u=null;return{ObjectExpression:function(){u={upper:u,prevName:null}},"ObjectExpression:exit":function(){u=u.upper},Property:function(n){if("ObjectPattern"!==n.parent.type){var a=u.prevName,c=r(n);u.prevName=c||a,a&&c&&(s(a,c)||e.report({node:n,loc:n.key.loc,message:"Expected object keys to be in {{natual}}{{insensitive}}{{order}}ending order. '{{thisName}}' should be before '{{prevName}}'.",data:{thisName:c,prevName:a,order:t,insensitive:i?"insensitive ":"",natual:o?"natural ":""}}))}}}}}},{"../ast-utils":67,"natural-compare":50}],313:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require variables within the same declaration block to be sorted",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{ignoreCase:{type:"boolean"}},additionalProperties:!1}]},create:function(e){var t=e.options[0]||{},n=t.ignoreCase||!1;return{VariableDeclaration:function(t){var r=t.declarations.filter(function(e){return"Identifier"===e.id.type});r.slice(1).reduce(function(t,r){var i=t.id.name,o=r.id.name;return n&&(i=i.toLowerCase(),o=o.toLowerCase()),o"===e.value||"Keyword"===e.type}function n(n){var r=s.getTokenBefore(n),o=void 0;if(r&&!t(r)&&i.isTokenOnSameLine(r,n)){var a=s.isSpaceBetweenTokens(r,n),p=e.getAncestors().pop();o="FunctionExpression"===p.type||"FunctionDeclaration"===p.type?u:"ClassBody"===n.type?l:c,o?a||e.report({node:n,message:"Missing space before opening brace.",fix:function(e){return e.insertTextBefore(n," ")}}):a&&e.report({node:n,message:"Unexpected space before opening brace.",fix:function(e){return e.removeRange([r.range[1],n.range[0]])}})}}function o(e){var t=e.cases,r=void 0;r=t.length>0?s.getTokenBefore(t[0]):s.getLastToken(e,1),n(r)}var a=e.options[0],s=e.getSourceCode(),u=!0,c=!0,l=!0;return"object"===("undefined"==typeof a?"undefined":r(a))?(u="never"!==a.functions,c="never"!==a.keywords,l="never"!==a.classes):"never"===a&&(u=!1,c=!1,l=!1),{BlockStatement:n,ClassBody:n,SwitchStatement:o}}}},{"../ast-utils":67}],315:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing before `function` definition opening parenthesis",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{anonymous:{enum:["always","never","ignore"]},named:{enum:["always","never","ignore"]},asyncArrow:{enum:["always","never","ignore"]}},additionalProperties:!1}]}]},create:function(e){function t(e){if(e.id)return!0;var t=e.parent;return"MethodDefinition"===t.type||"Property"===t.type&&("get"===t.kind||"set"===t.kind||t.method)}function n(e){if("ArrowFunctionExpression"===e.type){if(e.async&&i.isOpeningParenToken(a.getFirstToken(e,{skip:1})))return u.asyncArrow||s}else{if(t(e))return u.named||s;if(!e.generator)return u.anonymous||s}return"ignore"}function o(t){var r=n(t);if("ignore"!==r){var o=a.getFirstToken(t,i.isOpeningParenToken),s=a.getTokenBefore(o),u=a.isSpaceBetweenTokens(s,o);u&&"never"===r?e.report({node:t,loc:s.loc.end,message:"Unexpected space before function parentheses.",fix:function(e){return e.removeRange([s.range[1],o.range[0]])}}):u||"always"!==r||e.report({node:t,loc:s.loc.end,message:"Missing space before function parentheses.",fix:function(e){return e.insertTextAfter(s," ")}})}}var a=e.getSourceCode(),s="string"==typeof e.options[0]?e.options[0]:"always",u="object"===r(e.options[0])?e.options[0]:{};return{ArrowFunctionExpression:o,FunctionDeclaration:o,FunctionExpression:o}}}},{"../ast-utils":67}],316:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing inside parentheses",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{enum:["{}","[]","()","empty"]},uniqueItems:!0}},additionalProperties:!1}]},create:function(e){function t(){var e=[],t=[];return d.braceException&&(e.push("{"),t.push("}")),d.bracketException&&(e.push("["),t.push("]")),d.parenException&&(e.push("("),t.push(")")),d.empty&&(e.push(")"),t.push("(")),{openers:e,closers:t}}function n(e){return"Punctuator"===e.type&&h.openers.indexOf(e.value)>=0}function i(e){return"Punctuator"===e.type&&h.closers.indexOf(e.value)>=0}function o(e,t){return!m.isSpaceBetweenTokens(e,t)&&(p?!r.isClosingParenToken(t)&&!n(t):n(t))}function a(e,t){return!r.isOpeningParenToken(e)&&(!m.isSpaceBetweenTokens(e,t)&&(p?!i(e):i(e)))}function s(e,t){return"Line"!==t.type&&(!!r.isTokenOnSameLine(e,t)&&(!!m.isSpaceBetweenTokens(e,t)&&(p?n(t):!n(t))))}function u(e,t){return!r.isOpeningParenToken(e)&&(!!r.isTokenOnSameLine(e,t)&&(!!m.isSpaceBetweenTokens(e,t)&&(p?i(e):!i(e))))}var c="There must be a space inside this paren.",l="There should be no spaces inside this paren.",p="always"===e.options[0],f=2===e.options.length?e.options[1].exceptions:[],d={},h=void 0;f.length&&(d.braceException=f.indexOf("{}")!==-1,d.bracketException=f.indexOf("[]")!==-1,d.parenException=f.indexOf("()")!==-1,d.empty=f.indexOf("empty")!==-1);var m=e.getSourceCode();return{Program:function(n){h=t();var i=m.tokensAndComments;i.forEach(function(t,p){var f=i[p-1],d=i[p+1];(r.isOpeningParenToken(t)||r.isClosingParenToken(t))&&("("===t.value&&o(t,d)?e.report({node:n,loc:t.loc.start,message:c,fix:function(e){return e.insertTextAfter(t," ")}}):"("===t.value&&s(t,d)?e.report({node:n,loc:t.loc.start,message:l,fix:function(e){return e.removeRange([t.range[1],d.range[0]])}}):")"===t.value&&a(f,t)?e.report({node:n,loc:t.loc.start,message:c,fix:function(e){return e.insertTextBefore(t," ")}}):")"===t.value&&u(f,t)&&e.report({node:n,loc:t.loc.start,message:l,fix:function(e){return e.removeRange([f.range[1],t.range[0]])}}))})}}}}},{"../ast-utils":67}],317:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require spacing around infix operators",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{type:"object",properties:{int32Hint:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e,t){for(var n=u.getTokensBetween(e,t,1),r=1,i=n.length-1;r=0&&(n[r-1].range[1]>=o.range[0]||o.range[1]>=n[r+1].range[0]))return o}return null}function n(t,n){e.report({node:t,loc:n.loc.start,message:"Infix operators must be spaced.",fix:function(e){var t=u.getTokenBefore(n),r=u.getTokenAfter(n),i="";return n.range[0]-t.range[1]===0&&(i=" "),i+=n.value,r.range[0]-n.range[1]===0&&(i+=" "),e.replaceText(n,i)}})}function r(e){if(!e.left.typeAnnotation){var r=t(e.left,e.right);r&&(a&&"|0"===u.getText(e).substr(-2)||n(e,r))}}function i(e){var r=t(e.test,e.consequent),i=t(e.consequent,e.alternate);r?n(e,r):i&&n(e,i)}function o(e){if(e.init){var r=t(e.id,e.init);r&&n(e,r)}}var a=!!e.options[0]&&e.options[0].int32Hint===!0,s=["*","/","%","+","-","<<",">>",">>>","<","<=",">",">=","in","instanceof","==","!=","===","!==","&","^","|","&&","||","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","^=","|=","?",":",",","**"],u=e.getSourceCode();return{AssignmentExpression:r,AssignmentPattern:r,BinaryExpression:r,LogicalExpression:r,ConditionalExpression:i,VariableDeclarator:o}}}},{}],318:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing before or after unary operators",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{type:"object",properties:{words:{type:"boolean"},nonwords:{type:"boolean"},overrides:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}]},create:function(e){function t(e){return e&&"UnaryExpression"===e.type&&"!"===e.argument.operator&&e.argument&&"UnaryExpression"===e.argument.type&&"!"===e.argument.operator}function n(e){return e.argument&&e.argument.type&&"ObjectExpression"===e.argument.type}function i(e,t){return h.overrides&&h.overrides.hasOwnProperty(t)}function o(e,t){return h.overrides[t]}function a(t,n,r,i){r.range[0]===n.range[1]&&e.report({node:t,message:"Unary word operator '{{word}}' must be followed by whitespace.",data:{word:i},fix:function(e){return e.insertTextAfter(n," ")}})}function s(t,r,i,o){n(t)&&i.range[0]>r.range[1]&&e.report({node:t,message:"Unexpected space after unary word operator '{{word}}'.",data:{word:o},fix:function(e){return e.removeRange([r.range[1],i.range[0]])}})}function u(e,t,n,r){r=r||t.value,i(e,r)?o(e,r)?a(e,t,n,r):s(e,t,n,r):h.words?a(e,t,n,r):s(e,t,n,r)}function c(e){var t=m.getFirstTokens(e,3),n="yield";e.argument&&!e.delegate&&u(e,t[0],t[1],n)}function l(e){var t=m.getFirstTokens(e,3);u(e,t[0],t[1],"await")}function p(n,r,i){if(n.prefix){if(t(n))return;r.range[1]===i.range[0]&&e.report({node:n,message:"Unary operator '{{operator}}' must be followed by whitespace.",data:{operator:r.value},fix:function(e){return e.insertTextAfter(r," ")}})}else r.range[1]===i.range[0]&&e.report({node:n,message:"Space is required before unary expressions '{{token}}'.",data:{token:i.value},fix:function(e){return e.insertTextBefore(i," ")}})}function f(t,n,i){t.prefix?i.range[0]>n.range[1]&&e.report({node:t,message:"Unexpected space after unary operator '{{operator}}'.",data:{operator:n.value},fix:function(e){return r.canTokensBeAdjacent(n,i)?e.removeRange([n.range[1],i.range[0]]):null}}):i.range[0]>n.range[1]&&e.report({node:t,message:"Unexpected space before unary operator '{{operator}}'.",data:{operator:i.value},fix:function(e){return e.removeRange([n.range[1],i.range[0]])}})}function d(e){var t="UpdateExpression"!==e.type||e.prefix?m.getFirstTokens(e,2):m.getLastTokens(e,2),n=t[0],r=t[1];if(("NewExpression"===e.type||e.prefix)&&"Keyword"===n.type)return void u(e,n,r);var a=e.prefix?t[0].value:t[1].value;i(e,a)?o(e,a)?p(e,n,r):f(e,n,r):h.nonwords?p(e,n,r):f(e,n,r)}var h=e.options&&Array.isArray(e.options)&&e.options[0]||{words:!0,nonwords:!1},m=e.getSourceCode();return{UnaryExpression:d,UpdateExpression:d,NewExpression:d,YieldExpression:c,AwaitExpression:l}}}},{"../ast-utils":67}],319:[function(e,t,n){"use strict";function r(e){var t=1===e.length;return e=c.escapeRegExp(e),t?e:"(?:"+e+")"}function i(e){return r(e)+"+"}function o(e){return e=e?e.slice(0):[],e.indexOf("*")===-1&&e.push("*"),e}function a(e){var t="";return 0===e.length?t+="\\s":(t+="(?:\\s|",1===e.length?t+=i(e[0]):(t+="(?:",t+=e.map(i).join("|"),t+=")"),t+="(?:$|["+Array.from(l.LINEBREAKS).join("")+"]))"),t}function s(e,t){var n="^";return 1===e.length?n+=r(e[0]):(n+="(?:",n+=e.map(r).join("|"),n+=")"),n+="?",n+=a(t),new RegExp(n)}function u(e){var t="^("+e.map(r).join("|")+")?[ \t]+";return new RegExp(t)}var c=e("lodash"),l=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing after the `//` or `/*` in a comment",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},line:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}}},additionalProperties:!1},block:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},balanced:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]},create:function(e){function t(t,n,r,i){var o=t.type.toLowerCase(),a="block"===o?"/*":"//";e.report({node:t,fix:function(e){var n=t.range[0],i=n+2;return l?(r&&(i+=r[0].length),e.insertTextAfterRange([n,i]," ")):(i+=r[0].length,e.replaceTextRange([n,i],a+(r[1]?r[1]:"")))},message:n,data:{refChar:i}})}function n(t,n,r){e.report({node:t,fix:function(e){if(l)return e.insertTextAfterRange([t.start,t.end-2]," ");var n=t.end-2,i=n-r[0].length;return e.replaceTextRange([i,n],"")},message:n})}function i(e){var r=e.type.toLowerCase(),i=d[r],o="block"===r?"/*":"//";if(0!==e.value.length){var a=i.beginRegex.exec(e.value),s=i.endRegex.exec(e.value);if(l){if(!a){var u=i.markers.exec(e.value),c=u?o+u[0]:o;i.hasExceptions?t(e,"Expected exception block, space or tab after '{{refChar}}' in comment.",u,c):t(e,"Expected space or tab after '{{refChar}}' in comment.",u,c)}f&&"block"===r&&!s&&n(e,"Expected space or tab before '*/' in comment.")}else a&&(a[1]?t(e,"Unexpected space or tab after marker ({{refChar}}) in comment.",a,a[1]):t(e,"Unexpected space or tab after '{{refChar}}' in comment.",a,o)),f&&"block"===r&&s&&n(e,"Unexpected space or tab before '*/' in comment.",s)}}var c=e.getSourceCode(),l="never"!==e.options[0],p=e.options[1]||{},f=p.block&&p.block.balanced,d=["block","line"].reduce(function(e,t){var n=o(p[t]&&p[t].markers||p.markers),i=p[t]&&p[t].exceptions||p.exceptions||[],c="[ \t]+$";return e[t]={beginRegex:l?s(n,i):u(n),endRegex:f&&l?new RegExp(a(i)+"$"):new RegExp(c),hasExceptions:i.length>0,markers:new RegExp("^("+n.map(r).join("|")+")")},e},{});return{Program:function(){var e=c.getAllComments();e.filter(function(e){return"Shebang"!==e.type}).forEach(i)}}}}},{"../ast-utils":67,lodash:48}],320:[function(e,t,n){"use strict";function r(e){for(var t=[],n=0;n0,u=0===h.length&&0===m.length,l=h.length>0&&h[h.length-1],p=r.length>0;p?(o(t.params)?l?e.report({node:r[0],message:s.unnecessary,fix:n(r[0])}):i&&e.report({node:r[0],message:s.unnecessaryInClasses,fix:n(r[0])}):e.report({node:r[0],message:s.nonSimpleParameterList}),c(r,s.multiple,!0)):u&&(o(t.params)?e.report({node:t,message:s.function}):e.report({node:t,message:s.wrap,data:{name:a.getFunctionNameWithKind(t)}})),h.push(l||p)}function p(){h.pop()}function f(n){var i="BlockStatement"===n.body.type,a=i?r(n.body.body):[];"function"===g?l(n,a):a.length>0&&(o(n.params)?u(a,s[g],t(g)):(e.report({node:a[0],message:s.nonSimpleParameterList}),c(a,s.multiple,!0)))}var d=e.parserOptions.ecmaFeatures||{},h=[],m=[],g=e.options[0]||"safe";d.impliedStrict?g="implied":"safe"===g&&(g=d.globalReturn?"global":"function");var v={Program:function(n){var i=r(n.body);"module"===n.sourceType&&(g="module"),"global"===g?(n.body.length>0&&0===i.length&&e.report({node:n,message:s.global}),c(i,s.multiple,!0)):u(i,s[g],t(g))},FunctionDeclaration:f,FunctionExpression:f,ArrowFunctionExpression:f};return"function"===g&&Object.assign(v,{ClassBody:function(){m.push(!0)},"ClassBody:exit":function(){m.pop()},"FunctionDeclaration:exit":p,"FunctionExpression:exit":p,"ArrowFunctionExpression:exit":p}),v}}},{"../ast-utils":67}],321:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce spacing around colons of switch statements",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}],fixable:"whitespace"},create:function(e){function t(e){return e.test?a.getTokenAfter(e.test,r.isColonToken):a.getFirstToken(e,1)}function n(e,t,n){return r.isClosingBraceToken(t)||!r.isTokenOnSameLine(e,t)||a.isSpaceBetweenTokens(e,t)===n}function i(e,t){return null!==a.getFirstTokenBetween(e,t,{includeComments:!0,filter:r.isCommentToken})}function o(e,t,n,r){return i(t,n)?null:r?e.insertTextAfter(t," "):e.removeRange([t.range[1],n.range[0]])}var a=e.getSourceCode(),s=e.options[0]||{},u=s.before===!0,c=s.after!==!1;return{SwitchCase:function(r){var i=t(r),s=a.getTokenBefore(i),l=a.getTokenAfter(i);n(s,i,u)||e.report({node:r,loc:i.loc,message:"{{verb}} space(s) before this colon.",data:{verb:u?"Expected":"Unexpected"},fix:function(e){return o(e,s,i,u)}}),n(i,l,c)||e.report({node:r,loc:i.loc,message:"{{verb}} space(s) after this colon.",data:{verb:c?"Expected":"Unexpected"},fix:function(e){return o(e,i,l,c)}})}}}}},{"../ast-utils":67}],322:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require symbol descriptions",category:"ECMAScript 6",recommended:!1},schema:[]},create:function(e){function t(t){0===t.arguments.length&&e.report({node:t,message:"Expected Symbol to have a description."})}return{"Program:exit":function(){var n=e.getScope(),i=r.getVariableByName(n,"Symbol");i&&0===i.defs.length&&i.references.forEach(function(e){var n=e.identifier;r.isCallee(n)&&t(n.parent)})}}}}},{"../ast-utils":67}],323:[function(e,t,n){"use strict";var r=e("../ast-utils"),i=/\$\{$/,o=/^\}/;t.exports={meta:{docs:{description:"require or disallow spacing around embedded expressions of template strings",category:"ECMAScript 6",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]}]},create:function(e){function t(t){var n=a.getTokenBefore(t);n&&o.test(t.value)&&r.isTokenOnSameLine(n,t)&&a.isSpaceBetweenTokens(n,t)!==s&&e.report({loc:t.loc.start,message:"{{prefix}} space(s) before '}'.",data:{prefix:u},fix:function(e){return s?e.insertTextBefore(t," "):e.removeRange([n.range[1],t.range[0]])}})}function n(t){var n=a.getTokenAfter(t);n&&i.test(t.value)&&r.isTokenOnSameLine(t,n)&&a.isSpaceBetweenTokens(t,n)!==s&&e.report({loc:{line:t.loc.end.line,column:t.loc.end.column-2},message:"{{prefix}} space(s) after '${'.",data:{prefix:u},fix:function(e){return s?e.insertTextAfter(t," "):e.removeRange([t.range[1],n.range[0]])}})}var a=e.getSourceCode(),s="always"===e.options[0],u=s?"Expected":"Unexpected";return{TemplateElement:function(e){var r=a.getFirstToken(e);t(r),n(r)}}}}},{"../ast-utils":67}],324:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require or disallow spacing between template tags and their literals",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]}]},create:function(e){function t(t){var i=r.getTokenBefore(t.quasi),o=r.getFirstToken(t.quasi),a=r.isSpaceBetweenTokens(i,o);n&&a?e.report({node:t,loc:i.loc.start,message:"Unexpected space between template tag and template literal.",fix:function(e){var n=r.getCommentsBefore(t.quasi);return n.some(function(e){return"Line"===e.type})?null:e.replaceTextRange([i.range[1],o.range[0]],n.reduce(function(e,t){return e+r.getText(t)},""))}}):n||a||e.report({node:t,loc:i.loc.start,message:"Missing space between template tag and template literal.",fix:function(e){return e.insertTextAfter(i," ")}})}var n="always"!==e.options[0],r=e.getSourceCode();return{TaggedTemplateExpression:t}}}},{}],325:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require or disallow Unicode byte order mark (BOM)",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]}]},create:function(e){return{Program:function(t){var n=e.getSourceCode(),r={column:0,line:1},i=e.options[0]||"never";n.hasBOM||"always"!==i?n.hasBOM&&"never"===i&&e.report({node:t,loc:r,message:"Unexpected Unicode BOM (Byte Order Mark).",fix:function(e){return e.removeRange([-1,0])}}):e.report({node:t,loc:r,message:"Expected Unicode BOM (Byte Order Mark).",fix:function(e){return e.insertTextBeforeRange([0,1],"\ufeff")}})}}}}},{}],326:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require calls to `isNaN()` when checking for `NaN`",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){return{BinaryExpression:function(t){!/^(?:[<>]|[!=]=)=?$/.test(t.operator)||"NaN"!==t.left.name&&"NaN"!==t.right.name||e.report({node:t,message:"Use the isNaN function to compare with NaN."})}}}}},{}],327:[function(e,t,n){"use strict";var r=e("doctrine");t.exports={meta:{docs:{description:"enforce valid JSDoc comments",category:"Possible Errors",recommended:!1},schema:[{type:"object",properties:{prefer:{type:"object",additionalProperties:{type:"string"}},preferType:{type:"object",additionalProperties:{type:"string"}},requireReturn:{type:"boolean"},requireParamDescription:{type:"boolean"},requireReturnDescription:{type:"boolean"},matchDescription:{type:"string"},requireReturnType:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){return"ClassExpression"===e.type||"ClassDeclaration"===e.type}function n(e){x.push({returnPresent:"ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type||t(e)})}function i(e){var t=x[x.length-1];t&&null!==e.argument&&(t.returnPresent=!0)}function o(e){return null===e.type||"void"===e.type.name||"UndefinedLiteral"===e.type.type}function a(e){return"UndefinedLiteral"!==e&&"NullLiteral"!==e&&"NullableLiteral"!==e&&"FunctionType"!==e&&"AllLiteral"!==e}function s(e){var t=void 0;e.name?t=e.name:e.expression&&(t=e.expression.name);var n=t&&v[t];return{currentType:t,expectedType:n}}function u(t,n){if(n&&a(n.type)){var r=[],i=[];switch(n.type){case"TypeApplication":i="UnionType"===n.applications[0].type?n.applications[0].elements:n.applications,r.push(s(n));break;case"RecordType":i=n.fields;break;case"UnionType":case"ArrayType":i=n.elements;break;case"FieldType":n.value&&r.push(s(n.value));break;default:r.push(s(n))}i.forEach(u.bind(null,t)),r.forEach(function(n){n.expectedType&&n.expectedType!==n.currentType&&e.report({node:t,message:"Use '{{expectedType}}' instead of '{{currentType}}'.",data:{currentType:n.currentType,expectedType:n.expectedType}})})}}function c(n){var i=f.getJSDocComment(n),a=x.pop(),s=Object.create(null),c=!1,v=!1,b=!1,_=!1,w=!1,E=void 0;if(i){try{E=r.parse(i.value,{strict:!0,unwrap:!0,sloppy:!0})}catch(t){return void(/braces/i.test(t.message)?e.report({node:i,message:"JSDoc type missing brace."}):e.report({node:i,message:"JSDoc syntax error."}))}E.tags.forEach(function(t){switch(t.title.toLowerCase()){case"param":case"arg":case"argument":t.type||e.report({node:i,message:"Missing JSDoc parameter type for '{{name}}'.",data:{name:t.name}}),!t.description&&h&&e.report({node:i,message:"Missing JSDoc parameter description for '{{name}}'.",data:{name:t.name}}),s[t.name]?e.report({node:i,message:"Duplicate JSDoc parameter '{{name}}'.",data:{name:t.name}}):t.name.indexOf(".")===-1&&(s[t.name]=1);break;case"return":case"returns":c=!0,d||a.returnPresent||null!==t.type&&o(t)||w?(g&&!t.type&&e.report({node:i,message:"Missing JSDoc return type."}),o(t)||t.description||!m||e.report({node:i,message:"Missing JSDoc return description."})):e.report({node:i,message:"Unexpected @{{title}} tag; function has no return statement.",data:{title:t.title}});break;case"constructor":case"class":v=!0;break;case"override":case"inheritdoc":_=!0;break;case"abstract":case"virtual":w=!0;break;case"interface":b=!0}p.hasOwnProperty(t.title)&&t.title!==p[t.title]&&e.report({node:i,message:"Use @{{name}} instead.",data:{name:p[t.title]}}),y&&t.type&&u(i,t.type)}),_||c||v||b||"get"===n.parent.kind||"constructor"===n.parent.kind||"set"===n.parent.kind||t(n)||(d||a.returnPresent)&&e.report({node:i,message:"Missing JSDoc @{{returns}} for function.",data:{returns:p.returns||"returns"}});var S=Object.keys(s);if(n.params&&n.params.forEach(function(t,n){"AssignmentPattern"===t.type&&(t=t.left);var r=t.name;"Identifier"===t.type&&(S[n]&&r!==S[n]?e.report({node:i,message:"Expected JSDoc for '{{name}}' but found '{{jsdocName}}'.",data:{name:r,jsdocName:S[n]}}):s[r]||_||e.report({node:i,message:"Missing JSDoc for parameter '{{name}}'.",data:{name:r}}))}),l.matchDescription){var C=new RegExp(l.matchDescription);C.test(E.description)||e.report({node:i,message:"JSDoc description does not satisfy the regex pattern."})}}}var l=e.options[0]||{},p=l.prefer||{},f=e.getSourceCode(),d=l.requireReturn!==!1,h=l.requireParamDescription!==!1,m=l.requireReturnDescription!==!1,g=l.requireReturnType!==!1,v=l.preferType||{},y=0!==Object.keys(v).length,x=[];return{ArrowFunctionExpression:n,FunctionExpression:n,FunctionDeclaration:n,ClassExpression:n,ClassDeclaration:n,"ArrowFunctionExpression:exit":c,"FunctionExpression:exit":c,"FunctionDeclaration:exit":c,"ClassExpression:exit":c,"ClassDeclaration:exit":c,ReturnStatement:i}}}},{doctrine:9}],328:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce comparing `typeof` expressions against valid strings",category:"Possible Errors",recommended:!0},schema:[{type:"object",properties:{requireStringLiterals:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){return"UnaryExpression"===e.type&&"typeof"===e.operator}var n=["symbol","undefined","object","boolean","number","string","function"],r=["==","===","!=","!=="],i=e.options[0]&&e.options[0].requireStringLiterals;return{UnaryExpression:function(o){if(t(o)){var a=e.getAncestors().pop();if("BinaryExpression"===a.type&&r.indexOf(a.operator)!==-1){var s=a.left===o?a.right:a.left;if("Literal"===s.type||"TemplateLiteral"===s.type&&!s.expressions.length){var u="Literal"===s.type?s.value:s.quasis[0].value.cooked;n.indexOf(u)===-1&&e.report({node:s,message:"Invalid typeof comparison value."})}else i&&!t(s)&&e.report({node:s,message:"Typeof comparisons should be to string literals."})}}}}}}},{}],329:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require `var` declarations be placed at the top of their containing scope",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value}function n(e){return"ImportDeclaration"===e.type||"ImportSpecifier"===e.type||"ImportDefaultSpecifier"===e.type||"ImportNamespaceSpecifier"===e.type}function r(e){return"VariableDeclaration"===e.type||"ExportNamedDeclaration"===e.type&&e.declaration&&"VariableDeclaration"===e.declaration.type}function i(e,i){for(var o=i.length,a=0;a|<=|>=)$/.test(e)}function i(e){return/^(==|===)$/.test(e)}function o(e){return["<","<="].indexOf(e)>=0}function a(e){return"UnaryExpression"===e.type&&"-"===e.operator&&e.prefix&&"Literal"===e.argument.type&&"number"==typeof e.argument.value}function s(e,t){return"Literal"===e.type?e:a(e)?{type:"Literal",value:-e.argument.value,raw:"-"+e.argument.value}:t?{type:"Literal",value:t,raw:String(t)}:null}function u(e,t){if(e.type!==t.type)return!1;switch(e.type){case"Identifier":return e.name===t.name;case"Literal":return e.value===t.value;case"MemberExpression":var n=c.getStaticPropertyName(e);return n?u(e.object,t.object)&&n===c.getStaticPropertyName(t):e.computed===t.computed&&u(e.object,t.object)&&u(e.property,t.property);case"ThisExpression":return!0;default:return!1}}var c=e("../ast-utils");t.exports={meta:{docs:{description:'require or disallow "Yoda" conditions',category:"Best Practices",recommended:!1},schema:[{enum:["always","never"]},{type:"object",properties:{exceptRange:{type:"boolean"},onlyEquality:{type:"boolean"}},additionalProperties:!1}],fixable:"code"},create:function(e){function t(e){function t(){var t=void 0,n=void 0;return"&&"===e.operator&&(t=s(i.left))&&(n=s(a.right,Number.POSITIVE_INFINITY))&&t.value<=n.value&&u(i.right,a.left)}function n(){var t=void 0,n=void 0;return"||"===e.operator&&(t=s(i.right,Number.NEGATIVE_INFINITY))&&(n=s(a.left))&&t.value<=n.value&&u(i.left,a.right)}function r(){return c.isParenthesised(d,e)}var i=e.left,a=e.right;return"LogicalExpression"===e.type&&"BinaryExpression"===i.type&&"BinaryExpression"===a.type&&o(i.operator)&&o(a.operator)&&(t()||n())&&r()}function n(e){var t=d.getFirstTokenBetween(e.left,e.right,function(t){return t.value===e.operator; }),n=d.getText().slice(d.getTokenBefore(t).range[1],t.range[0]),r=d.getText().slice(t.range[1],d.getTokenAfter(t).range[0]),i=d.getText().slice(e.range[0],d.getTokenBefore(t).range[1]),o=d.getText().slice(d.getTokenAfter(t).range[0],e.range[1]);return o+n+h[t.value]+r+i}var l="always"===e.options[0],p=e.options[1]&&e.options[1].exceptRange,f=e.options[1]&&e.options[1].onlyEquality,d=e.getSourceCode(),h={"===":"===","!==":"!==","==":"==","!=":"!=","<":">",">":"<","<=":">=",">=":"<="};return{BinaryExpression:function(o){var s=l?o.left:o.right,u=l?o.right:o.left;"Literal"!==u.type&&!a(u)||"Literal"===s.type||a(s)||!i(o.operator)&&f||!r(o.operator)||p&&t(e.getAncestors().pop())||e.report({node:o,message:"Expected literal to be on the {{expectedSide}} side of {{operator}}.",data:{operator:o.operator,expectedSide:l?"left":"right"},fix:function(e){return e.replaceText(o,n(o))}})}}}}},{"../ast-utils":67}],334:[function(e,t,n){(function(e){"use strict";function n(e,t,n){return e+new Array(t-e.length+1).join(n||" ")}function r(e,t,n){return new Array(t-e.length+1).join(n||" ")+e}function i(e){var t=0,n=Object.keys(e).map(function(n){var r=e[n];return t+=r,[n,r]}).sort(function(e,t){return t[1]-e[1]}).slice(0,10);n.forEach(function(e){e.push((100*e[1]/t).toFixed(1)+"%"),e[1]=e[1].toFixed(3)}),n.unshift(a);var r=[];n.forEach(function(e){for(var t=e.length,n=0;nr[n])&&(r[n]=i)}});var i=n.map(function(e){return e.map(function(e,t){return s[t](e,r[t])}).join(" | ")});i.splice(1,0,r.map(function(e,t){return 0!==t&&t!==r.length-1&&e++,s[t](":",e+1,"-")}).join("|")),console.log(i.join("\n"))}var o=!!e.env.TIMING,a=["Rule","Time (ms)","Relative"],s=[n,r,r];t.exports=function(){function t(t,r){return"undefined"==typeof n[t]&&(n[t]=0),function(){var i=e.hrtime();r.apply(null,Array.prototype.slice.call(arguments)),i=e.hrtime(i),n[t]+=1e3*i[0]+i[1]/1e6}}var n=Object.create(null);return o&&e.on("exit",function(){i(n)}),{time:t,enabled:o}}()}).call(this,e("_process"))},{_process:58}],335:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n=0?this.tokens[this.tokenIndex]:null,t=this.commentIndex>=0?this.comments[this.commentIndex]:null;return e&&(!t||e.range[1]>t.range[1])?(this.current=e,this.tokenIndex-=1):t?(this.current=t,this.commentIndex-=1):this.current=null,Boolean(this.current)&&(this.border===-1||this.current.range[0]>=this.border)}}]),t}(s)},{"./cursor":337,"./utils":347}],336:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n=this.indexEnd&&(this.current=this.tokens[this.index],this.index-=1,!0)}},{key:"getOneToken",value:function(){return this.index>=this.indexEnd?this.tokens[this.index]:null}}]),t}(s)},{"./cursor":337,"./utils":347}],337:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n=1&&(f=new p(f,u)),c>=0&&(f=new l(f,c)),f}}]),e}();n.forward=new f(c,u),n.backward=new f(a,o)},{"./backward-token-comment-cursor":335,"./backward-token-cursor":336,"./filter-cursor":340,"./forward-token-comment-cursor":341,"./forward-token-cursor":342,"./limit-cursor":344,"./skip-cursor":346}],339:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n=0,"options.skip should be zero or a positive integer."),l(!c||"function"==typeof c,"options.filter should be a function."),e.createCursor(t,n,r,i,o,s,c,u,-1)}function a(e,t,n,r,i,o,a){var s=!1,u=0,c=!1,p=null;return"number"==typeof a?(u=0|a,c=!0):"function"==typeof a?p=a:a&&(s=!!a.includeComments,u=0|a.count,c="number"==typeof a.count,p=a.filter||null),l(u>=0,"options.count should be zero or a positive integer."),l(!p||"function"==typeof p,"options.filter should be a function."),e.createCursor(t,n,r,i,o,s,p,0,c?u:-1)}function s(e,t,n,r,i,o,s){return"undefined"==typeof o&&"undefined"==typeof s?new f(e,t,n,r,i):"number"==typeof o||"undefined"==typeof o?new d(e,t,n,r,i,0|o,0|s):a(p.forward,e,t,n,r,i,o)}function u(e){for(var t=[],n=e.getOneToken();n&&h.isCommentToken(n);)t.push(n),n=e.getOneToken();return t}var c=function(){function e(e,t){for(var n=0;n0&&(this.count-=1,s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveNext",this).call(this))}}]),t}(u)},{"./decorative-cursor":339}],345:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=e("./forward-token-cursor");t.exports=function(e){function t(e,n,o,a,s,u,c){r(this,t);var l=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,o,a,s));return l.index=Math.max(0,l.index-u),l.indexEnd=Math.min(e.length-1,l.indexEnd+c),l}return o(t,e),t}(a)},{"./forward-token-cursor":342}],346:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n0;)if(this.count-=1,!s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveNext",this).call(this))return!1;return s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveNext",this).call(this)}}]),t}(u)},{"./decorative-cursor":339}],347:[function(e,t,n){"use strict";function r(e){return e.range[0]}var i=e("lodash");n.search=function(e,t){return i.sortedIndexBy(e,{range:[t]},r)},n.getFirstIndex=function(e,t,n){if(n in t)return t[n];if(n-1 in t){var r=t[n-1],i=r>=0&&r=n?r:r+1}return 0},n.getLastIndex=function(e,t,n){if(n in t)return t[n]-1;if(n-1 in t){var r=t[n-1],i=r>=0&&rn?r-1:r}return e.length-1}},{lodash:48}],348:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n=n.length||o=0;n--)if("Block"===e[n].type&&"*"===e[n].value.charAt(0)){if(t-e[n].loc.end.line<=1)return e[n];break}return null}function u(e){return"ExportDefaultDeclaration"===e.type||"ExportNamedDeclaration"===e.type||"ExportAllDeclaration"===e.type||"ExportSpecifier"===e.type}function c(e,t){for(var n=[],r=0,i=0;r=t.length||re.parent.end);)t.trailing.push(n),n=this.getTokenAfter(n,{includeComments:!0})}return this._commentCache.set(e,t),t}},{key:"getJSDocComment",value:function(e){var t=e.parent,n=this.getCommentsBefore(e);switch(e.type){case"ClassDeclaration":case"FunctionDeclaration":return u(t)?s(this.getCommentsBefore(t),t.loc.start.line):s(n,e.loc.start.line);case"ClassExpression":return s(this.getCommentsBefore(t.parent),t.parent.loc.start.line);case"ArrowFunctionExpression":case"FunctionExpression":if("CallExpression"!==t.type&&"NewExpression"!==t.type){for(var r=this.getCommentsBefore(t);!r.length&&!/Function/.test(t.type)&&"MethodDefinition"!==t.type&&"Property"!==t.type&&(t=t.parent);)r=this.getCommentsBefore(t);return t&&"FunctionDeclaration"!==t.type&&"Program"!==t.type?s(r,t.loc.start.line):null}if(n.length)return s(n,e.loc.start.line);default:return null}}},{key:"getNodeByRangeIndex",value:function(e){var t=null,n=null,r=new d;return r.traverse(this.ast,{enter:function(r,i){r.range[0]<=e&&ethis.text.length)throw new RangeError("Index out of range (requested index "+e+", but source text has length "+this.text.length+").");if(e===this.text.length)return{line:this.lines.length,column:this.lines[this.lines.length-1].length};var t=m.sortedLastIndex(this.lineStartIndices,e);return{line:t,column:e-this.lineStartIndices[t-1]}}},{key:"getIndexFromLoc",value:function(e){if("object"!==("undefined"==typeof e?"undefined":l(e))||"number"!=typeof e.line||"number"!=typeof e.column)throw new TypeError("Expected `loc` to be an object with numeric `line` and `column` properties.");if(e.line<=0)throw new RangeError("Line number out of range (line "+e.line+" requested). Line numbers should be 1-based.");if(e.line>this.lineStartIndices.length)throw new RangeError("Line number out of range (line "+e.line+" requested, but only "+this.lineStartIndices.length+" lines present).");var t=this.lineStartIndices[e.line-1],n=e.line===this.lineStartIndices.length?this.text.length:this.lineStartIndices[e.line],r=t+e.column;if(e.line===this.lineStartIndices.length&&r>n||e.line=n)throw new RangeError("Column number out of range (column "+e.column+" requested, but the length of line "+e.line+" is "+(n-t)+").");return r}}],[{key:"splitLines",value:function(e){return e.split(h.createGlobalLinebreakMatcher())}}]),t}(f);t.exports=g},{"../ast-utils":67,"../token-store":343,"./traverser":354,lodash:48}],354:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n=0;s--)if(u[s]!==c[s])return!1;for(s=u.length-1;s>=0;s--)if(a=u[s],!d(e[a],t[a],n,r))return!1;return!0}function g(e,t,n){d(e,t,!0)&&p(e,t,n,"notDeepStrictEqual",g)}function v(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&t.call({},e)===!0}function y(e){var t;try{e()}catch(e){t=e}return t}function x(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=y(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&p(i,n,"Missing expected exception"+r);var o="string"==typeof r,a=!e&&_.isError(i),s=!e&&i&&!n;if((a&&o&&v(i,n)||s)&&p(i,n,"Got unwanted exception"+r),e&&i&&n&&!v(i,n)||!e&&i)throw i}var b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_=e("util/"),w=Object.prototype.hasOwnProperty,E=Array.prototype.slice,S=function(){return"foo"===function(){}.name}(),C=t.exports=f,T=/\s*function\s+([^\(\s]*)\s*/;C.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=l(this),this.generatedMessage=!0);var t=e.stackStartFunction||p;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=s(t),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},_.inherits(C.AssertionError,Error),C.fail=p,C.ok=f,C.equal=function(e,t,n){e!=t&&p(e,t,n,"==",C.equal)},C.notEqual=function(e,t,n){e==t&&p(e,t,n,"!=",C.notEqual)},C.deepEqual=function(e,t,n){d(e,t,!1)||p(e,t,n,"deepEqual",C.deepEqual)},C.deepStrictEqual=function(e,t,n){d(e,t,!0)||p(e,t,n,"deepStrictEqual",C.deepStrictEqual)},C.notDeepEqual=function(e,t,n){d(e,t,!1)&&p(e,t,n,"notDeepEqual",C.notDeepEqual)},C.notDeepStrictEqual=g,C.strictEqual=function(e,t,n){e!==t&&p(e,t,n,"===",C.strictEqual)},C.notStrictEqual=function(e,t,n){e===t&&p(e,t,n,"!==",C.notStrictEqual)},C.throws=function(e,t,n){x(!0,e,t,n)},C.doesNotThrow=function(e,t,n){x(!1,e,t,n)},C.ifError=function(e){if(e)throw e};var D=Object.keys||function(e){var t=[];for(var n in e)w.call(e,n)&&t.push(n);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":21}],2:[function(e,t,n){"use strict";!function(){function t(e,t,n){return e.slice(t,n)}function r(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function i(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}function o(e){return"param"===e||"argument"===e||"arg"===e}function a(e){return"return"===e||"returns"===e}function s(e){return"property"===e||"prop"===e}function u(e){return o(e)||s(e)||"alias"===e||"this"===e||"mixes"===e||"requires"===e}function c(e){return u(e)||"const"===e||"constant"===e}function l(e){return s(e)||o(e)}function p(e){return s(e)||o(e)}function f(e){return o(e)||a(e)||"define"===e||"enum"===e||"implements"===e||"this"===e||"type"===e||"typedef"===e||s(e)}function d(e){return f(e)||"throws"===e||"const"===e||"constant"===e||"namespace"===e||"member"===e||"var"===e||"module"===e||"constructor"===e||"class"===e||"extends"===e||"augments"===e||"public"===e||"private"===e||"protected"===e}function h(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")}function m(e){var t,n,r,i,o,a=0,s=1,u=2;for(e=e.replace(/^\/\*\*?/,"").replace(/\*\/$/,""),t=0,n=e.length,r=a,i="";t=e)return null;if(t&&91===N.charCodeAt(I)&&(i=!0,a=n()),!b.code.isIdentifierStartES5(N.charCodeAt(I)))return null;if(a+=w(e),r)for(58!==N.charCodeAt(I)||"module"!==a&&"external"!==a&&"event"!==a||(a+=n(),a+=w(e)),91===N.charCodeAt(I)&&93===N.charCodeAt(I+1)&&(a+=n(),a+=n());46===N.charCodeAt(I)||47===N.charCodeAt(I)||35===N.charCodeAt(I)||45===N.charCodeAt(I)||126===N.charCodeAt(I);)a+=n(),a+=w(e);if(i){if(E(e),61===N.charCodeAt(I)){a+=n(),E(e);for(var s,u=1;I=e||93!==N.charCodeAt(I))return null;a+=n()}return a}function C(){for(;I=O)&&(v.assert(64===N.charCodeAt(I)),!0)}function T(e,t){this._options=e,this._title=t.toLowerCase(),this._tag={title:t,description:null},this._options.lineNumbers&&(this._tag.lineNumber=F),this._last=0,this._extra={}}function D(e){var t,i,o;if(!C())return null;for(t=r(),i=new T(e,t),o=i.parse();I",r="",i=e.indexOf(n),o=e.indexOf(r);return i>=0&&o>=0?(this._tag.caption=h(e.substring(i+n.length,o)),this._tag.description=h(e.substring(o+r.length))):this._tag.description=e,!0},T.prototype.parseKind=function(){var e,n;return n={class:!0,constant:!0,event:!0,external:!0,file:!0,function:!0,member:!0,mixin:!0,module:!0,namespace:!0,typedef:!0},e=h(t(N,I,this._last)),this._tag.kind=e,!(!_(n,e)&&!this.addError("Invalid kind name '%0'",e))},T.prototype.parseAccess=function(){var e;return e=h(t(N,I,this._last)),this._tag.access=e,!("private"!==e&&"protected"!==e&&"public"!==e&&!this.addError("Invalid access name '%0'",e))},T.prototype.parseThis=function(){var e=h(t(N,I,this._last));if(e&&"{"===e.charAt(0)){var n=this.parseType();return n&&"NameExpression"===this._tag.type.type?(this._tag.name=this._tag.type.name,!0):this.addError("Invalid name for this")}return this.parseNamePath()},T.prototype.parseVariation=function(){var e,n;return n=h(t(N,I,this._last)),e=parseFloat(n,10),this._tag.variation=e,!(isNaN(e)&&!this.addError("Invalid variation '%0'",n))},T.prototype.ensureEnd=function(){var e=h(t(N,I,this._last));return!(e&&!this.addError("Unknown content '%0'",e))},T.prototype.epilogue=function(){var e;return e=this._tag.description,!(p(this._title)&&!this._tag.type&&e&&"["===e.charAt(0)&&(this._tag.type=this._extra.name,this._tag.name||(this._tag.name=void 0),!R&&!this.addError("Missing or invalid tag name")))},k={access:["parseAccess"],alias:["parseNamePath","ensureEnd"],augments:["parseType","parseNamePathOptional","ensureEnd"],constructor:["parseType","parseNamePathOptional","ensureEnd"],class:["parseType","parseNamePathOptional","ensureEnd"],extends:["parseType","parseNamePathOptional","ensureEnd"],example:["parseCaption"],deprecated:["parseDescription"],global:["ensureEnd"],inner:["ensureEnd"],instance:["ensureEnd"],kind:["parseKind"],mixes:["parseNamePath","ensureEnd"],mixin:["parseNamePathOptional","ensureEnd"],member:["parseType","parseNamePathOptional","ensureEnd"],method:["parseNamePathOptional","ensureEnd"],module:["parseType","parseNamePathOptional","ensureEnd"],func:["parseNamePathOptional","ensureEnd"],function:["parseNamePathOptional","ensureEnd"],var:["parseType","parseNamePathOptional","ensureEnd"],name:["parseNamePath","ensureEnd"],namespace:["parseType","parseNamePathOptional","ensureEnd"],private:["parseType","parseDescription"],protected:["parseType","parseDescription"],public:["parseType","parseDescription"],readonly:["ensureEnd"],requires:["parseNamePath","ensureEnd"],since:["parseDescription"],static:["ensureEnd"],summary:["parseDescription"],this:["parseThis","ensureEnd"],todo:["parseDescription"],typedef:["parseType","parseNamePathOptional"],variation:["parseVariation"],version:["parseDescription"]},T.prototype.parse=function(){var e,t,n,r;if(!this._title&&!this.addError("Missing or invalid title"))return null;for(this._last=s(this._title),n=_(k,this._title)?k[this._title]:["parseType","parseName","parseDescription","epilogue"],e=0,t=n.length;e<(){}[],:*|?!=".indexOf(String.fromCharCode(e))===-1&&!B.code.isWhiteSpace(e)&&!B.code.isLineTerminator(e)}function r(e,t,n,r){this._previous=e,this._index=t,this._token=n,this._value=r}function i(){var e=O.charAt(j);return j+=1,e}function o(e){var t,n,r,o=0;for(n="u"===e?4:2,t=0;t=0&&j=N)return F.ILLEGAL;if(n=O.charCodeAt(j+1),60===n)break}M+=i()}return F.NAME}function c(){var e;for(R=j;j=N)return L=F.EOF;switch(e=O.charCodeAt(j)){case 39:case 34:return L=a();case 58:return i(),L=F.COLON;case 44:return i(),L=F.COMMA;case 40:return i(),L=F.LPAREN;case 41:return i(),L=F.RPAREN;case 91:return i(),L=F.LBRACK;case 93:return i(),L=F.RBRACK;case 123:return i(),L=F.LBRACE;case 125:return i(),L=F.RBRACE;case 46:if(j+1=2.0.0 <3.0.0",type:"range"},"C:\\eslintgithub\\eslint"]],_from:"doctrine@>=2.0.0 <3.0.0",_id:"doctrine@2.0.0",_inCache:!0,_location:"/doctrine",_nodeVersion:"4.4.2",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/doctrine-2.0.0.tgz_1479232728285_0.34204454137943685"},_npmUser:{name:"nzakas",email:"nicholas@nczconsulting.com"},_npmVersion:"2.15.0",_phantomChildren:{},_requested:{raw:"doctrine@^2.0.0",scope:null,escapedName:"doctrine",name:"doctrine",rawSpec:"^2.0.0",spec:">=2.0.0 <3.0.0",type:"range"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz",_shasum:"c73d8d2909d22291e1a007a395804da8b665fe63",_shrinkwrap:null,_spec:"doctrine@^2.0.0",_where:"C:\\eslintgithub\\eslint",bugs:{url:"https://github.com/eslint/doctrine/issues"},dependencies:{esutils:"^2.0.2",isarray:"^1.0.0"},description:"JSDoc parser",devDependencies:{coveralls:"^2.11.2",dateformat:"^1.0.11",eslint:"^1.10.3","eslint-release":"^0.10.0",istanbul:"^0.4.1",linefix:"^0.1.1",mocha:"^2.3.3","npm-license":"^0.3.1",semver:"^5.0.3",shelljs:"^0.5.3","shelljs-nodecli":"^0.1.1",should:"^5.0.1"},directories:{lib:"./lib"},dist:{shasum:"c73d8d2909d22291e1a007a395804da8b665fe63",tarball:"https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz"},engines:{node:">=0.10.0"},files:["lib","LICENSE.BSD","LICENSE.closure-compiler","LICENSE.esprima","README.md"],gitHead:"46c600f27f54b3ab6b0b8a9ac9f97c807ffa95ef",homepage:"https://github.com/eslint/doctrine",license:"Apache-2.0",main:"lib/doctrine.js",maintainers:[{name:"constellation",email:"utatane.tea@gmail.com"},{name:"eslint",email:"nicholas+eslint@nczconsulting.com"},{name:"nzakas",email:"nicholas@nczconsulting.com"}],name:"doctrine",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/eslint/doctrine.git"},scripts:{alpharelease:"eslint-prerelease alpha",betarelease:"eslint-prerelease beta","ci-release":"eslint-ci-release",lint:"eslint lib/",release:"eslint-release",test:"npm run lint && node Makefile.js test"},version:"2.0.0"}},{}],6:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function t(n){function i(){}function o(e){var t,n,i={};for(t in e)e.hasOwnProperty(t)&&(n=e[t],"object"===("undefined"==typeof n?"undefined":r(n))&&null!==n?i[t]=o(n):i[t]=n);return i}function a(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function s(e,t){var n,r,i,o;for(r=e.length,i=0;r;)n=r>>>1,o=i+n,t(e[o])?r=n:(i=o+1,r-=n+1);return i}function u(e,t){var n,r,i,o;for(r=e.length,i=0;r;)n=r>>>1,o=i+n,t(e[o])?(i=o+1,r-=n+1):r=n;return i}function c(e,t){var n,r,i,o=S(t);for(r=0,i=o.length;re.range[0]}),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),n-=1,n>=0&&(e.extendedRange[0]=t[n].range[1]),e}function y(e,t,n){var r,i,a,s,u=[];if(!e.range)throw new Error("attachComments needs range information");if(!n.length){if(t.length){for(a=0,i=t.length;ae.range[0]));)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),u.splice(s,1)):s+=1;return s===u.length?_.Break:u[s].extendedRange[0]>e.range[1]?_.Skip:void 0}}),s=0,m(e,{leave:function(e){for(var t;se.range[1]?_.Skip:void 0}}),e}var x,b,_,w,E,S,C,T,D;return b=Array.isArray,b||(b=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),i(a),i(u),E=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}(),S=Object.keys||function(e){var t,n=[];for(t in e)n.push(t);return n},x={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},w={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},C={},T={},D={},_={Break:C,Skip:T,Remove:D},l.prototype.replace=function(e){this.parent[this.key]=e},l.prototype.remove=function(){return b(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){function e(e,t){if(b(t))for(r=0,i=t.length;r=0;)if(u=f[c],m=o[u])if(b(m)){for(l=m.length;(l-=1)>=0;)if(m[l]){if(h(a,f[c]))i=new p(m[l],[u,l],"Property",null);else{if(!d(m[l]))continue;i=new p(m[l],[u,l],null,null)}n.push(i)}}else d(m)&&n.push(new p(m,u,null,null))}}else if(i=r.pop(),s=this.__execute(t.leave,i),this.__state===C||s===C)return},f.prototype.replace=function(e,t){function n(e){var t,n,i,o;if(e.ref.remove())for(n=e.ref.key,o=e.ref.parent,t=r.length;t--;)if(i=r[t],i.ref&&i.ref.parent===o){if(i.ref.key=0;)if(x=m[c],g=o[x])if(b(g)){for(f=g.length;(f-=1)>=0;)if(g[f]){if(h(a,m[c]))u=new p(g[f],[x,f],"Property",new l(g,f));else{if(!d(g[f]))continue;u=new p(g[f],[x,f],null,new l(g,f))}r.push(u)}}else d(g)&&r.push(new p(g,x,null,new l(o,x)))}}else if(u=i.pop(),s=this.__execute(t.leave,u),void 0!==s&&s!==C&&s!==T&&s!==D&&u.ref.replace(s),this.__state!==D&&s!==D||n(u),this.__state===C||s===C)return y.root;return y.root},n.version=e("./package.json").version,n.Syntax=x,n.traverse=m,n.replace=g,n.attachComments=y,n.VisitorKeys=w,n.VisitorOption=_,n.Controller=f,n.cloneEnvironment=function(){return t({})},n}(n)},{"./package.json":7}],7:[function(e,t,n){t.exports={_args:[[{raw:"estraverse@^4.2.0",scope:null,escapedName:"estraverse",name:"estraverse",rawSpec:"^4.2.0",spec:">=4.2.0 <5.0.0",type:"range"},"C:\\eslintgithub\\eslint"]],_from:"estraverse@>=4.2.0 <5.0.0",_id:"estraverse@4.2.0",_inCache:!0,_location:"/estraverse",_nodeVersion:"0.12.9",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/estraverse-4.2.0.tgz_1457646738925_0.7118953282479197"},_npmUser:{name:"nzakas",email:"nicholas@nczconsulting.com"},_npmVersion:"2.14.9",_phantomChildren:{},_requested:{raw:"estraverse@^4.2.0",scope:null,escapedName:"estraverse",name:"estraverse",rawSpec:"^4.2.0",spec:">=4.2.0 <5.0.0",type:"range"},_requiredBy:["/","/eslint-scope","/esquery"],_resolved:"https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",_shasum:"0dee3fed31fcd469618ce7342099fc1afa0bdb13",_shrinkwrap:null,_spec:"estraverse@^4.2.0",_where:"C:\\eslintgithub\\eslint",bugs:{url:"https://github.com/estools/estraverse/issues"},dependencies:{},description:"ECMAScript JS AST traversal functions",devDependencies:{"babel-preset-es2015":"^6.3.13","babel-register":"^6.3.13",chai:"^2.1.1",espree:"^1.11.0",gulp:"^3.8.10","gulp-bump":"^0.2.2","gulp-filter":"^2.0.0","gulp-git":"^1.0.1","gulp-tag-version":"^1.2.1",jshint:"^2.5.6",mocha:"^2.1.0"},directories:{},dist:{shasum:"0dee3fed31fcd469618ce7342099fc1afa0bdb13",tarball:"https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz"},engines:{node:">=0.10.0"},gitHead:"6f6a4e99653908e859c7c10d04d9518bf4844ede",homepage:"https://github.com/estools/estraverse",license:"BSD-2-Clause",main:"estraverse.js",maintainers:[{name:"constellation",email:"utatane.tea@gmail.com"},{name:"michaelficarra",email:"npm@michael.ficarra.me"},{name:"nzakas",email:"nicholas@nczconsulting.com"}],name:"estraverse",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+ssh://git@github.com/estools/estraverse.git"},scripts:{lint:"jshint estraverse.js",test:"npm run-script lint && npm run-script unit-test","unit-test":"mocha --compilers js:babel-register"},version:"4.2.0"}},{}],8:[function(e,t,n){"use strict";!function(){function e(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function n(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function i(e){return r(e)||null!=e&&"FunctionDeclaration"===e.type}function o(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function a(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=o(t)}while(t);return!1}t.exports={isExpression:e,isStatement:r,isIterationStatement:n,isSourceElement:i,isProblematicIfStatement:a,trailingStatement:o}}()},{}],9:[function(e,t,n){"use strict";!function(){function e(e){return 48<=e&&e<=57}function n(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70}function r(e){return e>=48&&e<=55}function i(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&d.indexOf(e)>=0}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e){if(e<=65535)return String.fromCharCode(e);var t=String.fromCharCode(Math.floor((e-65536)/1024)+55296),n=String.fromCharCode((e-65536)%1024+56320);return t+n}function s(e){return e<128?h[e]:f.NonAsciiIdentifierStart.test(a(e))}function u(e){return e<128?m[e]:f.NonAsciiIdentifierPart.test(a(e))}function c(e){return e<128?h[e]:p.NonAsciiIdentifierStart.test(a(e))}function l(e){return e<128?m[e]:p.NonAsciiIdentifierPart.test(a(e))}var p,f,d,h,m,g;for(f={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},p={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/, NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},d=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],h=new Array(128),g=0;g<128;++g)h[g]=g>=97&&g<=122||g>=65&&g<=90||36===g||95===g;for(m=new Array(128),g=0;g<128;++g)m[g]=g>=97&&g<=122||g>=65&&g<=90||g>=48&&g<=57||36===g||95===g;t.exports={isDecimalDigit:e,isHexDigit:n,isOctalDigit:r,isWhiteSpace:i,isLineTerminator:o,isIdentifierStartES5:s,isIdentifierPartES5:u,isIdentifierStartES6:c,isIdentifierPartES6:l}}()},{}],10:[function(e,t,n){"use strict";!function(){function n(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function r(e,t){return!(!t&&"yield"===e)&&i(e,t)}function i(e,t){if(t&&n(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function o(e,t){return"null"===e||"true"===e||"false"===e||r(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||i(e,t)}function s(e){return"eval"===e||"arguments"===e}function u(e){var t,n,r;if(0===e.length)return!1;if(r=e.charCodeAt(0),!d.isIdentifierStartES5(r))return!1;for(t=1,n=e.length;t=n)return!1;if(i=e.charCodeAt(t),!(56320<=i&&i<=57343))return!1;r=c(r,i)}if(!o(r))return!1;o=d.isIdentifierPartES6}return!0}function p(e,t){return u(e)&&!o(e,t)}function f(e,t){return l(e)&&!a(e,t)}var d=e("./code");t.exports={isKeywordES5:r,isKeywordES6:i,isReservedWordES5:o,isReservedWordES6:a,isRestrictedWord:s,isIdentifierNameES5:u,isIdentifierNameES6:l,isIdentifierES5:p,isIdentifierES6:f}}()},{"./code":9}],11:[function(e,t,n){"use strict";!function(){n.ast=e("./ast"),n.code=e("./code"),n.keyword=e("./keyword")}()},{"./ast":8,"./code":9,"./keyword":10}],12:[function(e,t,n){t.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es6:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffectReadOnly:!1,AnimationEffectTiming:!1,AnimationEffectTimingReadOnly:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AutocompleteErrorEvent:!1,BarProp:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,blur:!1,btoa:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClientRect:!1,ClientRectList:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConvolverNode:!1,createImageBitmap:!1,Credential:!1,CredentialsContainer:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSFontFaceRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CSSTransition:!1,CSSUnknownRule:!1,CSSViewportRule:!1,customElements:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,Debug:!1,defaultStatus:!1,defaultstatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMParser:!1,DOMSettableTokenList:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,FederatedCredential:!1,fetch:!1,File:!1,FileError:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAppletElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLKeygenElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,ImageBitmap:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,InputMethodContext:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,Intl:!1,KeyboardEvent:!1,KeyframeEffect:!1,KeyframeEffectReadOnly:!1,length:!1,localStorage:!1,location:!1,Location:!1,locationbar:!1,matchMedia:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyEvent:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaSource:!1,MediaRecorder:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,navigator:!1,Navigator:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PasswordCredential:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,Plugin:!1,PluginArray:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,RadioNodeList:!1,Range:!1,ReadableByteStream:!1,ReadableStream:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,resizeTo:!1,Response:!1,RTCIceCandidate:!1,RTCSessionDescription:!1,RTCPeerConnection:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedKeyframeList:!1,SharedWorker:!1,showModalDialog:!1,SiteBoundCredential:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,status:!1,statusbar:!1,stop:!1,Storage:!1,StorageEvent:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,SVGZoomEvent:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeEvent:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,URLSearchParams:!1,ValidityState:!1,VTTCue:!1,WaveShaperNode:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestProgressEvent:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1,XSLTProcessor:!1},worker:{applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,Worker:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,Intl:!1,module:!1,process:!1,require:!1,root:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},commonjs:{exports:!0,module:!1,require:!1,global:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,check:!1,describe:!1,expect:!1,gen:!1,it:!1,fdescribe:!1,fit:!1,jest:!1,pit:!1,require:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,Java:!1,java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,ln:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,target:!1,tempdir:!1,test:!1,touch:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,AccountsClient:!1,AccountsServer:!1,AccountsCommon:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,DDPRateLimiter:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{caches:!1,Cache:!1,CacheStorage:!1,Client:!1,clients:!1,Clients:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,FetchEvent:!1,importScripts:!1,registration:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,skipWaiting:!1,WindowClient:!1},atomtest:{advanceClock:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1},protractor:{$:!1,$$:!1,browser:!1,By:!1,by:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1},webextensions:{browser:!1,chrome:!1,opr:!1},greasemonkey:{GM_addStyle:!1,GM_deleteValue:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_setClipboard:!1,GM_setValue:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1}}},{}],13:[function(e,t,n){"use strict";t.exports=e("./globals.json")},{"./globals.json":12}],14:[function(e,t,n){(function(e){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){return Array.isArray(e)?e:[e]}function i(e,t){var n=m[e];if(n)return n;var r=t?h:d,i=r.reduce(function(t,n){return t.replace(n[0],n[1].bind(e))},e);return m[e]=new RegExp(i,"i")}var o=function(){function e(e,t){for(var n=0;n-1}function h(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function B(e,t){for(var n=e.length;n--&&S(t,e[n],0)>-1;);return n}function U(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}function V(e){return"\\"+nr[e]}function G(e,t){return null==e?ie:e[t]}function W(e){return qn.test(e)}function Q(e){return $n.test(e)}function H(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function z(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function q(e,t){return function(n){return e(t(n))}}function $(e,t){for(var n=-1,r=e.length,i=0,o=[];++n>>1,Ve=[["ary",Se],["bind",ve],["bindKey",ye],["curry",be],["curryRight",_e],["flip",Te],["partial",we],["partialRight",Ee],["rearg",Ce]],Ge="[object Arguments]",We="[object Array]",Qe="[object AsyncFunction]",He="[object Boolean]",ze="[object Date]",qe="[object DOMException]",$e="[object Error]",Xe="[object Function]",Ke="[object GeneratorFunction]",Je="[object Map]",Ye="[object Number]",Ze="[object Null]",et="[object Object]",tt="[object Promise]",nt="[object Proxy]",rt="[object RegExp]",it="[object Set]",ot="[object String]",at="[object Symbol]",st="[object Undefined]",ut="[object WeakMap]",ct="[object WeakSet]",lt="[object ArrayBuffer]",pt="[object DataView]",ft="[object Float32Array]",dt="[object Float64Array]",ht="[object Int8Array]",mt="[object Int16Array]",gt="[object Int32Array]",vt="[object Uint8Array]",yt="[object Uint8ClampedArray]",xt="[object Uint16Array]",bt="[object Uint32Array]",_t=/\b__p \+= '';/g,wt=/\b(__p \+=) '' \+/g,Et=/(__e\(.*?\)|\b__t\)) \+\n'';/g,St=/&(?:amp|lt|gt|quot|#39);/g,Ct=/[&<>"']/g,Tt=RegExp(St.source),Dt=RegExp(Ct.source),At=/<%-([\s\S]+?)%>/g,Pt=/<%([\s\S]+?)%>/g,kt=/<%=([\s\S]+?)%>/g,It=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ft=/^\w*$/,Ot=/^\./,Nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jt=/[\\^$.*+?()[\]{}|]/g,Rt=RegExp(jt.source),Lt=/^\s+|\s+$/g,Mt=/^\s+/,Bt=/\s+$/,Ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Vt=/\{\n\/\* \[wrapped with (.+)\] \*/,Gt=/,? & /,Wt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Qt=/\\(\\)?/g,Ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zt=/\w*$/,qt=/^[-+]0x[0-9a-f]+$/i,$t=/^0b[01]+$/i,Xt=/^\[object .+?Constructor\]$/,Kt=/^0o[0-7]+$/i,Jt=/^(?:0|[1-9]\d*)$/,Yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Zt=/($^)/,en=/['\n\r\u2028\u2029\\]/g,tn="\\ud800-\\udfff",nn="\\u0300-\\u036f",rn="\\ufe20-\\ufe2f",on="\\u20d0-\\u20ff",an=nn+rn+on,sn="\\u2700-\\u27bf",un="a-z\\xdf-\\xf6\\xf8-\\xff",cn="\\xac\\xb1\\xd7\\xf7",ln="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pn="\\u2000-\\u206f",fn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",dn="A-Z\\xc0-\\xd6\\xd8-\\xde",hn="\\ufe0e\\ufe0f",mn=cn+ln+pn+fn,gn="['’]",vn="["+tn+"]",yn="["+mn+"]",xn="["+an+"]",bn="\\d+",_n="["+sn+"]",wn="["+un+"]",En="[^"+tn+mn+bn+sn+un+dn+"]",Sn="\\ud83c[\\udffb-\\udfff]",Cn="(?:"+xn+"|"+Sn+")",Tn="[^"+tn+"]",Dn="(?:\\ud83c[\\udde6-\\uddff]){2}",An="[\\ud800-\\udbff][\\udc00-\\udfff]",Pn="["+dn+"]",kn="\\u200d",In="(?:"+wn+"|"+En+")",Fn="(?:"+Pn+"|"+En+")",On="(?:"+gn+"(?:d|ll|m|re|s|t|ve))?",Nn="(?:"+gn+"(?:D|LL|M|RE|S|T|VE))?",jn=Cn+"?",Rn="["+hn+"]?",Ln="(?:"+kn+"(?:"+[Tn,Dn,An].join("|")+")"+Rn+jn+")*",Mn="\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",Bn="\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)",Un=Rn+jn+Ln,Vn="(?:"+[_n,Dn,An].join("|")+")"+Un,Gn="(?:"+[Tn+xn+"?",xn,Dn,An,vn].join("|")+")",Wn=RegExp(gn,"g"),Qn=RegExp(xn,"g"),Hn=RegExp(Sn+"(?="+Sn+")|"+Gn+Un,"g"),zn=RegExp([Pn+"?"+wn+"+"+On+"(?="+[yn,Pn,"$"].join("|")+")",Fn+"+"+Nn+"(?="+[yn,Pn+In,"$"].join("|")+")",Pn+"?"+In+"+"+On,Pn+"+"+Nn,Bn,Mn,bn,Vn].join("|"),"g"),qn=RegExp("["+kn+tn+an+hn+"]"),$n=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Kn=-1,Jn={};Jn[ft]=Jn[dt]=Jn[ht]=Jn[mt]=Jn[gt]=Jn[vt]=Jn[yt]=Jn[xt]=Jn[bt]=!0,Jn[Ge]=Jn[We]=Jn[lt]=Jn[He]=Jn[pt]=Jn[ze]=Jn[$e]=Jn[Xe]=Jn[Je]=Jn[Ye]=Jn[et]=Jn[rt]=Jn[it]=Jn[ot]=Jn[ut]=!1;var Yn={};Yn[Ge]=Yn[We]=Yn[lt]=Yn[pt]=Yn[He]=Yn[ze]=Yn[ft]=Yn[dt]=Yn[ht]=Yn[mt]=Yn[gt]=Yn[Je]=Yn[Ye]=Yn[et]=Yn[rt]=Yn[it]=Yn[ot]=Yn[at]=Yn[vt]=Yn[yt]=Yn[xt]=Yn[bt]=!0,Yn[$e]=Yn[Xe]=Yn[ut]=!1;var Zn={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},er={"&":"&","<":"<",">":">",'"':""","'":"'"},tr={"&":"&","<":"<",">":">",""":'"',"'":"'"},nr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},rr=parseFloat,ir=parseInt,or="object"==("undefined"==typeof e?"undefined":i(e))&&e&&e.Object===Object&&e,ar="object"==("undefined"==typeof self?"undefined":i(self))&&self&&self.Object===Object&&self,sr=or||ar||Function("return this")(),ur="object"==("undefined"==typeof r?"undefined":i(r))&&r&&!r.nodeType&&r,cr=ur&&"object"==("undefined"==typeof n?"undefined":i(n))&&n&&!n.nodeType&&n,lr=cr&&cr.exports===ur,pr=lr&&or.process,fr=function(){try{return pr&&pr.binding&&pr.binding("util")}catch(e){}}(),dr=fr&&fr.isArrayBuffer,hr=fr&&fr.isDate,mr=fr&&fr.isMap,gr=fr&&fr.isRegExp,vr=fr&&fr.isSet,yr=fr&&fr.isTypedArray,xr=A("length"),br=P(Zn),_r=P(er),wr=P(tr),Er=function e(t){function n(e){if(lu(e)&&!wf(e)&&!(e instanceof P)){if(e instanceof b)return e;if(_l.call(e,"__wrapped__"))return sa(e)}return new b(e)}function r(){}function b(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=ie}function P(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Me,this.__views__=[]}function J(){var e=new P(this.__wrapped__);return e.__actions__=Vi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Vi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Vi(this.__views__),e}function te(){if(this.__filtered__){var e=new P(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function ne(){var e=this.__wrapped__.value(),t=this.__dir__,n=wf(e),r=t<0,i=n?e.length:0,o=Io(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,p=l.length,f=0,d=Jl(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return wi(e,this.__actions__);var h=[];e:for(;u--&&f-1}function fn(e,t){var n=this.__data__,r=Nn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function dn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Vn(e,t,n,r,i,o){var a,s=t&fe,u=t&de,l=t&he;if(n&&(a=i?n(e,r,i,o):n(e)),a!==ie)return a;if(!cu(e))return e;var p=wf(e);if(p){if(a=No(e),!s)return Vi(e,a)}else{var f=Ip(e),d=f==Xe||f==Ke;if(Sf(e))return Pi(e,s);if(f==et||f==Ge||d&&!i){if(a=u||d?{}:jo(e),!s)return u?Qi(e,Ln(a,e)):Wi(e,Rn(a,e))}else{if(!Yn[f])return i?e:{};a=Ro(e,f,Vn,s)}}o||(o=new wn);var h=o.get(e);if(h)return h;o.set(e,a);var m=l?u?Eo:wo:u?zu:Hu,g=p?ie:m(e);return c(g||e,function(r,i){g&&(i=r,r=e[i]),On(a,i,Vn(r,t,n,i,e,o))}),a}function Gn(e){var t=Hu(e);return function(n){return Hn(n,e,t)}}function Hn(e,t,n){var r=n.length;if(null==e)return!r;for(e=fl(e);r--;){var i=n[r],o=t[i],a=e[i];if(a===ie&&!(i in e)||!o(a))return!1}return!0}function zn(e,t,n){if("function"!=typeof e)throw new ml(ue);return Np(function(){e.apply(ie,n)},t)}function qn(e,t,n,r){var i=-1,o=d,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=m(t,j(n))),r?(o=h,a=!1):t.length>=ae&&(o=L,a=!1,t=new xn(t));e:for(;++ii?0:i+n),r=r===ie||r>i?i:Du(r),r<0&&(r+=i),r=n>r?0:Au(r);n0&&n(s)?t>1?nr(s,t-1,n,r,i):g(i,s):r||(i[i.length]=s)}return i}function or(e,t){return e&&_p(e,t,Hu)}function ar(e,t){return e&&wp(e,t,Hu)}function ur(e,t){return f(t,function(t){return au(e[t])})}function cr(e,t){t=Di(t,e);for(var n=0,r=t.length;null!=e&&nt}function Er(e,t){return null!=e&&_l.call(e,t)}function Cr(e,t){return null!=e&&t in fl(e)}function Tr(e,t,n){return e>=Jl(t,n)&&e=120&&l.length>=120)?new xn(a&&l):ie}l=e[0];var p=-1,f=s[0];e:for(;++p-1;)s!==e&&jl.call(s,u,1),jl.call(e,u,1);return e}function ni(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;Bo(i)?jl.call(e,i,1):xi(e,i)}}return e}function ri(e,t){return e+Ql(ep()*(t-e+1))}function ii(e,t,n,r){for(var i=-1,o=Kl(Wl((t-e)/(n||1)),0),a=sl(o);o--;)a[r?o:++i]=e,e+=n;return a}function oi(e,t){var n="";if(!e||t<1||t>je)return n;do t%2&&(n+=e),t=Ql(t/2),t&&(e+=e);while(t);return n}function ai(e,t){return jp(Yo(e,t,jc),e+"")}function si(e){return Pn(ic(e))}function ui(e,t){var n=ic(e);return ra(n,Un(t,0,n.length))}function ci(e,t,n,r){if(!cu(e))return e;t=Di(t,e);for(var i=-1,o=t.length,a=o-1,s=e;null!=s&&++ii?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=sl(i);++r>>1,a=e[o];null!==a&&!_u(a)&&(n?a<=t:a=ae){var c=t?null:Dp(e);if(c)return X(c);a=!1,i=L,u=new xn}else u=t?[]:s;e:for(;++r=r?e:pi(e,t,n)}function Pi(e,t){if(t)return e.slice();var n=e.length,r=Il?Il(n):new e.constructor(n);return e.copy(r),r}function ki(e){var t=new e.constructor(e.byteLength);return new kl(t).set(new kl(e)),t}function Ii(e,t){var n=t?ki(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Fi(e,t,n){var r=t?n(z(e),fe):z(e);return v(r,o,new e.constructor)}function Oi(e){var t=new e.constructor(e.source,zt.exec(e));return t.lastIndex=e.lastIndex,t}function Ni(e,t,n){var r=t?n(X(e),fe):X(e);return v(r,a,new e.constructor)}function ji(e){return gp?fl(gp.call(e)):{}}function Ri(e,t){var n=t?ki(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Li(e,t){if(e!==t){var n=e!==ie,r=null===e,i=e===e,o=_u(e),a=t!==ie,s=null===t,u=t===t,c=_u(t);if(!s&&!c&&!o&&e>t||o&&a&&u&&!s&&!c||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!c&&e=s)return u;var c=n[r];return u*("desc"==c?-1:1)}}return e.index-t.index}function Bi(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,u=t.length,c=Kl(o-a,0),l=sl(u+c),p=!r;++s1?n[i-1]:ie,a=i>2?n[2]:ie;for(o=e.length>3&&"function"==typeof o?(i--,o):ie,a&&Uo(n[0],n[1],a)&&(o=i<3?ie:o,i=1),t=fl(t);++r-1?i[o?t[a]:a]:ie}}function to(e){return _o(function(t){var n=t.length,r=n,i=b.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new ml(ue);if(i&&!a&&"wrapper"==So(o))var a=new b([],!0)}for(r=a?r:n;++r1&&y.reverse(),p&&us))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var l=-1,p=!0,f=n&ge?new xn:ie;for(o.set(e,t),o.set(t,e);++l1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Ut,"{\n/* [wrapped with "+t+"] */\n")}function Mo(e){return wf(e)||_f(e)||!!(Rl&&e&&e[Rl])}function Bo(e,t){return t=null==t?je:t,!!t&&("number"==typeof e||Jt.test(e))&&e>-1&&e%1==0&&e0){if(++t>=Pe)return arguments[0]}else t=0;return e.apply(ie,arguments)}}function ra(e,t){var n=-1,r=e.length,i=r-1;for(t=t===ie?r:t;++n=this.__values__.length,t=e?ie:this.__values__[this.__index__++];return{done:e,value:t}}function ss(){return this}function us(e){for(var t,n=this;n instanceof r;){var i=sa(n);i.__index__=0,i.__values__=ie,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t}function cs(){var e=this.__wrapped__;if(e instanceof P){var t=e;return this.__actions__.length&&(t=new P(this)),t=t.reverse(),t.__actions__.push({func:rs,args:[Oa],thisArg:ie}),new b(t,this.__chain__)}return this.thru(Oa)}function ls(){return wi(this.__wrapped__,this.__actions__)}function ps(e,t,n){var r=wf(e)?p:$n;return n&&Uo(e,t,n)&&(t=ie),r(e,To(t,3))}function fs(e,t){var n=wf(e)?f:tr;return n(e,To(t,3))}function ds(e,t){return nr(xs(e,t),1)}function hs(e,t){return nr(xs(e,t),Ne)}function ms(e,t,n){return n=n===ie?1:Du(n),nr(xs(e,t),n)}function gs(e,t){var n=wf(e)?c:xp;return n(e,To(t,3))}function vs(e,t){var n=wf(e)?l:bp;return n(e,To(t,3))}function ys(e,t,n,r){e=Js(e)?e:ic(e),n=n&&!r?Du(n):0;var i=e.length;return n<0&&(n=Kl(i+n,0)),bu(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&S(e,t,n)>-1}function xs(e,t){var n=wf(e)?m:Hr;return n(e,To(t,3))}function bs(e,t,n,r){return null==e?[]:(wf(t)||(t=null==t?[]:[t]),n=r?ie:n,wf(n)||(n=null==n?[]:[n]),Jr(e,t,n))}function _s(e,t,n){var r=wf(e)?v:k,i=arguments.length<3;return r(e,To(t,4),n,i,xp)}function ws(e,t,n){var r=wf(e)?y:k,i=arguments.length<3;return r(e,To(t,4),n,i,bp)}function Es(e,t){var n=wf(e)?f:tr;return n(e,Ls(To(t,3)))}function Ss(e){var t=wf(e)?Pn:si;return t(e)}function Cs(e,t,n){t=(n?Uo(e,t,n):t===ie)?1:Du(t);var r=wf(e)?kn:ui;return r(e,t)}function Ts(e){var t=wf(e)?In:li;return t(e)}function Ds(e){if(null==e)return 0;if(Js(e))return bu(e)?Z(e):e.length;var t=Ip(e);return t==Je||t==it?e.size:Gr(e).length}function As(e,t,n){var r=wf(e)?x:fi;return n&&Uo(e,t,n)&&(t=ie),r(e,To(t,3))}function Ps(e,t){if("function"!=typeof t)throw new ml(ue);return e=Du(e),function(){if(--e<1)return t.apply(this,arguments)}}function ks(e,t,n){return t=n?ie:t,t=e&&null==t?e.length:t,ho(e,Se,ie,ie,ie,ie,t)}function Is(e,t){var n;if("function"!=typeof t)throw new ml(ue);return e=Du(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=ie),n}}function Fs(e,t,n){t=n?ie:t;var r=ho(e,be,ie,ie,ie,ie,ie,t);return r.placeholder=Fs.placeholder,r}function Os(e,t,n){t=n?ie:t;var r=ho(e,_e,ie,ie,ie,ie,ie,t);return r.placeholder=Os.placeholder,r}function Ns(e,t,n){function r(t){var n=f,r=d;return f=d=ie,y=t,m=e.apply(r,n)}function i(e){return y=e,g=Np(s,t),x?r(e):m}function o(e){var n=e-v,r=e-y,i=t-n;return b?Jl(i,h-r):i}function a(e){var n=e-v,r=e-y;return v===ie||n>=t||n<0||b&&r>=h}function s(){var e=lf();return a(e)?u(e):void(g=Np(s,o(e)))}function u(e){return g=ie,_&&f?r(e):(f=d=ie,m)}function c(){g!==ie&&Tp(g),y=0,f=v=d=g=ie}function l(){return g===ie?m:u(lf())}function p(){var e=lf(),n=a(e);if(f=arguments,d=this,v=e,n){if(g===ie)return i(v);if(b)return g=Np(s,t),r(v)}return g===ie&&(g=Np(s,t)),m}var f,d,h,m,g,v,y=0,x=!1,b=!1,_=!0;if("function"!=typeof e)throw new ml(ue);return t=Pu(t)||0,cu(n)&&(x=!!n.leading,b="maxWait"in n,h=b?Kl(Pu(n.maxWait)||0,t):h,_="trailing"in n?!!n.trailing:_),p.cancel=c,p.flush=l,p}function js(e){return ho(e,Te)}function Rs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ml(ue);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Rs.Cache||dn),n}function Ls(e){if("function"!=typeof e)throw new ml(ue);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Ms(e){return Is(2,e)}function Bs(e,t){if("function"!=typeof e)throw new ml(ue);return t=t===ie?t:Du(t),ai(e,t)}function Us(e,t){if("function"!=typeof e)throw new ml(ue);return t=null==t?0:Kl(Du(t),0),ai(function(n){var r=n[t],i=Ai(n,0,t);return r&&g(i,r),s(e,this,i)})}function Vs(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ml(ue);return cu(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ns(e,t,{leading:r,maxWait:t,trailing:i})}function Gs(e){return ks(e,1)}function Ws(e,t){return gf(Ti(t),e)}function Qs(){if(!arguments.length)return[];var e=arguments[0];return wf(e)?e:[e]}function Hs(e){return Vn(e,he)}function zs(e,t){return t="function"==typeof t?t:ie,Vn(e,he,t)}function qs(e){return Vn(e,fe|he)}function $s(e,t){return t="function"==typeof t?t:ie,Vn(e,fe|he,t)}function Xs(e,t){return null==t||Hn(e,t,Hu(t))}function Ks(e,t){return e===t||e!==e&&t!==t}function Js(e){return null!=e&&uu(e.length)&&!au(e)}function Ys(e){return lu(e)&&Js(e)}function Zs(e){return e===!0||e===!1||lu(e)&&fr(e)==He}function eu(e){return lu(e)&&1===e.nodeType&&!yu(e)}function tu(e){if(null==e)return!0;if(Js(e)&&(wf(e)||"string"==typeof e||"function"==typeof e.splice||Sf(e)||Pf(e)||_f(e)))return!e.length;var t=Ip(e);if(t==Je||t==it)return!e.size;if(Ho(e))return!Gr(e).length;for(var n in e)if(_l.call(e,n))return!1;return!0}function nu(e,t){return Or(e,t)}function ru(e,t,n){n="function"==typeof n?n:ie;var r=n?n(e,t):ie;return r===ie?Or(e,t,ie,n):!!r}function iu(e){if(!lu(e))return!1;var t=fr(e);return t==$e||t==qe||"string"==typeof e.message&&"string"==typeof e.name&&!yu(e)}function ou(e){return"number"==typeof e&&ql(e)}function au(e){if(!cu(e))return!1;var t=fr(e);return t==Xe||t==Ke||t==Qe||t==nt}function su(e){return"number"==typeof e&&e==Du(e)}function uu(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=je}function cu(e){var t="undefined"==typeof e?"undefined":i(e);return null!=e&&("object"==t||"function"==t)}function lu(e){return null!=e&&"object"==("undefined"==typeof e?"undefined":i(e))}function pu(e,t){return e===t||Rr(e,t,Ao(t))}function fu(e,t,n){return n="function"==typeof n?n:ie,Rr(e,t,Ao(t),n)}function du(e){return vu(e)&&e!=+e}function hu(e){if(Fp(e))throw new cl(se);return Lr(e)}function mu(e){return null===e}function gu(e){return null==e}function vu(e){return"number"==typeof e||lu(e)&&fr(e)==Ye}function yu(e){if(!lu(e)||fr(e)!=et)return!1;var t=Fl(e);if(null===t)return!0;var n=_l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&bl.call(n)==Cl}function xu(e){return su(e)&&e>=-je&&e<=je}function bu(e){return"string"==typeof e||!wf(e)&&lu(e)&&fr(e)==ot}function _u(e){return"symbol"==("undefined"==typeof e?"undefined":i(e))||lu(e)&&fr(e)==at}function wu(e){return e===ie}function Eu(e){return lu(e)&&Ip(e)==ut}function Su(e){return lu(e)&&fr(e)==ct}function Cu(e){if(!e)return[];if(Js(e))return bu(e)?ee(e):Vi(e);if(Ll&&e[Ll])return H(e[Ll]());var t=Ip(e),n=t==Je?z:t==it?X:ic;return n(e)}function Tu(e){if(!e)return 0===e?e:0;if(e=Pu(e),e===Ne||e===-Ne){var t=e<0?-1:1;return t*Re}return e===e?e:0}function Du(e){var t=Tu(e),n=t%1;return t===t?n?t-n:t:0}function Au(e){return e?Un(Du(e),0,Me):0}function Pu(e){if("number"==typeof e)return e;if(_u(e))return Le;if(cu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=cu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Lt,"");var n=$t.test(e);return n||Kt.test(e)?ir(e.slice(2),n?2:8):qt.test(e)?Le:+e}function ku(e){return Gi(e,zu(e))}function Iu(e){return e?Un(Du(e),-je,je):0===e?e:0}function Fu(e){return null==e?"":vi(e)}function Ou(e,t){var n=yp(e);return null==t?n:Rn(n,t)}function Nu(e,t){return w(e,To(t,3),or)}function ju(e,t){return w(e,To(t,3),ar)}function Ru(e,t){return null==e?e:_p(e,To(t,3),zu)}function Lu(e,t){return null==e?e:wp(e,To(t,3),zu)}function Mu(e,t){return e&&or(e,To(t,3))}function Bu(e,t){return e&&ar(e,To(t,3))}function Uu(e){return null==e?[]:ur(e,Hu(e))}function Vu(e){return null==e?[]:ur(e,zu(e))}function Gu(e,t,n){var r=null==e?ie:cr(e,t);return r===ie?n:r}function Wu(e,t){return null!=e&&Oo(e,t,Er)}function Qu(e,t){return null!=e&&Oo(e,t,Cr)}function Hu(e){return Js(e)?An(e):Gr(e)}function zu(e){return Js(e)?An(e,!0):Wr(e)}function qu(e,t){var n={};return t=To(t,3),or(e,function(e,r,i){Mn(n,t(e,r,i),e)}),n}function $u(e,t){var n={};return t=To(t,3),or(e,function(e,r,i){Mn(n,r,t(e,r,i))}),n}function Xu(e,t){return Ku(e,Ls(To(t)))}function Ku(e,t){if(null==e)return{};var n=m(Eo(e),function(e){return[e]});return t=To(t),Zr(e,n,function(e,n){return t(e,n[0])})}function Ju(e,t,n){t=Di(t,e);var r=-1,i=t.length;for(i||(i=1,e=ie);++rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=ep();return Jl(e+i*(t-e+rr("1e-"+((i+"").length-1))),t)}return ri(e,t)}function cc(e){return td(Fu(e).toLowerCase())}function lc(e){return e=Fu(e),e&&e.replace(Yt,br).replace(Qn,"")}function pc(e,t,n){e=Fu(e),t=vi(t);var r=e.length;n=n===ie?r:Un(Du(n),0,r);var i=n;return n-=t.length,n>=0&&e.slice(n,i)==t}function fc(e){return e=Fu(e),e&&Dt.test(e)?e.replace(Ct,_r):e}function dc(e){return e=Fu(e),e&&Rt.test(e)?e.replace(jt,"\\$&"):e}function hc(e,t,n){e=Fu(e),t=Du(t);var r=t?Z(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return ao(Ql(i),n)+e+ao(Wl(i),n)}function mc(e,t,n){e=Fu(e),t=Du(t);var r=t?Z(e):0;return t&&r>>0)?(e=Fu(e),e&&("string"==typeof t||null!=t&&!Df(t))&&(t=vi(t),!t&&W(e))?Ai(ee(e),0,n):e.split(t,n)):[]}function _c(e,t,n){return e=Fu(e),n=null==n?0:Un(Du(n),0,e.length),t=vi(t),e.slice(n,n+t.length)==t}function wc(e,t,r){var i=n.templateSettings;r&&Uo(e,t,r)&&(t=ie),e=Fu(e),t=Nf({},t,i,mo);var o,a,s=Nf({},t.imports,i.imports,mo),u=Hu(s),c=R(s,u),l=0,p=t.interpolate||Zt,f="__p += '",d=dl((t.escape||Zt).source+"|"+p.source+"|"+(p===kt?Ht:Zt).source+"|"+(t.evaluate||Zt).source+"|$","g"),h="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++Kn+"]")+"\n";e.replace(d,function(t,n,r,i,s,u){return r||(r=i),f+=e.slice(l,u).replace(en,V),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t}),f+="';\n";var m=t.variable;m||(f="with (obj) {\n"+f+"\n}\n"),f=(a?f.replace(_t,""):f).replace(wt,"$1").replace(Et,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=nd(function(){return ll(u,h+"return "+f).apply(ie,c)});if(g.source=f,iu(g))throw g;return g}function Ec(e){return Fu(e).toLowerCase()}function Sc(e){return Fu(e).toUpperCase()}function Cc(e,t,n){if(e=Fu(e),e&&(n||t===ie))return e.replace(Lt,"");if(!e||!(t=vi(t)))return e;var r=ee(e),i=ee(t),o=M(r,i),a=B(r,i)+1;return Ai(r,o,a).join("")}function Tc(e,t,n){if(e=Fu(e),e&&(n||t===ie))return e.replace(Bt,"");if(!e||!(t=vi(t)))return e;var r=ee(e),i=B(r,ee(t))+1;return Ai(r,0,i).join("")}function Dc(e,t,n){if(e=Fu(e),e&&(n||t===ie))return e.replace(Mt,"");if(!e||!(t=vi(t)))return e;var r=ee(e),i=M(r,ee(t));return Ai(r,i).join("")}function Ac(e,t){var n=De,r=Ae;if(cu(t)){var i="separator"in t?t.separator:i;n="length"in t?Du(t.length):n,r="omission"in t?vi(t.omission):r}e=Fu(e);var o=e.length;if(W(e)){var a=ee(e);o=a.length}if(n>=o)return e;var s=n-Z(r);if(s<1)return r;var u=a?Ai(a,0,s).join(""):e.slice(0,s);if(i===ie)return u+r;if(a&&(s+=u.length-s),Df(i)){if(e.slice(s).search(i)){var c,l=u;for(i.global||(i=dl(i.source,Fu(zt.exec(i))+"g")),i.lastIndex=0;c=i.exec(l);)var p=c.index;u=u.slice(0,p===ie?s:p)}}else if(e.indexOf(vi(i),s)!=s){var f=u.lastIndexOf(i);f>-1&&(u=u.slice(0,f))}return u+r}function Pc(e){return e=Fu(e),e&&Tt.test(e)?e.replace(St,wr):e}function kc(e,t,n){return e=Fu(e),t=n?ie:t,t===ie?Q(e)?re(e):_(e):e.match(t)||[]}function Ic(e){var t=null==e?0:e.length,n=To();return e=t?m(e,function(e){if("function"!=typeof e[1])throw new ml(ue);return[n(e[0]),e[1]]}):[],ai(function(n){for(var r=-1;++rje)return[];var n=Me,r=Jl(e,Me);t=To(t),e-=Me;for(var i=O(r,t);++n1?e[t-1]:ie;return n="function"==typeof n?(e.pop(),n):ie,Ya(e,n)}),ef=_o(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Bn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof P&&Bo(n)?(r=r.slice(n,+n+(t?1:0)),r.__actions__.push({func:rs,args:[i],thisArg:ie}),new b(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(ie),e})):this.thru(i)}),tf=Hi(function(e,t,n){_l.call(e,n)?++e[n]:Mn(e,n,1)}),nf=eo(ga),rf=eo(va),of=Hi(function(e,t,n){_l.call(e,n)?e[n].push(t):Mn(e,n,[t])}),af=ai(function(e,t,n){var r=-1,i="function"==typeof t,o=Js(e)?sl(e.length):[];return xp(e,function(e){o[++r]=i?s(t,e,n):Pr(e,t,n)}),o}),sf=Hi(function(e,t,n){Mn(e,n,t)}),uf=Hi(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),cf=ai(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Uo(e,t[0],t[1])?t=[]:n>2&&Uo(t[0],t[1],t[2])&&(t=[t[0]]),Jr(e,nr(t,1),[])}),lf=Vl||function(){return sr.Date.now()},pf=ai(function(e,t,n){var r=ve;if(n.length){var i=$(n,Co(pf));r|=we}return ho(e,r,t,n,i)}),ff=ai(function(e,t,n){var r=ve|ye;if(n.length){var i=$(n,Co(ff));r|=we}return ho(t,r,e,n,i)}),df=ai(function(e,t){return zn(e,1,t)}),hf=ai(function(e,t,n){return zn(e,Pu(t)||0,n)});Rs.Cache=dn;var mf=Cp(function(e,t){t=1==t.length&&wf(t[0])?m(t[0],j(To())):m(nr(t,1),j(To()));var n=t.length;return ai(function(r){for(var i=-1,o=Jl(r.length,n);++i=t}),_f=kr(function(){return arguments}())?kr:function(e){return lu(e)&&_l.call(e,"callee")&&!Nl.call(e,"callee")},wf=sl.isArray,Ef=dr?j(dr):Ir,Sf=zl||zc,Cf=hr?j(hr):Fr,Tf=mr?j(mr):jr,Df=gr?j(gr):Mr,Af=vr?j(vr):Br,Pf=yr?j(yr):Ur,kf=co(Qr),If=co(function(e,t){return e<=t}),Ff=zi(function(e,t){if(Ho(t)||Js(t))return void Gi(t,Hu(t),e);for(var n in t)_l.call(t,n)&&On(e,n,t[n])}),Of=zi(function(e,t){Gi(t,zu(t),e)}),Nf=zi(function(e,t,n,r){Gi(t,zu(t),e,r)}),jf=zi(function(e,t,n,r){Gi(t,Hu(t),e,r)}),Rf=_o(Bn),Lf=ai(function(e){return e.push(ie,mo),s(Nf,ie,e)}),Mf=ai(function(e){return e.push(ie,go),s(Wf,ie,e)}),Bf=ro(function(e,t,n){e[t]=n},Oc(jc)),Uf=ro(function(e,t,n){_l.call(e,t)?e[t].push(n):e[t]=[n]},To),Vf=ai(Pr),Gf=zi(function(e,t,n){ $r(e,t,n)}),Wf=zi(function(e,t,n,r){$r(e,t,n,r)}),Qf=_o(function(e,t){var n={};if(null==e)return n;var r=!1;t=m(t,function(t){return t=Di(t,e),r||(r=t.length>1),t}),Gi(e,Eo(e),n),r&&(n=Vn(n,fe|de|he,vo));for(var i=t.length;i--;)xi(n,t[i]);return n}),Hf=_o(function(e,t){return null==e?{}:Yr(e,t)}),zf=fo(Hu),qf=fo(zu),$f=Ji(function(e,t,n){return t=t.toLowerCase(),e+(n?cc(t):t)}),Xf=Ji(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Kf=Ji(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Jf=Ki("toLowerCase"),Yf=Ji(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Zf=Ji(function(e,t,n){return e+(n?" ":"")+td(t)}),ed=Ji(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),td=Ki("toUpperCase"),nd=ai(function(e,t){try{return s(e,ie,t)}catch(e){return iu(e)?e:new cl(e)}}),rd=_o(function(e,t){return c(t,function(t){t=ia(t),Mn(e,t,pf(e[t],e))}),e}),id=to(),od=to(!0),ad=ai(function(e,t){return function(n){return Pr(n,e,t)}}),sd=ai(function(e,t){return function(n){return Pr(e,n,t)}}),ud=oo(m),cd=oo(p),ld=oo(x),pd=uo(),fd=uo(!0),dd=io(function(e,t){return e+t},0),hd=po("ceil"),md=io(function(e,t){return e/t},1),gd=po("floor"),vd=io(function(e,t){return e*t},1),yd=po("round"),xd=io(function(e,t){return e-t},0);return n.after=Ps,n.ary=ks,n.assign=Ff,n.assignIn=Of,n.assignInWith=Nf,n.assignWith=jf,n.at=Rf,n.before=Is,n.bind=pf,n.bindAll=rd,n.bindKey=ff,n.castArray=Qs,n.chain=ts,n.chunk=ua,n.compact=ca,n.concat=la,n.cond=Ic,n.conforms=Fc,n.constant=Oc,n.countBy=tf,n.create=Ou,n.curry=Fs,n.curryRight=Os,n.debounce=Ns,n.defaults=Lf,n.defaultsDeep=Mf,n.defer=df,n.delay=hf,n.difference=Lp,n.differenceBy=Mp,n.differenceWith=Bp,n.drop=pa,n.dropRight=fa,n.dropRightWhile=da,n.dropWhile=ha,n.fill=ma,n.filter=fs,n.flatMap=ds,n.flatMapDeep=hs,n.flatMapDepth=ms,n.flatten=ya,n.flattenDeep=xa,n.flattenDepth=ba,n.flip=js,n.flow=id,n.flowRight=od,n.fromPairs=_a,n.functions=Uu,n.functionsIn=Vu,n.groupBy=of,n.initial=Sa,n.intersection=Up,n.intersectionBy=Vp,n.intersectionWith=Gp,n.invert=Bf,n.invertBy=Uf,n.invokeMap=af,n.iteratee=Rc,n.keyBy=sf,n.keys=Hu,n.keysIn=zu,n.map=xs,n.mapKeys=qu,n.mapValues=$u,n.matches=Lc,n.matchesProperty=Mc,n.memoize=Rs,n.merge=Gf,n.mergeWith=Wf,n.method=ad,n.methodOf=sd,n.mixin=Bc,n.negate=Ls,n.nthArg=Gc,n.omit=Qf,n.omitBy=Xu,n.once=Ms,n.orderBy=bs,n.over=ud,n.overArgs=mf,n.overEvery=cd,n.overSome=ld,n.partial=gf,n.partialRight=vf,n.partition=uf,n.pick=Hf,n.pickBy=Ku,n.property=Wc,n.propertyOf=Qc,n.pull=Wp,n.pullAll=Pa,n.pullAllBy=ka,n.pullAllWith=Ia,n.pullAt=Qp,n.range=pd,n.rangeRight=fd,n.rearg=yf,n.reject=Es,n.remove=Fa,n.rest=Bs,n.reverse=Oa,n.sampleSize=Cs,n.set=Yu,n.setWith=Zu,n.shuffle=Ts,n.slice=Na,n.sortBy=cf,n.sortedUniq=Va,n.sortedUniqBy=Ga,n.split=bc,n.spread=Us,n.tail=Wa,n.take=Qa,n.takeRight=Ha,n.takeRightWhile=za,n.takeWhile=qa,n.tap=ns,n.throttle=Vs,n.thru=rs,n.toArray=Cu,n.toPairs=zf,n.toPairsIn=qf,n.toPath=Jc,n.toPlainObject=ku,n.transform=ec,n.unary=Gs,n.union=Hp,n.unionBy=zp,n.unionWith=qp,n.uniq=$a,n.uniqBy=Xa,n.uniqWith=Ka,n.unset=tc,n.unzip=Ja,n.unzipWith=Ya,n.update=nc,n.updateWith=rc,n.values=ic,n.valuesIn=oc,n.without=$p,n.words=kc,n.wrap=Ws,n.xor=Xp,n.xorBy=Kp,n.xorWith=Jp,n.zip=Yp,n.zipObject=Za,n.zipObjectDeep=es,n.zipWith=Zp,n.entries=zf,n.entriesIn=qf,n.extend=Of,n.extendWith=Nf,Bc(n,n),n.add=dd,n.attempt=nd,n.camelCase=$f,n.capitalize=cc,n.ceil=hd,n.clamp=ac,n.clone=Hs,n.cloneDeep=qs,n.cloneDeepWith=$s,n.cloneWith=zs,n.conformsTo=Xs,n.deburr=lc,n.defaultTo=Nc,n.divide=md,n.endsWith=pc,n.eq=Ks,n.escape=fc,n.escapeRegExp=dc,n.every=ps,n.find=nf,n.findIndex=ga,n.findKey=Nu,n.findLast=rf,n.findLastIndex=va,n.findLastKey=ju,n.floor=gd,n.forEach=gs,n.forEachRight=vs,n.forIn=Ru,n.forInRight=Lu,n.forOwn=Mu,n.forOwnRight=Bu,n.get=Gu,n.gt=xf,n.gte=bf,n.has=Wu,n.hasIn=Qu,n.head=wa,n.identity=jc,n.includes=ys,n.indexOf=Ea,n.inRange=sc,n.invoke=Vf,n.isArguments=_f,n.isArray=wf,n.isArrayBuffer=Ef,n.isArrayLike=Js,n.isArrayLikeObject=Ys,n.isBoolean=Zs,n.isBuffer=Sf,n.isDate=Cf,n.isElement=eu,n.isEmpty=tu,n.isEqual=nu,n.isEqualWith=ru,n.isError=iu,n.isFinite=ou,n.isFunction=au,n.isInteger=su,n.isLength=uu,n.isMap=Tf,n.isMatch=pu,n.isMatchWith=fu,n.isNaN=du,n.isNative=hu,n.isNil=gu,n.isNull=mu,n.isNumber=vu,n.isObject=cu,n.isObjectLike=lu,n.isPlainObject=yu,n.isRegExp=Df,n.isSafeInteger=xu,n.isSet=Af,n.isString=bu,n.isSymbol=_u,n.isTypedArray=Pf,n.isUndefined=wu,n.isWeakMap=Eu,n.isWeakSet=Su,n.join=Ca,n.kebabCase=Xf,n.last=Ta,n.lastIndexOf=Da,n.lowerCase=Kf,n.lowerFirst=Jf,n.lt=kf,n.lte=If,n.max=Zc,n.maxBy=el,n.mean=tl,n.meanBy=nl,n.min=rl,n.minBy=il,n.stubArray=Hc,n.stubFalse=zc,n.stubObject=qc,n.stubString=$c,n.stubTrue=Xc,n.multiply=vd,n.nth=Aa,n.noConflict=Uc,n.noop=Vc,n.now=lf,n.pad=hc,n.padEnd=mc,n.padStart=gc,n.parseInt=vc,n.random=uc,n.reduce=_s,n.reduceRight=ws,n.repeat=yc,n.replace=xc,n.result=Ju,n.round=yd,n.runInContext=e,n.sample=Ss,n.size=Ds,n.snakeCase=Yf,n.some=As,n.sortedIndex=ja,n.sortedIndexBy=Ra,n.sortedIndexOf=La,n.sortedLastIndex=Ma,n.sortedLastIndexBy=Ba,n.sortedLastIndexOf=Ua,n.startCase=Zf,n.startsWith=_c,n.subtract=xd,n.sum=ol,n.sumBy=al,n.template=wc,n.times=Kc,n.toFinite=Tu,n.toInteger=Du,n.toLength=Au,n.toLower=Ec,n.toNumber=Pu,n.toSafeInteger=Iu,n.toString=Fu,n.toUpper=Sc,n.trim=Cc,n.trimEnd=Tc,n.trimStart=Dc,n.truncate=Ac,n.unescape=Pc,n.uniqueId=Yc,n.upperCase=ed,n.upperFirst=td,n.each=gs,n.eachRight=vs,n.first=wa,Bc(n,function(){var e={};return or(n,function(t,r){_l.call(n.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),n.VERSION=oe,c(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){n[e].placeholder=n}),c(["drop","take"],function(e,t){P.prototype[e]=function(n){n=n===ie?1:Kl(Du(n),0);var r=this.__filtered__&&!t?new P(this):this.clone();return r.__filtered__?r.__takeCount__=Jl(n,r.__takeCount__):r.__views__.push({size:Jl(n,Me),type:e+(r.__dir__<0?"Right":"")}),r},P.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),c(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==Ie||n==Oe;P.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:To(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),c(["head","last"],function(e,t){var n="take"+(t?"Right":"");P.prototype[e]=function(){return this[n](1).value()[0]}}),c(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");P.prototype[e]=function(){return this.__filtered__?new P(this):this[n](1)}}),P.prototype.compact=function(){return this.filter(jc)},P.prototype.find=function(e){return this.filter(e).head()},P.prototype.findLast=function(e){return this.reverse().find(e)},P.prototype.invokeMap=ai(function(e,t){return"function"==typeof e?new P(this):this.map(function(n){return Pr(n,e,t)})}),P.prototype.reject=function(e){return this.filter(Ls(To(e)))},P.prototype.slice=function(e,t){e=Du(e);var n=this;return n.__filtered__&&(e>0||t<0)?new P(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==ie&&(t=Du(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},P.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},P.prototype.toArray=function(){return this.take(Me)},or(P.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=n[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(n.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,u=t instanceof P,c=s[0],l=u||wf(t),p=function(e){var t=o.apply(n,g([e],s));return i&&f?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,d=!!this.__actions__.length,h=a&&!f,m=u&&!d;if(!a&&l){t=m?t:new P(this);var v=e.apply(t,s);return v.__actions__.push({func:rs,args:[p],thisArg:ie}),new b(v,f)}return h&&m?e.apply(this,s):(v=this.thru(p),h?i?v.value()[0]:v.value():v)})}),c(["pop","push","shift","sort","splice","unshift"],function(e){var t=gl[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);n.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var n=this.value();return t.apply(wf(n)?n:[],e)}return this[r](function(n){return t.apply(wf(n)?n:[],e)})}}),or(P.prototype,function(e,t){var r=n[t];if(r){var i=r.name+"",o=cp[i]||(cp[i]=[]);o.push({name:t,func:r})}}),cp[no(ie,ye).name]=[{name:"wrapper",func:ie}],P.prototype.clone=J,P.prototype.reverse=te,P.prototype.value=ne,n.prototype.at=ef,n.prototype.chain=is,n.prototype.commit=os,n.prototype.next=as,n.prototype.plant=us,n.prototype.reverse=cs,n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=ls,n.prototype.first=n.prototype.head,Ll&&(n.prototype[Ll]=ss),n},Sr=Er();"function"==typeof t&&"object"==i(t.amd)&&t.amd?(sr._=Sr,t(function(){return Sr})):cr?((cr.exports=Sr)._=Sr,ur._=Sr):sr._=Sr}).call(void 0)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],17:[function(e,t,n){"use strict";var r=function(e,t){function n(e,t,i){if(i){for(r=t;i=n(e,r),i<76&&i>65;)++r;return+e.slice(t-1,r)}return i=u&&u.indexOf(e.charAt(t)),i>-1?i+76:(i=e.charCodeAt(t)||0,i<45||i>127?i:i<46?65:i<48?i-1:i<58?i+18:i<65?i-11:i<91?i+11:i<97?i-37:i<123?i+5:i-63)}var r,i,o=1,a=0,s=0,u=String.alphabet;if((e+="")!=(t+=""))for(;o;)if(i=n(e,a++),o=n(t,s++),i<76&&o<76&&i>66&&o>66&&(i=n(e,a,a),o=n(t,s,a=r),s=r),i!=o)return i1)for(var n=1;n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(t)?r.showHidden=t:t&&n._extend(r,t),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,t,r){if(e.customInspect&&t&&T(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return x(i)||(i=u(e,i,r)),i}var o=c(e,t);if(o)return o;var a=Object.keys(t),m=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),C(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(t);if(0===a.length){if(T(t)){var g=t.name?": "+t.name:"";return e.stylize("[Function"+g+"]","special")}if(w(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(S(t))return e.stylize(Date.prototype.toString.call(t),"date");if(C(t))return l(t)}var v="",y=!1,b=["{","}"];if(h(t)&&(y=!0,b=["[","]"]),T(t)){var _=t.name?": "+t.name:"";v=" [Function"+_+"]"}if(w(t)&&(v=" "+RegExp.prototype.toString.call(t)),S(t)&&(v=" "+Date.prototype.toUTCString.call(t)),C(t)&&(v=" "+l(t)),0===a.length&&(!y||0==t.length))return b[0]+v+b[1];if(r<0)return w(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var E;return E=y?p(e,t,r,m,a):a.map(function(n){return f(e,t,r,m,n,y)}),e.seen.pop(),d(E,v,b)}function c(e,t){if(_(t))return e.stylize("undefined","undefined");if(x(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i){for(var o=[],a=0,s=t.length;a-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),_(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function h(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function v(e){return null==e}function y(e){return"number"==typeof e}function x(e){return"string"==typeof e}function b(e){return"symbol"===("undefined"==typeof e?"undefined":F(e))}function _(e){return void 0===e}function w(e){return E(e)&&"[object RegExp]"===A(e)}function E(e){return"object"===("undefined"==typeof e?"undefined":F(e))&&null!==e}function S(e){return E(e)&&"[object Date]"===A(e)}function C(e){return E(e)&&("[object Error]"===A(e)||e instanceof Error)}function T(e){return"function"==typeof e}function D(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===("undefined"==typeof e?"undefined":F(e))||"undefined"==typeof e}function A(e){return Object.prototype.toString.call(e)}function P(e){return e<10?"0"+e.toString(10):e.toString(10)}function k(){var e=new Date,t=[P(e.getHours()),P(e.getMinutes()),P(e.getSeconds())].join(":");return[e.getDate(),R[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O=/%[sdj%]/g;n.format=function(e){if(!x(e)){for(var t=[],n=0;n=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=t.range[1]}function y(e){return"=>"===e.value&&"Punctuator"===e.type}function x(e){return","===e.value&&"Punctuator"===e.type}function b(e){return";"===e.value&&"Punctuator"===e.type}function _(e){return":"===e.value&&"Punctuator"===e.type}function w(e){return"("===e.value&&"Punctuator"===e.type}function E(e){return")"===e.value&&"Punctuator"===e.type}function S(e){return"["===e.value&&"Punctuator"===e.type}function C(e){return"]"===e.value&&"Punctuator"===e.type}function T(e){return"{"===e.value&&"Punctuator"===e.type}function D(e){return"}"===e.value&&"Punctuator"===e.type}function A(e){return"Line"===e.type||"Block"===e.type||"Shebang"===e.type}function P(e){return"Keyword"===e.type}function k(e,t){return e.id?t.getTokenAfter(e.id,w):t.getFirstToken(e,w)}function I(){return new RegExp(W.source,"g")}var F=e("esutils"),O=e("espree"),N=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/,j=/^(?:DoWhile|For|ForIn|ForOf|While)Statement$/,R=/Array$/,L=/^(?:every|filter|find|findIndex|forEach|map|some)$/,M=/^(?:bind|call|apply)$/,B=/^(?:(?:Do)?While|For(?:In|Of)?|Switch)Statement$/,U=/^[\s*]*@this/m,V=/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/,G=new Set(["\r\n","\r","\n","\u2028","\u2029"]),W=/\r\n|[\r\n\u2028\u2029]/,Q=/^#!([^\r\n]+)/,H=new Set(["Program","BlockStatement","SwitchCase"]);t.exports={COMMENTS_IGNORE_PATTERN:V,LINEBREAKS:G,LINEBREAK_MATCHER:W,SHEBANG_MATCHER:Q,STATEMENT_LIST_PARENTS:H,isTokenOnSameLine:function(e,t){return e.loc.end.line===t.loc.start.line},isNullOrUndefined:l,isCallee:p,isES5Constructor:o,getUpperFunction:a,isFunction:s,isLoop:u,isInLoop:c,isArrayFromMethod:d,isParenthesised:v,createGlobalLinebreakMatcher:I,isArrowToken:y,isClosingBraceToken:D,isClosingBracketToken:C,isClosingParenToken:E,isColonToken:_,isCommaToken:x,isCommentToken:A,isKeywordToken:P,isNotClosingBraceToken:m(D),isNotClosingBracketToken:m(C),isNotClosingParenToken:m(E),isNotColonToken:m(_),isNotCommaToken:m(x),isNotOpeningBraceToken:m(T),isNotOpeningBracketToken:m(S),isNotOpeningParenToken:m(w),isNotSemicolonToken:m(b),isOpeningBraceToken:T,isOpeningBracketToken:S,isOpeningParenToken:w,isSemicolonToken:b,isStringLiteral:function(e){return"Literal"===e.type&&"string"==typeof e.value||"TemplateLiteral"===e.type},isBreakableStatement:function(e){return B.test(e.type)},getLabel:function(e){return"LabeledStatement"===e.parent.type?e.parent.label.name:null},getModifyingReferences:function(e){return e.filter(r)},isSurroundedBy:function(e,t){return e[0]===t&&e[e.length-1]===t},isDirectiveComment:function(e){var t=e.value.trim();return"Line"===e.type&&0===t.indexOf("eslint-")||"Block"===e.type&&(0===t.indexOf("global ")||0===t.indexOf("eslint ")||0===t.indexOf("eslint-"))},getTrailingStatement:F.ast.trailingStatement,getVariableByName:function(e,t){for(var n=e;n;){var r=n.set.get(t);if(r)return r;n=n.upper}return null},isDefaultThisBinding:function(e,t){if(o(e)||g(e,t))return!1;for(var n=null===e.id;e;){var r=e.parent;switch(r.type){case"LogicalExpression":case"ConditionalExpression":e=r;break;case"ReturnStatement":var s=a(r);if(null===s||!p(s))return!0;e=s.parent;break;case"Property":case"MethodDefinition":return r.value!==e;case"AssignmentExpression":case"AssignmentPattern":if(r.right===e){if("MemberExpression"===r.left.type)return!1;if(n&&"Identifier"===r.left.type&&i(r.left.name))return!1}return!0;case"VariableDeclarator":return!(n&&r.init===e&&"Identifier"===r.id.type&&i(r.id.name));case"MemberExpression":return r.object!==e||"Identifier"!==r.property.type||!M.test(r.property.name)||!p(r)||0===r.parent.arguments.length||l(r.parent.arguments[0]);case"CallExpression":return f(r.callee)?3!==r.arguments.length||r.arguments[0]!==e||l(r.arguments[1]):d(r.callee)?3!==r.arguments.length||r.arguments[1]!==e||l(r.arguments[2]):!h(r.callee)||(2!==r.arguments.length||r.arguments[0]!==e||l(r.arguments[1]));default:return!0}}return!0},getPrecedence:function(e){switch(e.type){case"SequenceExpression":return 0;case"AssignmentExpression":case"ArrowFunctionExpression":case"YieldExpression":return 1;case"ConditionalExpression":return 3;case"LogicalExpression":switch(e.operator){case"||":return 4;case"&&":return 5}case"BinaryExpression":switch(e.operator){case"|":return 6;case"^":return 7;case"&":return 8;case"==":case"!=":case"===":case"!==":return 9;case"<":case"<=":case">":case">=":case"in":case"instanceof":return 10;case"<<":case">>":case">>>":return 11;case"+":case"-":return 12;case"*":case"/":case"%":return 13;case"**":return 15}case"UnaryExpression":case"AwaitExpression":return 16;case"UpdateExpression":return 17;case"CallExpression":return"FunctionExpression"===e.callee.type?-1:18;case"NewExpression":return 19}return 20},isEmptyBlock:function(e){return Boolean(e&&"BlockStatement"===e.type&&0===e.body.length)},isEmptyFunction:function(e){return s(e)&&t.exports.isEmptyBlock(e.body)},getStaticPropertyName:function(e){var t=void 0;switch(e&&e.type){case"Property":case"MethodDefinition":t=e.key;break;case"MemberExpression":t=e.property}switch(t&&t.type){case"Literal":return String(t.value);case"TemplateLiteral":if(0===t.expressions.length&&1===t.quasis.length)return t.quasis[0].value.cooked;break;case"Identifier":if(!e.computed)return t.name}return null},getDirectivePrologue:function(e){var t=[];if("Program"===e.type||"FunctionDeclaration"===e.type||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type){var n="Program"===e.type?e.body:e.body.body,r=!0,i=!1,o=void 0;try{for(var a,s=n[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;if("ExpressionStatement"!==u.type||"Literal"!==u.expression.type)break;t.push(u)}}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}}return t},isDecimalInteger:function(e){return"Literal"===e.type&&"number"==typeof e.value&&/^(0|[1-9]\d*)$/.test(e.raw)},getFunctionNameWithKind:function(e){var n=e.parent,r=[];if("MethodDefinition"===n.type&&n.static&&r.push("static"),e.async&&r.push("async"),e.generator&&r.push("generator"),"ArrowFunctionExpression"===e.type)r.push("arrow","function");else if("Property"===n.type||"MethodDefinition"===n.type){if("constructor"===n.kind)return"constructor";"get"===n.kind?r.push("getter"):"set"===n.kind?r.push("setter"):r.push("method")}else r.push("function");if(e.id)r.push("'"+e.id.name+"'");else{var i=t.exports.getStaticPropertyName(n);i&&r.push("'"+i+"'")}return r.join(" ")},getFunctionHeadLoc:function(e,t){var n=e.parent,r=null,i=null;if("ArrowFunctionExpression"===e.type){var o=t.getTokenBefore(e.body,y);r=o.loc.start,i=o.loc.end}else"Property"===n.type||"MethodDefinition"===n.type?(r=n.loc.start,i=k(e,t).loc.start):(r=e.loc.start,i=k(e,t).loc.start);return{start:Object.assign({},r),end:Object.assign({},i)}},getParenthesisedText:function(e,t){for(var n=e.getFirstToken(t),r=e.getLastToken(t);e.getTokenBefore(n)&&"Punctuator"===e.getTokenBefore(n).type&&"("===e.getTokenBefore(n).value&&e.getTokenAfter(r)&&"Punctuator"===e.getTokenAfter(r).type&&")"===e.getTokenAfter(r).value;)n=e.getTokenBefore(n),r=e.getTokenAfter(r);return e.getText().slice(n.range[0],r.range[1])},couldBeError:function(e){switch(e.type){case"Identifier":case"CallExpression":case"NewExpression":case"MemberExpression":case"TaggedTemplateExpression":case"YieldExpression":case"AwaitExpression":return!0;case"AssignmentExpression":return t.exports.couldBeError(e.right);case"SequenceExpression":var n=e.expressions;return 0!==n.length&&t.exports.couldBeError(n[n.length-1]);case"LogicalExpression":return t.exports.couldBeError(e.left)||t.exports.couldBeError(e.right);case"ConditionalExpression":return t.exports.couldBeError(e.consequent)||t.exports.couldBeError(e.alternate);default:return!1}},isNullLiteral:function(e){return"Literal"===e.type&&null===e.value&&!e.regex},canTokensBeAdjacent:function(e,t){var n=void 0;if("string"==typeof e){var r=O.tokenize(e,{ecmaVersion:2015});n=r[r.length-1]}else n=e;var i="string"==typeof t?O.tokenize(t,{ecmaVersion:2015})[0]:t;if("Punctuator"===n.type||"Punctuator"===i.type){if("Punctuator"===n.type&&"Punctuator"===i.type){var o=new Set(["+","++"]),a=new Set(["-","--"]);return!(o.has(n.value)&&o.has(i.value)||a.has(n.value)&&a.has(i.value))}return!0}return"String"===n.type||"String"===i.type||"Template"===n.type||"Template"===i.type||!("Numeric"===n.type||"Numeric"!==i.type||!i.value.startsWith("."))}}},{espree:"espree",esutils:11}],23:[function(e,t,n){"use strict";t.exports=function(){var t=Object.create(null);return t["accessor-pairs"]=e("./rules/accessor-pairs"),t["array-bracket-newline"]=e("./rules/array-bracket-newline"),t["array-bracket-spacing"]=e("./rules/array-bracket-spacing"),t["array-callback-return"]=e("./rules/array-callback-return"),t["array-element-newline"]=e("./rules/array-element-newline"),t["arrow-body-style"]=e("./rules/arrow-body-style"),t["arrow-parens"]=e("./rules/arrow-parens"),t["arrow-spacing"]=e("./rules/arrow-spacing"),t["block-scoped-var"]=e("./rules/block-scoped-var"),t["block-spacing"]=e("./rules/block-spacing"),t["brace-style"]=e("./rules/brace-style"),t["callback-return"]=e("./rules/callback-return"),t.camelcase=e("./rules/camelcase"),t["capitalized-comments"]=e("./rules/capitalized-comments"),t["class-methods-use-this"]=e("./rules/class-methods-use-this"),t["comma-dangle"]=e("./rules/comma-dangle"),t["comma-spacing"]=e("./rules/comma-spacing"),t["comma-style"]=e("./rules/comma-style"),t.complexity=e("./rules/complexity"),t["computed-property-spacing"]=e("./rules/computed-property-spacing"),t["consistent-return"]=e("./rules/consistent-return"),t["consistent-this"]=e("./rules/consistent-this"),t["constructor-super"]=e("./rules/constructor-super"),t.curly=e("./rules/curly"),t["default-case"]=e("./rules/default-case"),t["dot-location"]=e("./rules/dot-location"),t["dot-notation"]=e("./rules/dot-notation"),t["eol-last"]=e("./rules/eol-last"),t.eqeqeq=e("./rules/eqeqeq"),t["for-direction"]=e("./rules/for-direction"),t["func-call-spacing"]=e("./rules/func-call-spacing"),t["func-name-matching"]=e("./rules/func-name-matching"),t["func-names"]=e("./rules/func-names"),t["func-style"]=e("./rules/func-style"),t["generator-star-spacing"]=e("./rules/generator-star-spacing"),t["global-require"]=e("./rules/global-require"),t["guard-for-in"]=e("./rules/guard-for-in"),t["handle-callback-err"]=e("./rules/handle-callback-err"),t["id-blacklist"]=e("./rules/id-blacklist"),t["id-length"]=e("./rules/id-length"),t["id-match"]=e("./rules/id-match"),t["indent-legacy"]=e("./rules/indent-legacy"),t.indent=e("./rules/indent"),t["init-declarations"]=e("./rules/init-declarations"),t["jsx-quotes"]=e("./rules/jsx-quotes"),t["key-spacing"]=e("./rules/key-spacing"),t["keyword-spacing"]=e("./rules/keyword-spacing"),t["line-comment-position"]=e("./rules/line-comment-position"),t["linebreak-style"]=e("./rules/linebreak-style"),t["lines-around-comment"]=e("./rules/lines-around-comment"),t["lines-around-directive"]=e("./rules/lines-around-directive"),t["max-depth"]=e("./rules/max-depth"),t["max-len"]=e("./rules/max-len"),t["max-lines"]=e("./rules/max-lines"),t["max-nested-callbacks"]=e("./rules/max-nested-callbacks"),t["max-params"]=e("./rules/max-params"),t["max-statements-per-line"]=e("./rules/max-statements-per-line"),t["max-statements"]=e("./rules/max-statements"),t["multiline-ternary"]=e("./rules/multiline-ternary"),t["new-cap"]=e("./rules/new-cap"),t["new-parens"]=e("./rules/new-parens"),t["newline-after-var"]=e("./rules/newline-after-var"),t["newline-before-return"]=e("./rules/newline-before-return"),t["newline-per-chained-call"]=e("./rules/newline-per-chained-call"),t["no-alert"]=e("./rules/no-alert"),t["no-array-constructor"]=e("./rules/no-array-constructor"),t["no-await-in-loop"]=e("./rules/no-await-in-loop"),t["no-bitwise"]=e("./rules/no-bitwise"),t["no-buffer-constructor"]=e("./rules/no-buffer-constructor"),t["no-caller"]=e("./rules/no-caller"),t["no-case-declarations"]=e("./rules/no-case-declarations"),t["no-catch-shadow"]=e("./rules/no-catch-shadow"),t["no-class-assign"]=e("./rules/no-class-assign"),t["no-compare-neg-zero"]=e("./rules/no-compare-neg-zero"), t["no-cond-assign"]=e("./rules/no-cond-assign"),t["no-confusing-arrow"]=e("./rules/no-confusing-arrow"),t["no-console"]=e("./rules/no-console"),t["no-const-assign"]=e("./rules/no-const-assign"),t["no-constant-condition"]=e("./rules/no-constant-condition"),t["no-continue"]=e("./rules/no-continue"),t["no-control-regex"]=e("./rules/no-control-regex"),t["no-debugger"]=e("./rules/no-debugger"),t["no-delete-var"]=e("./rules/no-delete-var"),t["no-div-regex"]=e("./rules/no-div-regex"),t["no-dupe-args"]=e("./rules/no-dupe-args"),t["no-dupe-class-members"]=e("./rules/no-dupe-class-members"),t["no-dupe-keys"]=e("./rules/no-dupe-keys"),t["no-duplicate-case"]=e("./rules/no-duplicate-case"),t["no-duplicate-imports"]=e("./rules/no-duplicate-imports"),t["no-else-return"]=e("./rules/no-else-return"),t["no-empty-character-class"]=e("./rules/no-empty-character-class"),t["no-empty-function"]=e("./rules/no-empty-function"),t["no-empty-pattern"]=e("./rules/no-empty-pattern"),t["no-empty"]=e("./rules/no-empty"),t["no-eq-null"]=e("./rules/no-eq-null"),t["no-eval"]=e("./rules/no-eval"),t["no-ex-assign"]=e("./rules/no-ex-assign"),t["no-extend-native"]=e("./rules/no-extend-native"),t["no-extra-bind"]=e("./rules/no-extra-bind"),t["no-extra-boolean-cast"]=e("./rules/no-extra-boolean-cast"),t["no-extra-label"]=e("./rules/no-extra-label"),t["no-extra-parens"]=e("./rules/no-extra-parens"),t["no-extra-semi"]=e("./rules/no-extra-semi"),t["no-fallthrough"]=e("./rules/no-fallthrough"),t["no-floating-decimal"]=e("./rules/no-floating-decimal"),t["no-func-assign"]=e("./rules/no-func-assign"),t["no-global-assign"]=e("./rules/no-global-assign"),t["no-implicit-coercion"]=e("./rules/no-implicit-coercion"),t["no-implicit-globals"]=e("./rules/no-implicit-globals"),t["no-implied-eval"]=e("./rules/no-implied-eval"),t["no-inline-comments"]=e("./rules/no-inline-comments"),t["no-inner-declarations"]=e("./rules/no-inner-declarations"),t["no-invalid-regexp"]=e("./rules/no-invalid-regexp"),t["no-invalid-this"]=e("./rules/no-invalid-this"),t["no-irregular-whitespace"]=e("./rules/no-irregular-whitespace"),t["no-iterator"]=e("./rules/no-iterator"),t["no-label-var"]=e("./rules/no-label-var"),t["no-labels"]=e("./rules/no-labels"),t["no-lone-blocks"]=e("./rules/no-lone-blocks"),t["no-lonely-if"]=e("./rules/no-lonely-if"),t["no-loop-func"]=e("./rules/no-loop-func"),t["no-magic-numbers"]=e("./rules/no-magic-numbers"),t["no-mixed-operators"]=e("./rules/no-mixed-operators"),t["no-mixed-requires"]=e("./rules/no-mixed-requires"),t["no-mixed-spaces-and-tabs"]=e("./rules/no-mixed-spaces-and-tabs"),t["no-multi-assign"]=e("./rules/no-multi-assign"),t["no-multi-spaces"]=e("./rules/no-multi-spaces"),t["no-multi-str"]=e("./rules/no-multi-str"),t["no-multiple-empty-lines"]=e("./rules/no-multiple-empty-lines"),t["no-native-reassign"]=e("./rules/no-native-reassign"),t["no-negated-condition"]=e("./rules/no-negated-condition"),t["no-negated-in-lhs"]=e("./rules/no-negated-in-lhs"),t["no-nested-ternary"]=e("./rules/no-nested-ternary"),t["no-new-func"]=e("./rules/no-new-func"),t["no-new-object"]=e("./rules/no-new-object"),t["no-new-require"]=e("./rules/no-new-require"),t["no-new-symbol"]=e("./rules/no-new-symbol"),t["no-new-wrappers"]=e("./rules/no-new-wrappers"),t["no-new"]=e("./rules/no-new"),t["no-obj-calls"]=e("./rules/no-obj-calls"),t["no-octal-escape"]=e("./rules/no-octal-escape"),t["no-octal"]=e("./rules/no-octal"),t["no-param-reassign"]=e("./rules/no-param-reassign"),t["no-path-concat"]=e("./rules/no-path-concat"),t["no-plusplus"]=e("./rules/no-plusplus"),t["no-process-env"]=e("./rules/no-process-env"),t["no-process-exit"]=e("./rules/no-process-exit"),t["no-proto"]=e("./rules/no-proto"),t["no-prototype-builtins"]=e("./rules/no-prototype-builtins"),t["no-redeclare"]=e("./rules/no-redeclare"),t["no-regex-spaces"]=e("./rules/no-regex-spaces"),t["no-restricted-globals"]=e("./rules/no-restricted-globals"),t["no-restricted-imports"]=e("./rules/no-restricted-imports"),t["no-restricted-modules"]=e("./rules/no-restricted-modules"),t["no-restricted-properties"]=e("./rules/no-restricted-properties"),t["no-restricted-syntax"]=e("./rules/no-restricted-syntax"),t["no-return-assign"]=e("./rules/no-return-assign"),t["no-return-await"]=e("./rules/no-return-await"),t["no-script-url"]=e("./rules/no-script-url"),t["no-self-assign"]=e("./rules/no-self-assign"),t["no-self-compare"]=e("./rules/no-self-compare"),t["no-sequences"]=e("./rules/no-sequences"),t["no-shadow-restricted-names"]=e("./rules/no-shadow-restricted-names"),t["no-shadow"]=e("./rules/no-shadow"),t["no-spaced-func"]=e("./rules/no-spaced-func"),t["no-sparse-arrays"]=e("./rules/no-sparse-arrays"),t["no-sync"]=e("./rules/no-sync"),t["no-tabs"]=e("./rules/no-tabs"),t["no-template-curly-in-string"]=e("./rules/no-template-curly-in-string"),t["no-ternary"]=e("./rules/no-ternary"),t["no-this-before-super"]=e("./rules/no-this-before-super"),t["no-throw-literal"]=e("./rules/no-throw-literal"),t["no-trailing-spaces"]=e("./rules/no-trailing-spaces"),t["no-undef-init"]=e("./rules/no-undef-init"),t["no-undef"]=e("./rules/no-undef"),t["no-undefined"]=e("./rules/no-undefined"),t["no-underscore-dangle"]=e("./rules/no-underscore-dangle"),t["no-unexpected-multiline"]=e("./rules/no-unexpected-multiline"),t["no-unmodified-loop-condition"]=e("./rules/no-unmodified-loop-condition"),t["no-unneeded-ternary"]=e("./rules/no-unneeded-ternary"),t["no-unreachable"]=e("./rules/no-unreachable"),t["no-unsafe-finally"]=e("./rules/no-unsafe-finally"),t["no-unsafe-negation"]=e("./rules/no-unsafe-negation"),t["no-unused-expressions"]=e("./rules/no-unused-expressions"),t["no-unused-labels"]=e("./rules/no-unused-labels"),t["no-unused-vars"]=e("./rules/no-unused-vars"),t["no-use-before-define"]=e("./rules/no-use-before-define"),t["no-useless-call"]=e("./rules/no-useless-call"),t["no-useless-computed-key"]=e("./rules/no-useless-computed-key"),t["no-useless-concat"]=e("./rules/no-useless-concat"),t["no-useless-constructor"]=e("./rules/no-useless-constructor"),t["no-useless-escape"]=e("./rules/no-useless-escape"),t["no-useless-rename"]=e("./rules/no-useless-rename"),t["no-useless-return"]=e("./rules/no-useless-return"),t["no-var"]=e("./rules/no-var"),t["no-void"]=e("./rules/no-void"),t["no-warning-comments"]=e("./rules/no-warning-comments"),t["no-whitespace-before-property"]=e("./rules/no-whitespace-before-property"),t["no-with"]=e("./rules/no-with"),t["nonblock-statement-body-position"]=e("./rules/nonblock-statement-body-position"),t["object-curly-newline"]=e("./rules/object-curly-newline"),t["object-curly-spacing"]=e("./rules/object-curly-spacing"),t["object-property-newline"]=e("./rules/object-property-newline"),t["object-shorthand"]=e("./rules/object-shorthand"),t["one-var-declaration-per-line"]=e("./rules/one-var-declaration-per-line"),t["one-var"]=e("./rules/one-var"),t["operator-assignment"]=e("./rules/operator-assignment"),t["operator-linebreak"]=e("./rules/operator-linebreak"),t["padded-blocks"]=e("./rules/padded-blocks"),t["padding-line-between-statements"]=e("./rules/padding-line-between-statements"),t["prefer-arrow-callback"]=e("./rules/prefer-arrow-callback"),t["prefer-const"]=e("./rules/prefer-const"),t["prefer-destructuring"]=e("./rules/prefer-destructuring"),t["prefer-numeric-literals"]=e("./rules/prefer-numeric-literals"),t["prefer-promise-reject-errors"]=e("./rules/prefer-promise-reject-errors"),t["prefer-reflect"]=e("./rules/prefer-reflect"),t["prefer-rest-params"]=e("./rules/prefer-rest-params"),t["prefer-spread"]=e("./rules/prefer-spread"),t["prefer-template"]=e("./rules/prefer-template"),t["quote-props"]=e("./rules/quote-props"),t.quotes=e("./rules/quotes"),t.radix=e("./rules/radix"),t["require-await"]=e("./rules/require-await"),t["require-jsdoc"]=e("./rules/require-jsdoc"),t["require-yield"]=e("./rules/require-yield"),t["rest-spread-spacing"]=e("./rules/rest-spread-spacing"),t["semi-spacing"]=e("./rules/semi-spacing"),t["semi-style"]=e("./rules/semi-style"),t.semi=e("./rules/semi"),t["sort-imports"]=e("./rules/sort-imports"),t["sort-keys"]=e("./rules/sort-keys"),t["sort-vars"]=e("./rules/sort-vars"),t["space-before-blocks"]=e("./rules/space-before-blocks"),t["space-before-function-paren"]=e("./rules/space-before-function-paren"),t["space-in-parens"]=e("./rules/space-in-parens"),t["space-infix-ops"]=e("./rules/space-infix-ops"),t["space-unary-ops"]=e("./rules/space-unary-ops"),t["spaced-comment"]=e("./rules/spaced-comment"),t.strict=e("./rules/strict"),t["switch-colon-spacing"]=e("./rules/switch-colon-spacing"),t["symbol-description"]=e("./rules/symbol-description"),t["template-curly-spacing"]=e("./rules/template-curly-spacing"),t["template-tag-spacing"]=e("./rules/template-tag-spacing"),t["unicode-bom"]=e("./rules/unicode-bom"),t["use-isnan"]=e("./rules/use-isnan"),t["valid-jsdoc"]=e("./rules/valid-jsdoc"),t["valid-typeof"]=e("./rules/valid-typeof"),t["vars-on-top"]=e("./rules/vars-on-top"),t["wrap-iife"]=e("./rules/wrap-iife"),t["wrap-regex"]=e("./rules/wrap-regex"),t["yield-star-spacing"]=e("./rules/yield-star-spacing"),t.yoda=e("./rules/yoda"),t}},{"./rules/accessor-pairs":25,"./rules/array-bracket-newline":26,"./rules/array-bracket-spacing":27,"./rules/array-callback-return":28,"./rules/array-element-newline":29,"./rules/arrow-body-style":30,"./rules/arrow-parens":31,"./rules/arrow-spacing":32,"./rules/block-scoped-var":33,"./rules/block-spacing":34,"./rules/brace-style":35,"./rules/callback-return":36,"./rules/camelcase":37,"./rules/capitalized-comments":38,"./rules/class-methods-use-this":39,"./rules/comma-dangle":40,"./rules/comma-spacing":41,"./rules/comma-style":42,"./rules/complexity":43,"./rules/computed-property-spacing":44,"./rules/consistent-return":45,"./rules/consistent-this":46,"./rules/constructor-super":47,"./rules/curly":48,"./rules/default-case":49,"./rules/dot-location":50,"./rules/dot-notation":51,"./rules/eol-last":52,"./rules/eqeqeq":53,"./rules/for-direction":54,"./rules/func-call-spacing":55,"./rules/func-name-matching":56,"./rules/func-names":57,"./rules/func-style":58,"./rules/generator-star-spacing":59,"./rules/global-require":60,"./rules/guard-for-in":61,"./rules/handle-callback-err":62,"./rules/id-blacklist":63,"./rules/id-length":64,"./rules/id-match":65,"./rules/indent":67,"./rules/indent-legacy":66,"./rules/init-declarations":68,"./rules/jsx-quotes":69,"./rules/key-spacing":70,"./rules/keyword-spacing":71,"./rules/line-comment-position":72,"./rules/linebreak-style":73,"./rules/lines-around-comment":74,"./rules/lines-around-directive":75,"./rules/max-depth":76,"./rules/max-len":77,"./rules/max-lines":78,"./rules/max-nested-callbacks":79,"./rules/max-params":80,"./rules/max-statements":82,"./rules/max-statements-per-line":81,"./rules/multiline-ternary":83,"./rules/new-cap":84,"./rules/new-parens":85,"./rules/newline-after-var":86,"./rules/newline-before-return":87,"./rules/newline-per-chained-call":88,"./rules/no-alert":89,"./rules/no-array-constructor":90,"./rules/no-await-in-loop":91,"./rules/no-bitwise":92,"./rules/no-buffer-constructor":93,"./rules/no-caller":94,"./rules/no-case-declarations":95,"./rules/no-catch-shadow":96,"./rules/no-class-assign":97,"./rules/no-compare-neg-zero":98,"./rules/no-cond-assign":99,"./rules/no-confusing-arrow":100,"./rules/no-console":101,"./rules/no-const-assign":102,"./rules/no-constant-condition":103,"./rules/no-continue":104,"./rules/no-control-regex":105,"./rules/no-debugger":106,"./rules/no-delete-var":107,"./rules/no-div-regex":108,"./rules/no-dupe-args":109,"./rules/no-dupe-class-members":110,"./rules/no-dupe-keys":111,"./rules/no-duplicate-case":112,"./rules/no-duplicate-imports":113,"./rules/no-else-return":114,"./rules/no-empty":118,"./rules/no-empty-character-class":115,"./rules/no-empty-function":116,"./rules/no-empty-pattern":117,"./rules/no-eq-null":119,"./rules/no-eval":120,"./rules/no-ex-assign":121,"./rules/no-extend-native":122,"./rules/no-extra-bind":123,"./rules/no-extra-boolean-cast":124,"./rules/no-extra-label":125,"./rules/no-extra-parens":126,"./rules/no-extra-semi":127,"./rules/no-fallthrough":128,"./rules/no-floating-decimal":129,"./rules/no-func-assign":130,"./rules/no-global-assign":131,"./rules/no-implicit-coercion":132,"./rules/no-implicit-globals":133,"./rules/no-implied-eval":134,"./rules/no-inline-comments":135,"./rules/no-inner-declarations":136,"./rules/no-invalid-regexp":137,"./rules/no-invalid-this":138,"./rules/no-irregular-whitespace":139,"./rules/no-iterator":140,"./rules/no-label-var":141,"./rules/no-labels":142,"./rules/no-lone-blocks":143,"./rules/no-lonely-if":144,"./rules/no-loop-func":145,"./rules/no-magic-numbers":146,"./rules/no-mixed-operators":147,"./rules/no-mixed-requires":148,"./rules/no-mixed-spaces-and-tabs":149,"./rules/no-multi-assign":150,"./rules/no-multi-spaces":151,"./rules/no-multi-str":152,"./rules/no-multiple-empty-lines":153,"./rules/no-native-reassign":154,"./rules/no-negated-condition":155,"./rules/no-negated-in-lhs":156,"./rules/no-nested-ternary":157,"./rules/no-new":163,"./rules/no-new-func":158,"./rules/no-new-object":159,"./rules/no-new-require":160,"./rules/no-new-symbol":161,"./rules/no-new-wrappers":162,"./rules/no-obj-calls":164,"./rules/no-octal":166,"./rules/no-octal-escape":165,"./rules/no-param-reassign":167,"./rules/no-path-concat":168,"./rules/no-plusplus":169,"./rules/no-process-env":170,"./rules/no-process-exit":171,"./rules/no-proto":172,"./rules/no-prototype-builtins":173,"./rules/no-redeclare":174,"./rules/no-regex-spaces":175,"./rules/no-restricted-globals":176,"./rules/no-restricted-imports":177,"./rules/no-restricted-modules":178,"./rules/no-restricted-properties":179,"./rules/no-restricted-syntax":180,"./rules/no-return-assign":181,"./rules/no-return-await":182,"./rules/no-script-url":183,"./rules/no-self-assign":184,"./rules/no-self-compare":185,"./rules/no-sequences":186,"./rules/no-shadow":188,"./rules/no-shadow-restricted-names":187,"./rules/no-spaced-func":189,"./rules/no-sparse-arrays":190,"./rules/no-sync":191,"./rules/no-tabs":192,"./rules/no-template-curly-in-string":193,"./rules/no-ternary":194,"./rules/no-this-before-super":195,"./rules/no-throw-literal":196,"./rules/no-trailing-spaces":197,"./rules/no-undef":199,"./rules/no-undef-init":198,"./rules/no-undefined":200,"./rules/no-underscore-dangle":201,"./rules/no-unexpected-multiline":202,"./rules/no-unmodified-loop-condition":203,"./rules/no-unneeded-ternary":204,"./rules/no-unreachable":205,"./rules/no-unsafe-finally":206,"./rules/no-unsafe-negation":207,"./rules/no-unused-expressions":208,"./rules/no-unused-labels":209,"./rules/no-unused-vars":210,"./rules/no-use-before-define":211,"./rules/no-useless-call":212,"./rules/no-useless-computed-key":213,"./rules/no-useless-concat":214,"./rules/no-useless-constructor":215,"./rules/no-useless-escape":216,"./rules/no-useless-rename":217,"./rules/no-useless-return":218,"./rules/no-var":219,"./rules/no-void":220,"./rules/no-warning-comments":221,"./rules/no-whitespace-before-property":222,"./rules/no-with":223,"./rules/nonblock-statement-body-position":224,"./rules/object-curly-newline":225,"./rules/object-curly-spacing":226,"./rules/object-property-newline":227,"./rules/object-shorthand":228,"./rules/one-var":230,"./rules/one-var-declaration-per-line":229,"./rules/operator-assignment":231,"./rules/operator-linebreak":232,"./rules/padded-blocks":233,"./rules/padding-line-between-statements":234,"./rules/prefer-arrow-callback":235,"./rules/prefer-const":236,"./rules/prefer-destructuring":237,"./rules/prefer-numeric-literals":238,"./rules/prefer-promise-reject-errors":239,"./rules/prefer-reflect":240,"./rules/prefer-rest-params":241,"./rules/prefer-spread":242,"./rules/prefer-template":243,"./rules/quote-props":244,"./rules/quotes":245,"./rules/radix":246,"./rules/require-await":247,"./rules/require-jsdoc":248,"./rules/require-yield":249,"./rules/rest-spread-spacing":250,"./rules/semi":253,"./rules/semi-spacing":251,"./rules/semi-style":252,"./rules/sort-imports":254,"./rules/sort-keys":255,"./rules/sort-vars":256,"./rules/space-before-blocks":257,"./rules/space-before-function-paren":258,"./rules/space-in-parens":259,"./rules/space-infix-ops":260,"./rules/space-unary-ops":261,"./rules/spaced-comment":262,"./rules/strict":263,"./rules/switch-colon-spacing":264,"./rules/symbol-description":265,"./rules/template-curly-spacing":266,"./rules/template-tag-spacing":267,"./rules/unicode-bom":268,"./rules/use-isnan":269,"./rules/valid-jsdoc":270,"./rules/valid-typeof":271,"./rules/vars-on-top":272,"./rules/wrap-iife":273,"./rules/wrap-regex":274,"./rules/yield-star-spacing":275,"./rules/yoda":276}],24:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n=p.minItems||p.multiline&&u.length>0&&h.loc.start.line!==m.loc.end.line;y?(r.isTokenOnSameLine(f,g)&&a(t,f),r.isTokenOnSameLine(v,d)&&s(t,d)):(r.isTokenOnSameLine(f,g)||i(t,f),r.isTokenOnSameLine(v,d)||o(t,d))}var c=e.getSourceCode();return{ArrayPattern:u,ArrayExpression:u}}}},{"../ast-utils":22}],27:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing inside array brackets",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{singleValue:{type:"boolean"},objectsInArrays:{type:"boolean"},arraysInArrays:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){return!!e.options[1]&&e.options[1][t]===!l}function n(t,n){e.report({node:t,loc:n.loc.start,message:"There should be no space after '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){var t=p.getTokenAfter(n);return e.removeRange([n.range[1],t.range[0]])}})}function i(t,n){e.report({node:t,loc:n.loc.start,message:"There should be no space before '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){var t=p.getTokenBefore(n);return e.removeRange([t.range[1],n.range[0]])}})}function o(t,n){e.report({node:t,loc:n.loc.start,message:"A space is required after '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){return e.insertTextAfter(n," ")}})}function a(t,n){e.report({node:t,loc:n.loc.start,message:"A space is required before '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){return e.insertTextBefore(n," ")}})}function s(e){return e&&("ObjectExpression"===e.type||"ObjectPattern"===e.type)}function u(e){return e&&("ArrayExpression"===e.type||"ArrayPattern"===e.type)}function c(e){if(!f.spaced||0!==e.elements.length){var t=p.getFirstToken(e),c=p.getFirstToken(e,1),l=e.typeAnnotation?p.getTokenBefore(e.typeAnnotation):p.getLastToken(e),d=p.getTokenBefore(l),h=e.elements[0],m=e.elements[e.elements.length-1],g=f.objectsInArraysException&&s(h)||f.arraysInArraysException&&u(h)||f.singleElementException&&1===e.elements.length?!f.spaced:f.spaced,v=f.objectsInArraysException&&s(m)||f.arraysInArraysException&&u(m)||f.singleElementException&&1===e.elements.length?!f.spaced:f.spaced;r.isTokenOnSameLine(t,c)&&(g&&!p.isSpaceBetweenTokens(t,c)&&o(e,t),!g&&p.isSpaceBetweenTokens(t,c)&&n(e,t)),t!==d&&r.isTokenOnSameLine(d,l)&&(v&&!p.isSpaceBetweenTokens(d,l)&&a(e,l),!v&&p.isSpaceBetweenTokens(d,l)&&i(e,l))}}var l="always"===e.options[0],p=e.getSourceCode(),f={spaced:l,singleElementException:t("singleValue"),objectsInArraysException:t("objectsInArrays"),arraysInArraysException:t("arraysInArrays")};return{ArrayPattern:c,ArrayExpression:c}}}},{"../ast-utils":22}],28:[function(e,t,n){"use strict";function r(e){return e.reachable}function i(e,t){return"ArrowFunctionExpression"===e.type?t.getTokenBefore(e.body):e.id||e}function o(e){return"MemberExpression"===e.type&&l.test(u.getStaticPropertyName(e)||"")}function a(e){for(;e;){var t=e.parent;switch(t.type){case"LogicalExpression":case"ConditionalExpression":e=t;break;case"ReturnStatement":var n=u.getUpperFunction(t);if(null===n||!u.isCallee(n))return!1;e=n.parent;break;case"CallExpression":return u.isArrayFromMethod(t.callee)?t.arguments.length>=2&&t.arguments[1]===e:!!o(t.callee)&&(t.arguments.length>=1&&t.arguments[0]===e);default:return!1}}return!1}var s=e("lodash"),u=e("../ast-utils"),c=/^(?:Arrow)?FunctionExpression$/,l=/^(?:every|filter|find(?:Index)?|map|reduce(?:Right)?|some|sort)$/;t.exports={meta:{docs:{description:"enforce `return` statements in callbacks of array methods",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(t){n.shouldCheck&&n.codePath.currentSegments.some(r)&&e.report({node:t,loc:i(t,e.getSourceCode()).loc.start,message:n.hasReturn?"Expected to return a value at the end of {{name}}.":"Expected to return a value in {{name}}.",data:{name:u.getFunctionNameWithKind(n.node)}})}var n={upper:null,codePath:null,hasReturn:!1,shouldCheck:!1,node:null};return{onCodePathStart:function(e,t){n={upper:n,codePath:e,hasReturn:!1,shouldCheck:c.test(t.type)&&"BlockStatement"===t.body.type&&a(t)&&!t.async&&!t.generator,node:t}},onCodePathEnd:function(){n=n.upper},ReturnStatement:function(t){n.shouldCheck&&(n.hasReturn=!0,t.argument||e.report({node:t,message:"{{name}} expected a return value.",data:{name:s.upperFirst(u.getFunctionNameWithKind(n.node))}}))},"FunctionExpression:exit":t,"ArrowFunctionExpression:exit":t}}}},{"../ast-utils":22,lodash:16}],29:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce line breaks after each array element",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}]},create:function(e){function t(e){var t=!1,n=void 0;return e=e||"always","always"===e||0===e.minItems?n=0:"never"===e?n=Number.POSITIVE_INFINITY:(t=Boolean(e.multiline),n=e.minItems||Number.POSITIVE_INFINITY),{multiline:t,minItems:n}}function n(e){var n=t(e);return{ArrayExpression:n,ArrayPattern:n}}function i(t){var n=s.getTokenBefore(t,{includeComments:!0});e.report({loc:{start:n.loc.end,end:t.loc.start},message:"There should be no linebreak here.",fix:function(e){if(r.isCommentToken(n))return null;if(!r.isTokenOnSameLine(n,t))return e.replaceTextRange([n.range[1],t.range[0]]," ");var i=s.getTokenBefore(n,{includeComments:!0});return r.isCommentToken(i)?null:e.replaceTextRange([i.range[1],n.range[0]],"")}})}function o(t){var n=s.getTokenBefore(t,{includeComments:!0});e.report({loc:{start:n.loc.end,end:t.loc.start},message:"There should be a linebreak after this element.",fix:function(e){return e.replaceTextRange([n.range[1],t.range[0]],"\n")}})}function a(t){var a=t.elements,u=n(e.options[0]),c=u[t.type],l=!1;c.multiline&&(l=a.filter(function(e){return null!==e}).some(function(e){return e.loc.start.line!==e.loc.end.line}));var p=a.length>=c.minItems||c.multiline&&l;a.forEach(function(e,t){var n=a[t-1];if(0!==t&&null!==e&&null!==n){var u=s.getFirstTokenBetween(n,e,r.isCommaToken),c=s.getTokenBefore(u),l=s.getTokenAfter(u);p?r.isTokenOnSameLine(c,l)&&o(l):r.isTokenOnSameLine(c,l)||i(l)}})}var s=e.getSourceCode();return{ArrayPattern:a,ArrayExpression:a}}}},{"../ast-utils":22}],30:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require braces around arrow function bodies",category:"ECMAScript 6",recommended:!1},schema:{anyOf:[{type:"array",items:[{enum:["always","never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["as-needed"]},{type:"object",properties:{requireReturnForObjectLiteral:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code"},create:function(e){function t(t){var n=t.body;if("BlockStatement"===n.type){var c=n.body;if(1!==c.length&&!a)return;if(o&&s&&"ReturnStatement"===c[0].type&&c[0].argument&&"ObjectExpression"===c[0].argument.type)return;(a||o&&"ReturnStatement"===c[0].type)&&e.report({node:t,loc:n.loc.start,message:"Unexpected block statement surrounding arrow body.",fix:function(e){if(1!==c.length||"ReturnStatement"!==c[0].type||!c[0].argument)return null;var t=u.getText(),i=u.getFirstToken(c[0]),o=u.getTokenAfter(i),a=u.getLastToken(c[0]);r.isSemicolonToken(a)&&(a=u.getTokenBefore(a));var s=u.getTokenAfter(n);if(s&&"Punctuator"===s.type&&/^[([\/`+-]/.test(s.value))return null;var l=t.slice(n.range[0]+1,i.range[0]),p=t.slice(i.range[1],o.range[0]),f=t.slice(o.range[0],a.range[1]),d=r.isOpeningBraceToken(o)?"("+f+")":f,h=t.slice(a.range[1],c[0].range[1]-1),m=t.slice(c[0].range[1],n.range[1]-1);return e.replaceText(n,(l+p).replace(/^\s*$/,"")+d+(h+m).replace(/^\s*$/,""))}})}else(i||o&&s&&"ObjectExpression"===n.type)&&e.report({node:t,loc:n.loc.start,message:"Expected block statement surrounding arrow body.",fix:function(e){var i=u.getLastTokenBetween(u.getFirstToken(t),n,r.isNotOpeningParenToken),o=u.getTokenAfter(i);return e.replaceTextRange([o.range[0],t.range[1]],"{return "+u.getText().slice(o.range[0],t.range[1])+"}")}})}var n=e.options,i="always"===n[0],o=!n[0]||"as-needed"===n[0],a="never"===n[0],s=n[1]&&n[1].requireReturnForObjectLiteral,u=e.getSourceCode();return{ArrowFunctionExpression:t}}}},{"../ast-utils":22}],31:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require parentheses around arrow function arguments",category:"ECMAScript 6",recommended:!1},fixable:"code",schema:[{enum:["always","as-needed"]},{type:"object",properties:{requireForBlockBody:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){function l(e){var t=c.getTokenAfter(f),n=c.getTokenAfter(t),r=p?c.getTokenBefore(f):null,i=r&&r.end===f.start;return e.replaceTextRange([f.range[0],n.range[1]],""+(i?" ":"")+t.value)}var p=t.async,f=c.getFirstToken(t,p?1:0);if(u&&1===t.params.length&&"Identifier"===t.params[0].type&&!t.params[0].typeAnnotation&&"BlockStatement"!==t.body.type&&!t.returnType)return void(r.isOpeningParenToken(f)&&e.report({node:t,message:a,fix:l}));if(u&&"BlockStatement"===t.body.type)return void(r.isOpeningParenToken(f)||e.report({node:t,message:s,fix:function(e){return e.replaceText(f,"("+f.value+")")}}));if(o&&1===t.params.length&&"Identifier"===t.params[0].type&&!t.params[0].typeAnnotation&&!t.returnType)return void(r.isOpeningParenToken(f)&&e.report({node:t,message:i,fix:l}));if("Identifier"===f.type){var d=c.getTokenAfter(f);")"!==d.value&&e.report({node:t,message:n,fix:function(e){return e.replaceText(f,"("+f.value+")")}})}}var n="Expected parentheses around arrow function argument.",i="Unexpected parentheses around single function argument.",o="as-needed"===e.options[0],a="Unexpected parentheses around single function argument having a body with no curly braces",s="Expected parentheses around arrow function argument having a body with curly braces.",u=o&&e.options[1]&&e.options[1].requireForBlockBody===!0,c=e.getSourceCode();return{ArrowFunctionExpression:t}}}},{"../ast-utils":22}],32:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing before and after the arrow in arrow functions",category:"ECMAScript 6",recommended:!1},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){var t=s.getTokenBefore(e.body,r.isArrowToken);return{before:s.getTokenBefore(t),arrow:t,after:s.getTokenAfter(t)}}function n(e){var t=e.arrow.range[0]-e.before.range[1],n=e.after.range[0]-e.arrow.range[1];return{before:t,after:n}}function i(r){var i=t(r),a=n(i);o.before?0===a.before&&e.report({node:i.before,message:"Missing space before =>.",fix:function(e){return e.insertTextBefore(i.arrow," ")}}):a.before>0&&e.report({node:i.before,message:"Unexpected space before =>.",fix:function(e){return e.removeRange([i.before.range[1],i.arrow.range[0]])}}),o.after?0===a.after&&e.report({node:i.after,message:"Missing space after =>.",fix:function(e){return e.insertTextAfter(i.arrow," ")}}):a.after>0&&e.report({node:i.after,message:"Unexpected space after =>.",fix:function(e){return e.removeRange([i.arrow.range[1],i.after.range[0]])}})}var o={before:!0,after:!0 },a=e.options[0]||{};o.before=a.before!==!1,o.after=a.after!==!1;var s=e.getSourceCode();return{ArrowFunctionExpression:i}}}},{"../ast-utils":22}],33:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce the use of variables within the scope they are defined",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(e){o.push(e.range)}function n(){o.pop()}function r(t){var n=t.identifier;e.report({node:n,message:"'{{name}}' used outside of binding context.",data:{name:n.name}})}function i(t){function n(e){var t=e.identifier.range;return t[0]i[1]}if("var"===t.kind)for(var i=o[o.length-1],a=e.getDeclaredVariables(t),s=0;s0?s.getTokenBefore(e.cases[0]):s.getLastToken(e,1):s.getFirstToken(e)}function n(e,t){return!r.isTokenOnSameLine(e,t)||s.isSpaceBetweenTokens(e,t)===o}function i(r){var i=t(r),u=s.getLastToken(r),c=s.getTokenAfter(i,{includeComments:!0}),l=s.getTokenBefore(u,{includeComments:!0});"Punctuator"===i.type&&"{"===i.value&&"Punctuator"===u.type&&"}"===u.value&&c!==u&&(o||"Line"!==c.type)&&(n(i,c)||e.report({node:r,loc:i.loc.start,message:"{{message}} after '{'.",data:{message:a},fix:function(e){return o?e.insertTextBefore(c," "):e.removeRange([i.range[1],c.range[0]])}}),n(l,u)||e.report({node:r,loc:u.loc.start,message:"{{message}} before '}'.",data:{message:a},fix:function(e){return o?e.insertTextAfter(l," "):e.removeRange([l.range[1],u.range[0]])}}))}var o="never"!==e.options[0],a=o?"Requires a space":"Unexpected space(s)",s=e.getSourceCode();return{BlockStatement:i,SwitchStatement:i}}}},{"../ast-utils":22}],35:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent brace style for blocks",category:"Stylistic Issues",recommended:!1},schema:[{enum:["1tbs","stroustrup","allman"]},{type:"object",properties:{allowSingleLine:{type:"boolean"}},additionalProperties:!1}],fixable:"whitespace"},create:function(e){function t(e,t){var n=[e.range[1],t.range[0]],r=s.text.slice(n[0],n[1]);return r.trim()?null:function(e){return e.replaceTextRange(n," ")}}function n(n,i){var p=s.getTokenBefore(n),d=s.getTokenAfter(n),h=s.getTokenBefore(i),m=a.allowSingleLine&&r.isTokenOnSameLine(n,i);"allman"===o||r.isTokenOnSameLine(p,n)||e.report({node:n,message:u,fix:t(p,n)}),"allman"===o&&r.isTokenOnSameLine(p,n)&&!m&&e.report({node:n,message:c,fix:function(e){return e.insertTextBefore(n,"\n")}}),r.isTokenOnSameLine(n,d)&&d!==i&&!m&&e.report({node:n,message:l,fix:function(e){return e.insertTextAfter(n,"\n")}}),h!==n&&!m&&r.isTokenOnSameLine(h,i)&&e.report({node:i,message:f,fix:function(e){return e.insertTextBefore(i,"\n")}})}function i(n){var i=s.getTokenAfter(n);"1tbs"!==o||r.isTokenOnSameLine(n,i)||e.report({node:n,message:p,fix:t(n,i)}),"1tbs"!==o&&r.isTokenOnSameLine(n,i)&&e.report({node:n,message:d,fix:function(e){return e.insertTextAfter(n,"\n")}})}var o=e.options[0]||"1tbs",a=e.options[1]||{},s=e.getSourceCode(),u="Opening curly brace does not appear on the same line as controlling statement.",c="Opening curly brace appears on the same line as controlling statement.",l="Statement inside of curly braces should be on next line.",p="Closing curly brace does not appear on the same line as the subsequent block.",f="Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",d="Closing curly brace appears on the same line as the subsequent block.";return{BlockStatement:function(e){r.STATEMENT_LIST_PARENTS.has(e.parent.type)||n(s.getFirstToken(e),s.getLastToken(e))},ClassBody:function(e){n(s.getFirstToken(e),s.getLastToken(e))},SwitchStatement:function(e){var t=s.getLastToken(e),r=s.getTokenBefore(e.cases.length?e.cases[0]:t);n(r,t)},IfStatement:function(e){"BlockStatement"===e.consequent.type&&e.alternate&&i(s.getLastToken(e.consequent))},TryStatement:function(e){i(s.getLastToken(e.block)),e.handler&&e.finalizer&&i(s.getLastToken(e.handler.body))}}}}},{"../ast-utils":22}],36:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require `return` statements after callbacks",category:"Node.js and CommonJS",recommended:!1},schema:[{type:"array",items:{type:"string"}}]},create:function(e){function t(e,n){return e.parent?n.indexOf(e.parent.type)===-1?t(e.parent,n):e.parent:null}function n(e){if("Identifier"===e.type)return!0;if("MemberExpression"===e.type){if("Identifier"===e.object.type)return!0;if("MemberExpression"===e.object.type)return n(e.object)}return!1}function r(e){return n(e.callee)&&o.indexOf(a.getText(e.callee))>-1}function i(e,t){return!(!t||"ExpressionStatement"!==t.type)&&(t.expression===e||("BinaryExpression"===t.expression.type||"LogicalExpression"===t.expression.type)&&t.expression.right===e)}var o=e.options[0]||["callback","cb","next"],a=e.getSourceCode();return{CallExpression:function(n){if(r(n)){var o=t(n,["BlockStatement","ReturnStatement","ArrowFunctionExpression"])||{};if("ReturnStatement"!==o.type&&"ArrowFunctionExpression"!==o.type){if("BlockStatement"===o.type){var a=o.body[o.body.length-1];if(i(n,a)){var s=o.parent.type;if("FunctionExpression"===s||"FunctionDeclaration"===s||"ArrowFunctionExpression"===s)return}if("ReturnStatement"===a.type&&i(n,o.body[o.body.length-2]))return}t(n,["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"])&&e.report({node:n,message:"Expected return with your callback function."})}}}}}}},{}],37:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce camelcase naming convention",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{properties:{enum:["always","never"]}},additionalProperties:!1}]},create:function(e){function t(e){return e.indexOf("_")>-1&&e!==e.toUpperCase()}function n(t){r.indexOf(t)<0&&(r.push(t),e.report({node:t,message:"Identifier '{{name}}' is not in camel case.",data:{name:t.name}}))}var r=[],i=new Set(["CallExpression","NewExpression"]),o=e.options[0]||{},a=o.properties||"";return"always"!==a&&"never"!==a&&(a="always"),{Identifier:function(e){var r=e.name.replace(/^_+|_+$/g,""),o="MemberExpression"===e.parent.type?e.parent.parent:e.parent;if("MemberExpression"===e.parent.type){if("never"===a)return;"Identifier"===e.parent.object.type&&e.parent.object.name===e.name&&t(r)?n(e):"AssignmentExpression"===o.type&&t(r)&&("MemberExpression"!==o.right.type||"MemberExpression"===o.left.type&&o.left.property.name===e.name)&&n(e)}else if("Property"===e.parent.type){if("never"===a)return;if(e.parent.parent&&"ObjectPattern"===e.parent.parent.type&&e.parent.key===e&&e.parent.value!==e)return;t(r)&&!i.has(o.type)&&n(e)}else["ImportSpecifier","ImportNamespaceSpecifier","ImportDefaultSpecifier"].indexOf(e.parent.type)>=0?e.parent.local&&e.parent.local.name===e.name&&t(r)&&n(e):t(r)&&!i.has(o.type)&&n(e)}}}}},{}],38:[function(e,t,n){"use strict";function r(e,t){return e?Object.assign({},d,e[t]||e):Object.assign({},d)}function i(e){return{Line:r(e,"line"),Block:r(e,"block")}}function o(e){Object.keys(e).forEach(function(t){var n=e[t].ignorePattern;if(n){var r=RegExp("^\\s*(?:"+n+")");e[t].ignorePatternRegExp=r}})}var a=e("../util/patterns/letters"),s=e("../ast-utils"),u="Comments should not begin with a lowercase character",c="Comments should not begin with an uppercase character",l=s.COMMENTS_IGNORE_PATTERN,p=/\s/g,f=/^\s*[^:\/?#\s]+:\/\/[^?#]/,d={ignorePattern:null,ignoreInlineComments:!1,ignoreConsecutiveComments:!1},h={type:"object",properties:{ignorePattern:{type:"string"},ignoreInlineComments:{type:"boolean"},ignoreConsecutiveComments:{type:"boolean"}},additionalProperties:!1};t.exports={meta:{docs:{description:"enforce or disallow capitalization of the first letter of a comment",category:"Stylistic Issues",recommended:!1},fixable:"code",schema:[{enum:["always","never"]},{oneOf:[h,{type:"object",properties:{line:h,block:h},additionalProperties:!1}]}]},create:function(e){function t(e){var t=m.getTokenBefore(e,{includeComments:!0}),n=m.getTokenAfter(e,{includeComments:!0});return Boolean(t&&n&&e.loc.start.line===t.loc.end.line&&e.loc.end.line===n.loc.start.line)}function n(e){var t=m.getTokenBefore(e,{includeComments:!0});return Boolean(t&&["Block","Line"].indexOf(t.type)!==-1)}function r(e,r){if(l.test(e.value))return!0;var i=e.value.replace(/\*/g,"");if(r.ignorePatternRegExp&&r.ignorePatternRegExp.test(i))return!0;if(r.ignoreInlineComments&&t(e))return!0;if(r.ignoreConsecutiveComments&&n(e))return!0;if(f.test(i))return!0;var o=i.replace(p,"");if(0===o.length)return!0;var s=o[0];if(!a.test(s))return!0;var u=s!==s.toLocaleLowerCase(),c=s!==s.toLocaleUpperCase();return("always"!==d||!c)&&("never"!==d||!u)}function s(t){var n=h[t.type],i=r(t,n);if(!i){var o="always"===d?u:c;e.report({node:null,loc:t.loc,message:o,fix:function(e){var n=t.value.match(a);return e.replaceTextRange([t.range[0]+n.index+2,t.range[0]+n.index+3],"always"===d?n[0].toLocaleUpperCase():n[0].toLocaleLowerCase())}})}}var d=e.options[0]||"always",h=i(e.options[1]),m=e.getSourceCode();return o(h),{Program:function(){var e=m.getAllComments();e.filter(function(e){return"Shebang"!==e.type}).forEach(s)}}}}},{"../ast-utils":22,"../util/patterns/letters":279}],39:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce that class methods utilize `this`",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{exceptMethods:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},create:function(e){function t(){u.push(!1)}function n(e){return!e.static&&"constructor"!==e.kind&&"MethodDefinition"===e.type}function r(e){return n(e)&&!s.has(e.key.name)}function i(t){var n=u.pop();r(t.parent)&&!n&&e.report({node:t,message:"Expected 'this' to be used by class method '{{classMethod}}'.",data:{classMethod:t.parent.key.name}})}function o(){u.length&&(u[u.length-1]=!0)}var a=e.options[0]?Object.assign({},e.options[0]):{},s=new Set(a.exceptMethods||[]),u=[];return{FunctionDeclaration:t,"FunctionDeclaration:exit":i,FunctionExpression:t,"FunctionExpression:exit":i,ThisExpression:o,Super:o}}}},{}],40:[function(e,t,n){"use strict";function r(e){return!("RestElement"===e.type||"RestProperty"===e.type||"ExperimentalRestProperty"===e.type)}function i(e){return"string"==typeof e?{arrays:e,objects:e,imports:e,exports:e,functions:"ignore"}:"object"===("undefined"==typeof e?"undefined":o(e))&&null!==e?{arrays:e.arrays||u.arrays,objects:e.objects||u.objects,imports:e.imports||u.imports,exports:e.exports||u.exports,functions:e.functions||u.functions}:u}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=e("lodash"),s=e("../ast-utils"),u=Object.freeze({arrays:"never",objects:"never",imports:"never",exports:"never",functions:"ignore"});t.exports={meta:{docs:{description:"require or disallow trailing commas",category:"Stylistic Issues",recommended:!1},fixable:"code",schema:[{defs:{value:{enum:["always","always-multiline","only-multiline","never"]},valueWithIgnore:{anyOf:[{$ref:"#/defs/value"},{enum:["ignore"]}]}},anyOf:[{$ref:"#/defs/value"},{type:"object",properties:{arrays:{$refs:"#/defs/valueWithIgnore"},objects:{$refs:"#/defs/valueWithIgnore"},imports:{$refs:"#/defs/valueWithIgnore"},exports:{$refs:"#/defs/valueWithIgnore"},functions:{$refs:"#/defs/valueWithIgnore"}},additionalProperties:!1}]}]},create:function(e){function t(e){switch(e.type){case"ObjectExpression":case"ObjectPattern":return a.last(e.properties);case"ArrayExpression":case"ArrayPattern":return a.last(e.elements);case"ImportDeclaration":case"ExportNamedDeclaration":return a.last(e.specifiers);case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":return a.last(e.params);case"CallExpression":case"NewExpression":return a.last(e.arguments);default:return null}}function n(e,t){switch(e.type){case"ObjectExpression":case"ArrayExpression":case"CallExpression":case"NewExpression":return d.getLastToken(e,1);default:var n=d.getTokenAfter(t);return s.isCommaToken(n)?n:d.getLastToken(t)}}function o(e){var r=t(e);if(!r)return!1;var i=n(e,r),o=d.getTokenAfter(i);return o.loc.end.line!==i.loc.end.line}function u(r){var i=t(r);if(i&&("ImportDeclaration"!==r.type||"ImportSpecifier"===i.type)){var o=n(r,i);s.isCommaToken(o)&&e.report({node:i,loc:o.loc.start,message:h,fix:function(e){return e.remove(o)}})}}function c(i){var o=t(i);if(o&&("ImportDeclaration"!==i.type||"ImportSpecifier"===o.type)){if(!r(o))return void u(i);var a=n(i,o);","!==a.value&&e.report({node:o,loc:a.loc.end,message:m,fix:function(e){return e.insertTextAfter(a,",")}})}}function l(e){o(e)?c(e):u(e)}function p(e){o(e)||u(e)}var f=i(e.options[0]),d=e.getSourceCode(),h="Unexpected trailing comma.",m="Missing trailing comma.",g={always:c,"always-multiline":l,"only-multiline":p,never:u,ignore:a.noop};return{ObjectExpression:g[f.objects],ObjectPattern:g[f.objects],ArrayExpression:g[f.arrays],ArrayPattern:g[f.arrays],ImportDeclaration:g[f.imports],ExportNamedDeclaration:g[f.exports],FunctionDeclaration:g[f.functions],FunctionExpression:g[f.functions],ArrowFunctionExpression:g[f.functions],CallExpression:g[f.functions],NewExpression:g[f.functions]}}}},{"../ast-utils":22,lodash:16}],41:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing before and after commas",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t,n,r){e.report({node:t,fix:function(e){if(s[n])return"before"===n?e.insertTextBefore(t," "):e.insertTextAfter(t," ");var i=void 0,o=void 0,a="";return"before"===n?(i=r.range[1],o=t.range[0]):(i=t.range[1],o=r.range[0]),e.replaceTextRange([i,o],a)},message:s[n]?"A space is required {{dir}} ','.":"There should be no space {{dir}} ','.",data:{dir:n}})}function n(e,n){e.left&&r.isTokenOnSameLine(e.left,e.comma)&&s.before!==o.isSpaceBetweenTokens(e.left,e.comma)&&t(n,"before",e.left),e.right&&!s.after&&"Line"===e.right.type||e.right&&r.isTokenOnSameLine(e.comma,e.right)&&s.after!==o.isSpaceBetweenTokens(e.comma,e.right)&&t(n,"after",e.right)}function i(e){var t=o.getFirstToken(e);e.elements.forEach(function(e){var n=void 0;null===e?(n=o.getTokenAfter(t),r.isCommaToken(n)&&u.push(n)):n=o.getTokenAfter(e),t=n})}var o=e.getSourceCode(),a=o.tokensAndComments,s={before:!!e.options[0]&&!!e.options[0].before,after:!e.options[0]||!!e.options[0].after},u=[];return{"Program:exit":function(){a.forEach(function(e,t){if(r.isCommaToken(e)&&(!e||"JSXText"!==e.type)){var i=a[t-1],o=a[t+1];n({comma:e,left:r.isCommaToken(i)||u.indexOf(e)>-1?null:i,right:r.isCommaToken(o)?null:o},e)}})},ArrayExpression:i,ArrayPattern:i}}}},{"../ast-utils":22}],42:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent comma style",category:"Stylistic Issues",recommended:!1},fixable:"code",schema:[{enum:["first","last"]},{type:"object",properties:{exceptions:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}]},create:function(e){function t(e,t){switch(e){case"between":return","+t.replace("\n","");case"first":return t+",";case"last":return","+t;default:return""}}function n(e,n,r,i){var o=s.text.slice(n.range[1],r.range[0])+s.text.slice(r.range[1],i.range[0]),a=[n.range[1],i.range[0]];return function(n){return n.replaceTextRange(a,t(e,o))}}function i(t,i,o,s){r.isTokenOnSameLine(i,o)&&r.isTokenOnSameLine(t,i)||(r.isTokenOnSameLine(i,o)||r.isTokenOnSameLine(t,i)?"first"!==a||r.isTokenOnSameLine(i,o)?"last"===a&&r.isTokenOnSameLine(i,o)&&e.report({node:s,loc:{line:i.loc.end.line,column:i.loc.end.column},message:"',' should be placed last.",fix:n(a,t,i,o)}):e.report({node:s,message:"',' should be placed first.",fix:n(a,t,i,o)}):e.report({node:s,loc:{line:i.loc.end.line,column:i.loc.start.column},message:"Bad line breaking before and after ','.",fix:n("between",t,i,o)}))}function o(e,t){var n=e[t],o="ArrayExpression"===e.type||"ArrayPattern"===e.type;if(n.length>1||o){var a=s.getFirstToken(e);if(n.forEach(function(e){var t=e?s.getTokenBefore(e):a,n=e?s.getFirstToken(e):s.getTokenAfter(t),o=e||n,u=s.getTokenBefore(t);if(u&&r.isClosingParenToken(u)&&(a=u),r.isCommaToken(t)&&i(a,t,n,o),e){var c=s.getTokenAfter(e,r.isNotClosingParenToken);a=c?s.getTokenBefore(c):s.ast.tokens[s.ast.tokens.length-1]}}),o){var u=s.getLastToken(e),c=s.getTokenBefore(u);r.isCommaToken(c)&&i(s.getTokenBefore(c),c,u,u)}}}var a=e.options[0]||"last",s=e.getSourceCode(),u={ArrayPattern:!0,ArrowFunctionExpression:!0,CallExpression:!0,FunctionDeclaration:!0,FunctionExpression:!0,ImportDeclaration:!0,ObjectPattern:!0};if(2===e.options.length&&e.options[1].hasOwnProperty("exceptions"))for(var c=Object.keys(e.options[1].exceptions),l=0;ll&&e.report({node:t,message:"{{name}} has a complexity of {{complexity}}.",data:{name:n,complexity:r}})}function a(){p.length&&p[p.length-1]++}function s(e){e.test&&a()}function u(e){"||"===e.operator&&a()}var c=e.options[0],l=20;"object"===("undefined"==typeof c?"undefined":r(c))&&c.hasOwnProperty("maximum")&&"number"==typeof c.maximum&&(l=c.maximum),"object"===("undefined"==typeof c?"undefined":r(c))&&c.hasOwnProperty("max")&&"number"==typeof c.max&&(l=c.max),"number"==typeof c&&(l=c);var p=[];return{FunctionDeclaration:t,FunctionExpression:t,ArrowFunctionExpression:t,"FunctionDeclaration:exit":n,"FunctionExpression:exit":n,"ArrowFunctionExpression:exit":n,CatchClause:a,ConditionalExpression:a,LogicalExpression:u,ForStatement:a,ForInStatement:a,ForOfStatement:a,IfStatement:a,SwitchCase:s,WhileStatement:a,DoWhileStatement:a}}}},{"../ast-utils":22,lodash:16}],44:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing inside computed property brackets",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]}]},create:function(e){function t(t,n,r){e.report({node:t,loc:n.loc.start,message:"There should be no space after '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){return e.removeRange([n.range[1],r.range[0]])}})}function n(t,n,r){e.report({node:t,loc:n.loc.start,message:"There should be no space before '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){return e.removeRange([r.range[1],n.range[0]])}})}function i(t,n){e.report({node:t,loc:n.loc.start,message:"A space is required after '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){return e.insertTextAfter(n," ")}})}function o(t,n){e.report({node:t,loc:n.loc.start,message:"A space is required before '{{tokenValue}}'.",data:{tokenValue:n.value},fix:function(e){return e.insertTextBefore(n," ")}})}function a(e){return function(a){if(a.computed){var c=a[e],l=s.getTokenBefore(c),p=s.getFirstToken(c),f=s.getLastToken(c),d=s.getTokenAfter(c);r.isTokenOnSameLine(l,p)&&(u?!s.isSpaceBetweenTokens(l,p)&&r.isTokenOnSameLine(l,p)&&i(a,l):s.isSpaceBetweenTokens(l,p)&&t(a,l,p)),r.isTokenOnSameLine(f,d)&&(u?!s.isSpaceBetweenTokens(f,d)&&r.isTokenOnSameLine(f,d)&&o(a,d):s.isSpaceBetweenTokens(f,d)&&n(a,d,f))}}}var s=e.getSourceCode(),u="always"===e.options[0];return{Property:a("key"),MemberExpression:a("property")}}}},{"../ast-utils":22}],45:[function(e,t,n){"use strict";function r(e,t){return"Identifier"===e.type&&e.name===t}function i(e){return!e.reachable}function o(e){return"FunctionExpression"===e.type&&e.parent&&"MethodDefinition"===e.parent.type&&"constructor"===e.parent.kind}var a=e("lodash"),s=e("../ast-utils");t.exports={meta:{docs:{description:"require `return` statements to either always or never specify values",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{treatUndefinedAsUnspecified:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){var n=void 0,r=void 0;!c.hasReturnValue||c.codePath.currentSegments.every(i)||s.isES5Constructor(t)||o(t)||("Program"===t.type?(n={line:1,column:0},r="program"):n="ArrowFunctionExpression"===t.type?e.getSourceCode().getTokenBefore(t.body,s.isArrowToken).loc.start:"MethodDefinition"===t.parent.type||"Property"===t.parent.type&&t.parent.method?t.parent.key.loc.start:(t.id||t).loc.start,r||(r=s.getFunctionNameWithKind(t)),e.report({node:t,loc:n,message:"Expected to return a value at the end of {{name}}.",data:{name:r}}))}var n=e.options[0]||{},u=n.treatUndefinedAsUnspecified===!0,c=null;return{onCodePathStart:function(e,t){c={upper:c,codePath:e,hasReturn:!1,hasReturnValue:!1,message:"",node:t}},onCodePathEnd:function(){c=c.upper},ReturnStatement:function(t){var n=t.argument,i=Boolean(n);u&&i&&(i=!r(n,"undefined")&&"void"!==n.operator),c.hasReturn?c.hasReturnValue!==i&&e.report({node:t,message:c.message,data:c.data}):(c.hasReturn=!0,c.hasReturnValue=i,c.message="{{name}} expected {{which}} return value.",c.data={name:"Program"===c.node.type?"Program":a.upperFirst(s.getFunctionNameWithKind(c.node)),which:i?"a":"no"})},"Program:exit":t,"FunctionDeclaration:exit":t,"FunctionExpression:exit":t,"ArrowFunctionExpression:exit":t}}}},{"../ast-utils":22,lodash:16}],46:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce consistent naming when capturing the current execution context",category:"Stylistic Issues",recommended:!1},schema:{type:"array",items:{type:"string",minLength:1},uniqueItems:!0}},create:function(e){function t(t,n){e.report({node:t,message:"Designated alias '{{alias}}' is not assigned to 'this'.",data:{alias:n}})}function n(n,r,i){var a="ThisExpression"===i.type;o.indexOf(r)!==-1?(!a||n.operator&&"="!==n.operator)&&t(n,r):a&&e.report({node:n,message:"Unexpected alias '{{name}}' for 'this'.",data:{name:r}})}function r(e,n){var r=n.set.get(e);r&&(r.defs.some(function(e){return"VariableDeclarator"===e.node.type&&null!==e.node.init})||r.references.some(function(e){var t=e.writeExpr;return e.from===n&&t&&"ThisExpression"===t.type&&"="===t.parent.operator})||r.defs.map(function(e){return e.node}).forEach(function(n){t(n,e)}))}function i(){var t=e.getScope();o.forEach(function(e){r(e,t)})}var o=[];return 0===e.options.length?o.push("that"):o=e.options,{"Program:exit":i,"FunctionExpression:exit":i,"FunctionDeclaration:exit":i,VariableDeclarator:function(e){var t=e.id,r="ArrayPattern"===t.type||"ObjectPattern"===t.type;null===e.init||r||n(e,t.name,e.init)},AssignmentExpression:function(e){"Identifier"===e.left.type&&n(e,e.left.name,e.right)}}}}},{}],47:[function(e,t,n){"use strict";function r(e){return e.reachable}function i(e){return"FunctionExpression"===e.type&&"MethodDefinition"===e.parent.type&&"constructor"===e.parent.kind}function o(e){if(!e)return!1;switch(e.type){case"ClassExpression":case"FunctionExpression":case"ThisExpression":case"MemberExpression":case"CallExpression":case"NewExpression":case"YieldExpression":case"TaggedTemplateExpression":case"MetaProperty":return!0;case"Identifier":return"undefined"!==e.name;case"AssignmentExpression":return o(e.right);case"LogicalExpression":return o(e.left)||o(e.right);case"ConditionalExpression":return o(e.alternate)||o(e.consequent);case"SequenceExpression":var t=e.expressions[e.expressions.length-1];return o(t);default:return!1}}t.exports={meta:{docs:{description:"require `super()` calls in constructors",category:"ECMAScript 6",recommended:!0},schema:[]},create:function(e){function t(e){return e.reachable&&s[e.id].calledInSomePaths}function n(e){return!(1!==e.nextSegments.length||!e.nextSegments[0].isLoopedPrevSegment(e))||e.reachable&&s[e.id].calledInEveryPaths}var a=null,s=Object.create(null);return{onCodePathStart:function(e,t){if(i(t)){var n=t.parent.parent.parent,r=n.superClass;a={upper:a,isConstructor:!0,hasExtends:Boolean(r),superIsConstructor:o(r),codePath:e}}else a={upper:a,isConstructor:!1,hasExtends:!1,superIsConstructor:!1,codePath:e}},onCodePathEnd:function(r,i){var o=a.hasExtends;if(a=a.upper,o){var s=r.returnedSegments,u=s.every(n),c=s.some(t);u||e.report({message:c?"Lacked a call of 'super()' in some code paths.":"Expected to call 'super()'.",node:i.parent})}},onCodePathSegmentStart:function(e){if(a&&a.isConstructor&&a.hasExtends){var r=s[e.id]={calledInSomePaths:!1,calledInEveryPaths:!1,validNodes:[]},i=e.prevSegments;i.length>0&&(r.calledInSomePaths=i.some(t),r.calledInEveryPaths=i.every(n))}},onCodePathSegmentLoop:function(r,i){if(a&&a.isConstructor&&a.hasExtends){var o=i.prevSegments.length>=2;a.codePath.traverseSegments({first:i,last:r},function(r){var i=s[r.id],a=r.prevSegments;if(i.calledInSomePaths=a.some(t),i.calledInEveryPaths=a.every(n),i.calledInSomePaths||o){var u=i.validNodes;i.validNodes=[];for(var c=0;c=2)return!0;for(e=e.consequent.body[0];e;){if("IfStatement"===e.type&&!e.alternate)return!0;e=r.getTrailingStatement(e)}}return!1}function s(t,n,r,i){e.report({node:t,loc:("else"!==r?t:o(t)).loc.start,message:"Expected { after '{{name}}'{{suffix}}.",data:{name:r,suffix:i?" "+i:""},fix:function(e){return e.replaceText(n,"{"+g.getText(n)+"}")}})}function u(e){var t=g.getTokenBefore(e),n=g.getTokenAfter(e),i=g.getNodeByRangeIndex(t.range[0]);return!r.isSemicolonToken(t)&&(!!n&&(("BlockStatement"!==i.type||"FunctionExpression"===i.parent.type||"ArrowFunctionExpression"===i.parent.type)&&(t.loc.end.line===n.loc.start.line||(!!/^[([\/`+-]/.test(n.value)||"Punctuator"===t.type&&("++"===t.value||"--"===t.value)))))}function c(t,n,i,a){e.report({node:t,loc:("else"!==i?t:o(t)).loc.start,message:"Unnecessary { after '{{name}}'{{suffix}}.",data:{name:i,suffix:a?" "+a:""},fix:function(e){var i="DoWhileStatement"===t.type&&g.getTokenBefore(n).end===n.start&&!r.canTokensBeAdjacent("do",g.getFirstToken(n,{skip:1})),o=g.getFirstToken(n),a=g.getLastToken(n),s=g.getTokenBefore(a);if(u(a))return null;var c=g.getText().slice(o.range[1],s.range[0])+g.getText(s)+g.getText().slice(s.range[1],a.range[0]);return e.replaceText(n,(i?" ":"")+c)}})}function l(e,r,i,o){var u="BlockStatement"===r.type,l=null;if("IfStatement"===e.type&&e.consequent===r&&a(e))l=!0;else if(f)u&&1===r.body.length&&(l=!1);else if(d)t(r)||(l=!0);else if(h)if(u&&1===r.body.length&&n(r.body[0])){var p=g.getCommentsBefore(r.body[0]);l=p.length>0}else n(r)||(l=!0);else l=!0;return{actual:u,expected:l,check:function(){null!==this.expected&&this.expected!==this.actual&&(this.expected?s(e,r,i,o):c(e,r,i,o))}}}function p(e){var t=[];do{if(t.push(l(e,e.consequent,"if","condition")),e.alternate&&"IfStatement"!==e.alternate.type){t.push(l(e,e.alternate,"else"));break}e=e.alternate}while(e);if(m){var n=t.some(function(e){return null!==e.expected?e.expected:e.actual});t.forEach(function(e){e.expected=n})}return t}var f="multi"===e.options[0],d="multi-line"===e.options[0],h="multi-or-nest"===e.options[0],m="consistent"===e.options[1],g=e.getSourceCode();return{IfStatement:function(e){"IfStatement"!==e.parent.type&&p(e).forEach(function(e){e.check()})},WhileStatement:function(e){l(e,e.body,"while","condition").check()},DoWhileStatement:function(e){l(e,e.body,"do").check()},ForStatement:function(e){l(e,e.body,"for","condition").check()},ForInStatement:function(e){l(e,e.body,"for-in").check()},ForOfStatement:function(e){l(e,e.body,"for-of").check()}}}}},{"../ast-utils":22}],49:[function(e,t,n){"use strict";var r=/^no default$/i;t.exports={meta:{docs:{description:"require `default` cases in `switch` statements",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{commentPattern:{type:"string"}},additionalProperties:!1}]},create:function(e){function t(e){return e[e.length-1]}var n=e.options[0]||{},i=n.commentPattern?new RegExp(n.commentPattern):r,o=e.getSourceCode();return{SwitchStatement:function(n){if(n.cases.length){var r=n.cases.some(function(e){return null===e.test});if(!r){var a=void 0,s=t(n.cases),u=o.getCommentsAfter(s);u.length&&(a=t(u)),a&&i.test(a.value.trim())||e.report({node:n,message:"Expected a default case." })}}}}}}},{}],50:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent newlines before and after dots",category:"Best Practices",recommended:!1},schema:[{enum:["object","property"]}],fixable:"code"},create:function(e){function t(t,n,i){var s=a.getTokenBefore(n),u=a.getText().slice(t.range[1],s.range[0]),c=a.getText().slice(s.range[1],n.range[0]);if("Punctuator"===s.type&&"."===s.value)if(o){if(!r.isTokenOnSameLine(t,s)){var l=r.isDecimalInteger(t)?" ":"";e.report({node:i,loc:s.loc.start,message:"Expected dot to be on same line as object.",fix:function(e){return e.replaceTextRange([t.range[1],n.range[0]],l+"."+u+c)}})}}else r.isTokenOnSameLine(s,n)||e.report({node:i,loc:s.loc.start,message:"Expected dot to be on same line as property.",fix:function(e){return e.replaceTextRange([t.range[1],n.range[0]],""+u+c+".")}})}function n(e){t(e.object,e.property,e)}var i=e.options[0],o="object"===i||!i,a=e.getSourceCode();return{MemberExpression:n}}}},{"../ast-utils":22}],51:[function(e,t,n){"use strict";var r=e("../ast-utils"),i=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,o=e("../util/keywords");t.exports={meta:{docs:{description:"enforce dot notation whenever possible",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{allowKeywords:{type:"boolean"},allowPattern:{type:"string"}},additionalProperties:!1}],fixable:"code"},create:function(e){var t=e.options[0]||{},n=void 0===t.allowKeywords||!!t.allowKeywords,a=e.getSourceCode(),s=void 0;return t.allowPattern&&(s=new RegExp(t.allowPattern)),{MemberExpression:function(t){t.computed&&"Literal"===t.property.type&&i.test(t.property.value)&&(n||o.indexOf(String(t.property.value))===-1)&&(s&&s.test(t.property.value)||e.report({node:t.property,message:"[{{propertyValue}}] is better written in dot notation.",data:{propertyValue:JSON.stringify(t.property.value)},fix:function(e){var n=a.getTokenAfter(t.object,r.isOpeningBracketToken),i=a.getLastToken(t);if(a.getFirstTokenBetween(n,i,{includeComments:!0,filter:r.isCommentToken}))return null;var o=a.getTokenAfter(i),s=o&&i.range[1]===o.range[0]&&!r.canTokensBeAdjacent(String(t.property.value),o),u=r.isDecimalInteger(t.object)?" ":"",c=s?" ":"";return e.replaceTextRange([n.range[0],i.range[1]],u+"."+t.property.value+c)}})),n||t.computed||o.indexOf(String(t.property.name))===-1||e.report({node:t.property,message:".{{propertyName}} is a syntax error.",data:{propertyName:t.property.name},fix:function(e){var n=a.getTokenBefore(t.property),r=a.text.slice(n.range[1],t.property.range[0]);return r.trim()?null:e.replaceTextRange([n.range[0],t.property.range[1]],"["+r+'"'+t.property.name+'"]')}})}}}}},{"../ast-utils":22,"../util/keywords":278}],52:[function(e,t,n){"use strict";var r=e("lodash");t.exports={meta:{docs:{description:"require or disallow newline at the end of files",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never","unix","windows"]}]},create:function(e){return{Program:function(t){var n=e.getSourceCode(),i=n.getText(),o={column:r.last(n.lines).length,line:n.lines.length},a="\n",s="\r"+a,u=r.endsWith(i,a),c=e.options[0]||"always",l=!1;"unix"===c&&(c="always"),"windows"===c&&(c="always",l=!0),"always"!==c||u?"never"===c&&u&&e.report({node:t,loc:o,message:"Newline not allowed at end of file.",fix:function(e){var t=/(?:\r?\n)+$/,r=t.exec(n.text),i=r.index,o=n.text.length;return e.replaceTextRange([i,o],"")}}):e.report({node:t,loc:o,message:"Newline required at end of file but not found.",fix:function(e){return e.insertTextAfterRange([0,i.length],l?s:a)}})}}}}},{lodash:16}],53:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("../ast-utils");t.exports={meta:{docs:{description:"require the use of `===` and `!==`",category:"Best Practices",recommended:!1},schema:{anyOf:[{type:"array",items:[{enum:["always"]},{type:"object",properties:{null:{enum:["always","never","ignore"]}},additionalProperties:!1}],additionalItems:!1},{type:"array",items:[{enum:["smart","allow-null"]}],additionalItems:!1}]},fixable:"code"},create:function(e){function t(e){return"UnaryExpression"===e.type&&"typeof"===e.operator}function n(e){return t(e.left)||t(e.right)}function o(e){return"Literal"===e.left.type&&"Literal"===e.right.type&&r(e.left.value)===r(e.right.value)}function a(e){return i.isNullLiteral(e.right)||i.isNullLiteral(e.left)}function s(e){var t=p.getTokenAfter(e.left);return{line:t.loc.start.line,column:t.loc.start.column}}function u(t,r){e.report({node:t,loc:s(t),message:"Expected '{{expectedOperator}}' and instead saw '{{actualOperator}}'.",data:{expectedOperator:r,actualOperator:t.operator},fix:function(e){if(n(t)||o(t)){var i=p.getFirstTokenBetween(t.left,t.right,function(e){return e.value===t.operator});return e.replaceText(i,r)}return null}})}var c=e.options[0]||"always",l=e.options[1]||{},p=e.getSourceCode(),f="always"===c?l.null||"always":"ignore",d="always"===f,h="never"===f;return{BinaryExpression:function(e){var t=a(e);return"=="!==e.operator&&"!="!==e.operator?void(h&&t&&u(e,e.operator.slice(0,-1))):void("smart"===c&&(n(e)||o(e)||t)||!d&&t||u(e,e.operator+"="))}}}}},{"../ast-utils":22}],54:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:'enforce "for" loop update clause moving the counter in the right direction.',category:"Possible Errors",recommended:!1},fixable:null,schema:[]},create:function(e){function t(t){e.report({node:t,message:"The update clause in this loop moves the variable in the wrong direction."})}function n(e,t){if("Identifier"===e.argument.type&&e.argument.name===t){if("++"===e.operator)return 1;if("--"===e.operator)return-1}return 0}function r(e,t){if(e.left.name===t){if("+="===e.operator)return 1;if("-="===e.operator)return-1}return 0}return{ForStatement:function(e){if(e.test&&"BinaryExpression"===e.test.type&&"Identifier"===e.test.left.type&&e.update){var i=e.test.left.name,o=e.test.operator,a=e.update;"<"===o||"<="===o?("UpdateExpression"===a.type&&n(a,i)<0&&t(e),"AssignmentExpression"===a.type&&r(a,i)<0&&t(e)):">"!==o&&">="!==o||("UpdateExpression"===a.type&&n(a,i)>0&&t(e),"AssignmentExpression"===a.type&&r(a,i)>0&&t(e))}}}}}},{}],55:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require or disallow spacing between function identifiers and their invocations",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always"]},{type:"object",properties:{allowNewlines:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]}},create:function(e){function t(t){var s=o.getLastToken(t),u=o.getLastToken(t.callee),c=o.getFirstTokenBetween(u,s,r.isOpeningParenToken),l=c&&o.getTokenBefore(c);if(c&&c.range[1]=6?s.keyword.isIdentifierES6(e):s.keyword.isIdentifierES5(e)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=e("../ast-utils"),s=e("esutils"),u={enum:["always","never"]},c={type:"object",properties:{includeCommonJSModuleExports:{type:"boolean"}},additionalProperties:!1};t.exports={meta:{docs:{description:"require function names to match the name of the variable or property to which they are assigned",category:"Stylistic Issues",recommended:!1},schema:{anyOf:[{type:"array",additionalItems:!1,items:[u,c]},{type:"array",additionalItems:!1,items:[c]}]}},create:function(e){function t(e,t){return"always"===c&&e!==t||"never"===c&&e===t}function n(t,n,r,i){var o=void 0;o="always"===c&&i?"Function name `{{funcName}}` should match property name `{{name}}`":"always"===c?"Function name `{{funcName}}` should match variable name `{{name}}`":i?"Function name `{{funcName}}` should not match property name `{{name}}`":"Function name `{{funcName}}` should not match variable name `{{name}}`",e.report({node:t,message:o,data:{name:n,funcName:r}})}function s(e){return"Literal"===e.type&&"string"==typeof e.value}var u=("object"===o(e.options[0])?e.options[0]:e.options[1])||{},c="string"==typeof e.options[0]?e.options[0]:"always",l=u.includeCommonJSModuleExports,p=e.parserOptions&&e.parserOptions.ecmaVersion?e.parserOptions.ecmaVersion:5;return{VariableDeclarator:function(e){e.init&&"FunctionExpression"===e.init.type&&"Identifier"===e.id.type&&e.init.id&&t(e.id.name,e.init.id.name)&&n(e,e.id.name,e.init.id.name,!1)},AssignmentExpression:function(e){if(!("FunctionExpression"!==e.right.type||e.left.computed&&"Literal"!==e.left.property.type||!l&&r(e.left)||"Identifier"!==e.left.type&&"MemberExpression"!==e.left.type)){var o="MemberExpression"===e.left.type,s=o?a.getStaticPropertyName(e.left):e.left.name;e.right.id&&i(s)&&t(s,e.right.id.name)&&n(e,s,e.right.id.name,o)}},Property:function(e){"FunctionExpression"!==e.value.type||!e.value.id||e.computed&&!s(e.key)||("Identifier"===e.key.type&&t(e.key.name,e.value.id.name)?n(e,e.key.name,e.value.id.name,!0):s(e.key)&&i(e.key.value,p)&&t(e.key.value,e.value.id.name)&&n(e,e.key.value,e.value.id.name,!0))}}}}},{"../ast-utils":22,esutils:11}],57:[function(e,t,n){"use strict";function r(e){return e&&"FunctionName"===e.defs[0].type}var i=e("../ast-utils");t.exports={meta:{docs:{description:"require or disallow named `function` expressions",category:"Stylistic Issues",recommended:!1},schema:[{enum:["always","as-needed","never"]}]},create:function(e){function t(e){var t=e.parent;return"MethodDefinition"===t.type||"Property"===t.type&&(t.method||"get"===t.kind||"set"===t.kind)}function n(e){var n=e.parent;return t(e)||"VariableDeclarator"===n.type&&"Identifier"===n.id.type&&n.init===e||"Property"===n.type&&n.value===e||"AssignmentExpression"===n.type&&"Identifier"===n.left.type&&n.right===e||"ExportDefaultDeclaration"===n.type&&n.declaration===e||"AssignmentPattern"===n.type&&n.right===e}var o="never"===e.options[0],a="as-needed"===e.options[0];return{"FunctionExpression:exit":function(s){var u=e.getDeclaredVariables(s)[0];if(!(r(u)&&u.references.length>0)){var c=Boolean(s.id&&s.id.name),l=i.getFunctionNameWithKind(s);o?c&&e.report({node:s,message:"Unexpected named {{name}}.",data:{name:l}}):c||(a?n(s):t(s))||e.report({node:s,message:"Unexpected unnamed {{name}}.",data:{name:l}})}}}}}},{"../ast-utils":22}],58:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce the consistent use of either `function` declarations or expressions",category:"Stylistic Issues",recommended:!1},schema:[{enum:["declaration","expression"]},{type:"object",properties:{allowArrowFunctions:{type:"boolean"}},additionalProperties:!1}]},create:function(e){var t=e.options[0],n=e.options[1]&&e.options[1].allowArrowFunctions===!0,r="declaration"===t,i=[],o={FunctionDeclaration:function(t){i.push(!1),r||"ExportDefaultDeclaration"===t.parent.type||e.report({node:t,message:"Expected a function expression."})},"FunctionDeclaration:exit":function(){i.pop()},FunctionExpression:function(t){i.push(!1),r&&"VariableDeclarator"===t.parent.type&&e.report({node:t.parent,message:"Expected a function declaration."})},"FunctionExpression:exit":function(){i.pop()},ThisExpression:function(){i.length>0&&(i[i.length-1]=!0)}};return n||(o.ArrowFunctionExpression=function(){i.push(!1)},o["ArrowFunctionExpression:exit"]=function(t){var n=i.pop();r&&!n&&"VariableDeclarator"===t.parent.type&&e.report({node:t.parent,message:"Expected a function declaration."})}),o}}},{}],59:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce consistent spacing around `*` operators in generator functions",category:"ECMAScript 6",recommended:!1},fixable:"whitespace",schema:[{oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]}]},create:function(e){function t(e){return"*"===e.value&&"Punctuator"===e.type}function n(e){return a.getFirstToken(e.parent.method||"MethodDefinition"===e.parent.type?e.parent:e,t)}function r(t,n,r){if(!!(r.range[0]-n.range[1])!==o[t]){var i="*"===n.value,a=o[t],s=i?n:r,u=a?"Missing":"Unexpected",c="{{type}} space {{side}} *.",l={type:u,side:t};e.report({node:s,message:c,data:l,fix:function(e){return a?i?e.insertTextAfter(s," "):e.insertTextBefore(s," "):e.removeRange([n.range[1],r.range[0]])}})}}function i(e){if(e.generator){var t=n(e),i=a.getTokenBefore(t);"function"!==i.value&&"static"!==i.value||r("before",i,t);var o=a.getTokenAfter(t);r("after",t,o)}}var o=function(e){return e&&"string"!=typeof e?e:{before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}}[e||"before"]}(e.options[0]),a=e.getSourceCode();return{FunctionDeclaration:i,FunctionExpression:i}}}},{}],60:[function(e,t,n){"use strict";function r(e,t){var n=e.references.filter(function(e){return e.identifier.range[0]===t.range[0]&&e.identifier.range[1]===t.range[1]});return 1===n.length?n[0]:null}function i(e,t){var n=r(e,t);return n&&n.resolved&&n.resolved.defs.length>0}var o=["AssignmentExpression","VariableDeclarator","MemberExpression","ExpressionStatement","CallExpression","ConditionalExpression","Program","VariableDeclaration"];t.exports={meta:{docs:{description:"require `require()` calls to be placed at top-level module scope",category:"Node.js and CommonJS",recommended:!1},schema:[]},create:function(e){return{CallExpression:function(t){var n=e.getScope();if("require"===t.callee.name&&!i(n,t.callee)){var r=e.getAncestors().every(function(e){return o.indexOf(e.type)>-1});r||e.report({node:t,message:"Unexpected require()."})}}}}}},{}],61:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require `for-in` loops to include an `if` statement",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{ForInStatement:function(t){var n="BlockStatement"===t.body.type?t.body.body[0]:t.body;n&&"IfStatement"!==n.type&&e.report({node:t,message:"The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype."})}}}}},{}],62:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require error handling in callbacks",category:"Node.js and CommonJS",recommended:!1},schema:[{type:"string"}]},create:function(e){function t(e){var t=e[0];return"^"===t}function n(e){if(t(o)){var n=new RegExp(o);return n.test(e)}return e===o}function r(e){return e.variables.filter(function(e){return e.defs[0]&&"Parameter"===e.defs[0].type})}function i(t){var i=e.getScope(),o=r(i),a=o[0];a&&n(a.name)&&0===a.references.length&&e.report({node:t,message:"Expected error to be handled."})}var o=e.options[0]||"err";return{FunctionDeclaration:i,FunctionExpression:i,ArrowFunctionExpression:i}}}},{}],63:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow specified identifiers",category:"Stylistic Issues",recommended:!1},schema:{type:"array",items:{type:"string"},uniqueItems:!0}},create:function(e){function t(e){return i.indexOf(e)!==-1}function n(e,n){return"CallExpression"!==e.type&&"NewExpression"!==e.type&&t(n)}function r(t){e.report({node:t,message:"Identifier '{{name}}' is blacklisted.",data:{name:t.name}})}var i=e.options;return{Identifier:function(e){var i=e.name,o="MemberExpression"===e.parent.type?e.parent.parent:e.parent;"MemberExpression"===e.parent.type?"Identifier"===e.parent.object.type&&e.parent.object.name===e.name?t(i)&&r(e):"AssignmentExpression"===o.type&&("MemberExpression"!==o.right.type||"MemberExpression"===o.left.type&&o.left.property.name===e.name)&&t(i)&&r(e):"Property"===e.parent.type?n(o,i)&&r(e):n(o,i)&&r(e)}}}}},{}],64:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce minimum and maximum identifier lengths",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{min:{type:"number"},max:{type:"number"},exceptions:{type:"array",uniqueItems:!0,items:{type:"string"}},properties:{enum:["always","never"]}},additionalProperties:!1}]},create:function(e){var t=e.options[0]||{},n="undefined"!=typeof t.min?t.min:2,r="undefined"!=typeof t.max?t.max:1/0,i="never"!==t.properties,o=(t.exceptions?t.exceptions:[]).reduce(function(e,t){return e[t]=!0,e},{}),a={MemberExpression:i&&function(e){return!e.computed&&(e.parent.left===e&&"AssignmentExpression"===e.parent.type||"Property"===e.parent.type&&e.parent.value===e&&"ObjectPattern"===e.parent.parent.type&&e.parent.parent.parent.left===e.parent.parent)},AssignmentPattern:function(e,t){return e.left===t},VariableDeclarator:function(e,t){return e.id===t},Property:i&&function(e,t){return e.key===t},ImportDefaultSpecifier:!0,RestElement:!0,FunctionExpression:!0,ArrowFunctionExpression:!0,ClassDeclaration:!0,FunctionDeclaration:!0,MethodDefinition:!0,CatchClause:!0};return{Identifier:function(t){var i=t.name,s=t.parent,u=i.lengthr;if((u||c)&&!o[i]){var l=a[s.type];l&&(l===!0||l(s,t))&&e.report({node:t,message:u?"Identifier name '{{name}}' is too short (< {{min}}).":"Identifier name '{{name}}' is too long (> {{max}}).",data:{name:i,min:n,max:r}})}}}}}},{}],65:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require identifiers to match a specified regular expression",category:"Stylistic Issues",recommended:!1},schema:[{type:"string"},{type:"object",properties:{properties:{type:"boolean"}}}]},create:function(e){function t(e){return!o.test(e)}function n(e,n){return"CallExpression"!==e.type&&"NewExpression"!==e.type&&t(n)}function r(t){e.report({node:t,message:"Identifier '{{name}}' does not match the pattern '{{pattern}}'.",data:{name:t.name,pattern:i}})}var i=e.options[0]||"^.+$",o=new RegExp(i),a=e.options[1]||{},s=!!a.properties,u=!!a.onlyDeclarations;return{Identifier:function(e){var i=e.name,o=e.parent,a="MemberExpression"===o.type?o.parent:o;if("MemberExpression"===o.type){if(!s)return;"Identifier"===o.object.type&&o.object.name===i?t(i)&&r(e):"AssignmentExpression"===a.type&&("MemberExpression"!==a.right.type||"MemberExpression"===a.left.type&&a.left.property.name===i)&&t(i)&&r(e)}else if("Property"===o.type){if(!s||o.key.name!==i)return;n(a,i)&&r(e)}else{var c="FunctionDeclaration"===a.type||"VariableDeclarator"===a.type;if(u&&!c)return;n(a,i)&&r(e)}}}}}},{}],66:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent indentation",category:"Stylistic Issues",recommended:!1,replacedBy:["indent"]},deprecated:!0,fixable:"whitespace",schema:[{oneOf:[{enum:["tab"]},{type:"integer",minimum:0}]},{type:"object",properties:{SwitchCase:{type:"integer",minimum:0},VariableDeclarator:{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{var:{type:"integer",minimum:0},let:{type:"integer",minimum:0},const:{type:"integer",minimum:0}}}]},outerIIFEBody:{type:"integer",minimum:0},MemberExpression:{type:"integer",minimum:0},FunctionDeclaration:{type:"object",properties:{parameters:{oneOf:[{type:"integer",minimum:0},{enum:["first"]}]},body:{type:"integer",minimum:0}}},FunctionExpression:{type:"object",properties:{parameters:{oneOf:[{type:"integer",minimum:0},{enum:["first"]}]},body:{type:"integer",minimum:0}}},CallExpression:{type:"object",properties:{parameters:{oneOf:[{type:"integer",minimum:0},{enum:["first"]}]}}},ArrayExpression:{oneOf:[{type:"integer",minimum:0},{enum:["first"]}]},ObjectExpression:{oneOf:[{type:"integer",minimum:0},{enum:["first"]}]}},additionalProperties:!1}]},create:function(e){function t(e,t,n){var r=e+" "+I+(1===e?"":"s"),i="space"+(1===t?"":"s"),o="tab"+(1===n?"":"s"),a=void 0;return a=t>0&&n>0?t+" "+i+" and "+n+" "+o:t>0?"space"===I?t:t+" "+i:n>0?"tab"===I?n:n+" "+o:"0","Expected indentation of "+r+" but found "+a+"."}function n(n,r,i,o,a,s){if(!i||!o){var u=("space"===I?" ":"\t").repeat(r),c=s?[n.range[1]-n.loc.end.column,n.range[1]-n.loc.end.column+i+o]:[n.range[0]-n.loc.start.column,n.range[0]-n.loc.start.column+i+o];e.report({node:n,loc:a,message:t(r,i,o),fix:function(e){return e.replaceTextRange(c,u)}})}}function o(e,t){var n=t?N.getLastToken(e):N.getFirstToken(e),r=N.getText(n,n.loc.start.column).split(""),i=r.slice(0,r.findIndex(function(e){return" "!==e&&"\t"!==e})),o=i.filter(function(e){return" "===e}).length,a=i.filter(function(e){return"\t"===e}).length;return{space:o,tab:a,goodChar:"space"===I?o:a,badChar:"space"===I?a:o}}function a(e,t){var n=t===!0?N.getLastToken(e,1):N.getTokenBefore(e),r=t===!0?e.loc.end.line:e.loc.start.line,i=n?n.loc.end.line:-1;return r!==i}function s(e,t){var r=o(e,!1);if("ArrayExpression"===e.type||"ObjectExpression"===e.type||r.goodChar===t&&0===r.badChar||!a(e)||n(e,t,r.space,r.tab),"IfStatement"===e.type&&e.alternate){var i=N.getTokenBefore(e.alternate);s(i,t),a(e.alternate)||s(e.alternate,t)}if("TryStatement"===e.type&&e.handler){var u=N.getFirstToken(e.handler);s(u,t)}if("TryStatement"===e.type&&e.finalizer){var c=N.getTokenBefore(e.finalizer);s(c,t)}if("DoWhileStatement"===e.type){var l=N.getTokenAfter(e.body);s(l,t)}}function u(e,t){e.forEach(function(e){return s(e,t)})}function c(e,t){var r=N.getLastToken(e),i=o(r,!0);i.goodChar===t&&0===i.badChar||!a(e,!0)||n(e,t,i.space,i.tab,{line:r.loc.start.line,column:r.loc.start.column},!0)}function l(e,t){var r=N.getLastToken(e,i.isClosingParenToken),a=N.getText(r,r.loc.start.column).slice(0,-1);if(!a.trim()){var s=o(r,!0);s.goodChar!==t&&n(e,t,s.space,s.tab,{line:r.loc.start.line,column:r.loc.start.column},!0)}}function p(e,t){var r=o(e,!1);r.goodChar===t&&0===r.badChar||!a(e)||n(e,t,r.space,r.tab,{line:e.loc.start.line,column:e.loc.start.column})}function f(e,t,n){var r=e.parent;for(n||(n=["Program"]);r.type!==t&&n.indexOf(r.type)===-1&&"Program"!==r.type;)r=r.parent;return r.type===t?r:null}function d(e){return f(e,"VariableDeclarator")}function h(e,t){return t&&t.parent.loc.start.line===e.loc.start.line&&t.parent.declarations.length>1}function m(e){var t=e.parent;return t.arguments.length>=2&&t.arguments[1]===e&&t.arguments[0].loc.end.line>t.arguments[0].loc.start.line}function g(e){var t=e.parent,n=t.parent;if("CallExpression"!==t.type||t.callee!==e)return!1;for(;"UnaryExpression"===n.type&&("!"===n.operator||"~"===n.operator||"+"===n.operator||"-"===n.operator)||"AssignmentExpression"===n.type||"LogicalExpression"===n.type||"SequenceExpression"===n.type||"VariableDeclarator"===n.type;)n=n.parent;return("ExpressionStatement"===n.type||"VariableDeclaration"===n.type)&&n.parent&&"Program"===n.parent.type}function v(e){var t=e.parent,n=void 0;if(n=!t.parent||"Property"!==t.parent.type&&"ArrayExpression"!==t.parent.type?o(t).goodChar:o(t,!1).goodChar,"CallExpression"===t.parent.type){var r=t.parent;"FunctionExpression"!==t.type&&"ArrowFunctionExpression"!==t.type?r&&r.loc.start.line0&&u(e.body,n),c(e,n-i)}function y(e){var t=N.getLastToken(e),n=e.loc.start.line,r=t.loc.end.line;return n===r}function x(e){return!("ArrayExpression"!==e.type||!e.elements[0])&&(e.elements[0].loc.start.line===e.loc.start.line&&"ObjectExpression"===e.elements[0].type)}function b(e){if(!y(e)){var t="ArrayExpression"===e.type?e.elements:e.properties;t=t.filter(function(e){return null!==e});var n=void 0,r=void 0,i=d(e);if(a(e)){var s=e.parent;if(n=o(s).goodChar,i&&i.loc.start.line===e.loc.start.line)i||x(s)||"MemberExpression"===s.type||"ExpressionStatement"===s.type||"AssignmentExpression"===s.type||"Property"===s.type||(n+=F);else if("VariableDeclarator"!==s.type||i===i.parent.declarations[0])if("VariableDeclarator"===s.type&&i.loc.start.line===s.loc.start.line)n+=F*O.VariableDeclarator[i.parent.kind];else if("ObjectExpression"===s.type||"ArrayExpression"===s.type){var l="ObjectExpression"===e.parent.type?e.parent.properties:e.parent.elements;l[0]&&l[0].loc.start.line===s.loc.start.line&&l[0].loc.end.line!==s.loc.start.line||("number"==typeof O[s.type]?n+=O[s.type]*F:n=l[0].loc.start.column)}else"CallExpression"===s.type||"NewExpression"===s.type?"number"==typeof O.CallExpression.arguments?n+=O.CallExpression.arguments*F:"first"===O.CallExpression.arguments?s.arguments.indexOf(e)!==-1&&(n=s.arguments[0].loc.start.column):n+=F:"LogicalExpression"!==s.type&&"ArrowFunctionExpression"!==s.type||(n+=F);p(e,n)}else n=o(e).goodChar;r="first"===O[e.type]?t.length?t[0].loc.start.column:0:n+F*O[e.type],h(e,i)&&(r+=F*O.VariableDeclarator[i.parent.kind]),u(t,r),t.length>0&&t[t.length-1].loc.end.line===e.loc.end.line||c(e,n+(h(e,i)?O.VariableDeclarator[i.parent.kind]*F:0))}}function _(e){return"BlockStatement"===e.type||"ClassBody"===e.type||e.body&&"BlockStatement"===e.body.type||e.consequent&&"BlockStatement"===e.consequent.type}function w(e){if(!y(e)){if(e.parent&&("FunctionExpression"===e.parent.type||"FunctionDeclaration"===e.parent.type||"ArrowFunctionExpression"===e.parent.type))return void v(e);var t=void 0,n=[],r=["IfStatement","WhileStatement","ForStatement","ForInStatement","ForOfStatement","DoWhileStatement","ClassDeclaration","TryStatement"];t=e.parent&&r.indexOf(e.parent.type)!==-1&&_(e)?o(e.parent).goodChar:e.parent&&"CatchClause"===e.parent.type?o(e.parent.parent).goodChar:o(e).goodChar,n="IfStatement"===e.type&&"BlockStatement"!==e.consequent.type?[e.consequent]:Array.isArray(e.body)?e.body:[e.body],n.length>0&&u(n,t+F),"BlockStatement"===e.type&&c(e,t)}}function E(e){return e.declarations.reduce(function(t,n){var r=t[t.length-1];return(n.loc.start.line!==e.loc.start.line&&!r||r&&r.loc.start.line!==n.loc.start.line)&&t.push(n),t},[])}function S(e){var t=E(e),n=o(e).goodChar,r=t[t.length-1],i=n+F*O.VariableDeclarator[e.kind];if(u(t,i),!(N.getLastToken(e).loc.end.line<=r.loc.end.line)){var a=N.getTokenBefore(r);","===a.value?c(e,o(a).goodChar):c(e,i-F)}}function C(e){"BlockStatement"!==e.body.type&&w(e)}function T(e,t){var n="SwitchStatement"===e.type?e:e.parent,r=void 0;return L[n.loc.start.line]?L[n.loc.start.line]:("undefined"==typeof t&&(t=o(n).goodChar),r=n.cases.length>0&&0===O.SwitchCase?t:t+F*O.SwitchCase,L[n.loc.start.line]=r,r)}function D(e){var t=/^return\s*?\(\s*?\);*?/,n=N.getText(e).replace(N.getText(e.argument),"");return t.test(n)}var A=1,P=null,k=1,I="space",F=4,O={SwitchCase:0,VariableDeclarator:{var:A,let:A,const:A},outerIIFEBody:null,FunctionDeclaration:{parameters:P,body:k},FunctionExpression:{parameters:P,body:k},CallExpression:{arguments:P},ArrayExpression:1,ObjectExpression:1},N=e.getSourceCode();if(e.options.length&&("tab"===e.options[0]?(F=1,I="tab"):"number"==typeof e.options[0]&&(F=e.options[0],I="space"),e.options[1])){var j=e.options[1];O.SwitchCase=j.SwitchCase||0;var R=j.VariableDeclarator;"number"==typeof R?O.VariableDeclarator={var:R,let:R,const:R}:"object"===("undefined"==typeof R?"undefined":r(R))&&Object.assign(O.VariableDeclarator,R),"number"==typeof j.outerIIFEBody&&(O.outerIIFEBody=j.outerIIFEBody),"number"==typeof j.MemberExpression&&(O.MemberExpression=j.MemberExpression),"object"===r(j.FunctionDeclaration)&&Object.assign(O.FunctionDeclaration,j.FunctionDeclaration),"object"===r(j.FunctionExpression)&&Object.assign(O.FunctionExpression,j.FunctionExpression),"object"===r(j.CallExpression)&&Object.assign(O.CallExpression,j.CallExpression),"number"!=typeof j.ArrayExpression&&"string"!=typeof j.ArrayExpression||(O.ArrayExpression=j.ArrayExpression),"number"!=typeof j.ObjectExpression&&"string"!=typeof j.ObjectExpression||(O.ObjectExpression=j.ObjectExpression)}var L={};return{Program:function(e){e.body.length>0&&u(e.body,o(e).goodChar)},ClassBody:w,BlockStatement:w,WhileStatement:C,ForStatement:C,ForInStatement:C,ForOfStatement:C,DoWhileStatement:C,IfStatement:function(e){"BlockStatement"!==e.consequent.type&&e.consequent.loc.start.line>e.loc.start.line&&w(e)},VariableDeclaration:function(e){e.declarations[e.declarations.length-1].loc.start.line>e.declarations[0].loc.start.line&&S(e)},ObjectExpression:function(e){b(e)},ArrayExpression:function(e){b(e)},MemberExpression:function(t){if("undefined"!=typeof O.MemberExpression&&!y(t)&&!f(t,"VariableDeclarator",["FunctionExpression","ArrowFunctionExpression"])&&!f(t,"AssignmentExpression",["FunctionExpression"])){var n=o(t).goodChar+F*O.MemberExpression,r=[t.property],i=e.getTokenBefore(t.property);"Punctuator"===i.type&&"."===i.value&&r.push(i),u(r,n)}},SwitchStatement:function(e){var t=o(e).goodChar,n=T(e,t);u(e.cases,n),c(e,t)},SwitchCase:function(e){if(!y(e)){var t=T(e);u(e.consequent,t+F)}},FunctionDeclaration:function(e){y(e)||("first"===O.FunctionDeclaration.parameters&&e.params.length?u(e.params.slice(1),e.params[0].loc.start.column):null!==O.FunctionDeclaration.parameters&&u(e.params,o(e).goodChar+F*O.FunctionDeclaration.parameters))},FunctionExpression:function(e){y(e)||("first"===O.FunctionExpression.parameters&&e.params.length?u(e.params.slice(1),e.params[0].loc.start.column):null!==O.FunctionExpression.parameters&&u(e.params,o(e).goodChar+F*O.FunctionExpression.parameters))},ReturnStatement:function(e){if(!y(e)){var t=o(e).goodChar;D(e)?l(e,t):s(e,t)}},CallExpression:function(e){y(e)||("first"===O.CallExpression.arguments&&e.arguments.length?u(e.arguments.slice(1),e.arguments[0].loc.start.column):null!==O.CallExpression.arguments&&u(e.arguments,o(e).goodChar+F*O.CallExpression.arguments))}}}}},{"../ast-utils":22}],67:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n0?"space"===T?t:t+" "+i:n>0?"tab"===T?n:n+" "+o:"0","Expected indentation of "+r+" but found "+a+"."}function n(n,r){var i=Array.from(k.getTokenIndent(n)),o=i.filter(function(e){return" "===e}).length,a=i.filter(function(e){return"\t"===e}).length,s=r*D;e.report({node:n,message:t(s,o,a),loc:{start:{line:n.loc.start.line,column:0},end:{line:n.loc.start.line,column:n.loc.start.column}},fix:function(e){var t=[n.range[0]-n.loc.start.column,n.range[0]],r=("space"===T?" ":"\t").repeat(s);return e.replaceTextRange(t,r)}})}function r(e,t){var n=k.getTokenIndent(e),r="space"===T?" ":"\t";return n===r.repeat(t*D)||n.includes(" ")&&n.includes("\t")}function i(e){if(!e.parent||"CallExpression"!==e.parent.type||e.parent.callee!==e)return!1;for(var t=e.parent&&e.parent.parent;"UnaryExpression"===t.type&&["!","~","+","-"].indexOf(t.operator)>-1||"AssignmentExpression"===t.type||"LogicalExpression"===t.type||"SequenceExpression"===t.type||"VariableDeclarator"===t.type;)t=t.parent;return("ExpressionStatement"===t.type||"VariableDeclaration"===t.type)&&"Program"===t.parent.type}function l(e){return P.getTokens(e,{includeComments:!0})}function p(e,t,n,r){function i(e){for(var n=P.getTokenBefore(e);a.isOpeningParenToken(n)&&n!==t;)n=P.getTokenBefore(n);return P.getTokenAfter(n)}I.setDesiredOffsets(P.getTokensBetween(t,n,{includeComments:!0}),t,"first"===r?1:r),I.matchIndentOf(t,n),"first"===r&&e.length&&!e[0]||e.forEach(function(n,o){if("off"===r&&I.ignoreToken(i(n)),0!==o&&n)if("first"===r&&k.isFirstTokenOfLine(i(n)))I.matchOffsetOf(i(e[0]),i(n));else{var a=e[o-1],s=a&&i(a);a&&P.getLastToken(a).loc.start.line>t.loc.end.line&&I.matchIndentOf(s,i(n))}})}function f(e){var t=void 0;t=e.parent&&i(e.parent)?A.outerIIFEBody:!e.parent||"FunctionExpression"!==e.parent.type&&"ArrowFunctionExpression"!==e.parent.type?e.parent&&"FunctionDeclaration"===e.parent.type?A.FunctionDeclaration.body:1:A.FunctionExpression.body,a.STATEMENT_LIST_PARENTS.has(e.parent.type)||I.matchIndentOf(P.getFirstToken(e.parent),P.getFirstToken(e)),p(e.body,P.getFirstToken(e),P.getLastToken(e),t)}function d(e){var t=l(e);p(e.elements||e.properties,t[0],t[t.length-1],A[e.type])}function h(e){if("BlockStatement"!==e.type){for(var t=P.getTokenBefore(e,a.isNotOpeningParenToken),n=l(e);a.isOpeningParenToken(P.getTokenBefore(n[0]))&&a.isClosingParenToken(P.getTokenAfter(n[n.length-1]));)n=[P.getTokenBefore(n[0])].concat(n).concat(P.getTokenAfter(n[n.length-1]));I.setDesiredOffsets(n,t,1);var r=P.getLastToken(e);a.isSemicolonToken(r)&&I.matchIndentOf(t,r)}}function m(e,t){var n=e.params.length?P.getTokenBefore(e.params[0]):P.getTokenBefore(e.body,1);if(n){var r=P.getTokenBefore(e.body),i=l(e),a=o.sortedIndexBy(i,n,function(e){return e.range[0]}),s=o.sortedIndexBy(i,r,function(e){return e.range[0]});F.add(i[a]),F.add(i[s]),p(e.params,i[a],i[s],t)}}function g(e){var t=l(e),n=P.getFirstTokenBetween(e.left,e.right,function(t){return t.value===e.operator}),r=P.getTokenAfter(n),i=t.slice(o.sortedIndexBy(t,r,function(e){return e.range[0]}));I.ignoreToken(n),I.ignoreToken(i[0]),I.setDesiredOffset(i[0],P.getFirstToken(e),1),I.setDesiredOffsets(i,i[0],1)}function v(e){var t=void 0;t=e.arguments.length?P.getFirstTokenBetween(e.callee,e.arguments[0],a.isOpeningParenToken):P.getLastToken(e,1);var n=P.getLastToken(e);F.add(t),F.add(n),I.matchIndentOf(P.getLastToken(e.callee),t),p(e.arguments,t,n,A.CallExpression.arguments)}function y(e){if(e.superClass){var t=P.getFirstToken(e),n=P.getTokenBefore(e.superClass,a.isNotOpeningParenToken);I.setDesiredOffset(n,t,1),I.setDesiredOffsets(P.getTokensBetween(n,e.body,{includeComments:!0}),t,1)}}function x(e){var t=[],n=[];e.forEach(function(e){a.isOpeningParenToken(e)?t.push(e):a.isClosingParenToken(e)&&n.unshift({left:t.pop(),right:e})}),n.forEach(function(e){var t=e.left,n=e.right;F.has(t)||F.has(n)||I.setDesiredOffset(P.getTokenAfter(t),t,1),I.matchIndentOf(t,n)})}function b(e){var t=new Set(l(e));t.forEach(function(e){if(!t.has(I.getFirstDependency(e))){var n=k.getFirstTokenOfLine(e);e===n?I.ignoreToken(e):I.matchIndentOf(n,e)}})}function _(e){var t=!s.has(e.type);t&&b(e)}function w(e,t){for(var n=t;n.parent&&!n.parent.type.endsWith("Statement")&&!n.parent.type.endsWith("Declaration");)n=n.parent;return n=n.parent,!n||n.range[0]===e.range[0]}var E=1,S=1,C=1,T="space",D=4,A={SwitchCase:0,VariableDeclarator:{var:E,let:E,const:E},outerIIFEBody:1,FunctionDeclaration:{parameters:S,body:C},FunctionExpression:{parameters:S,body:C},CallExpression:{arguments:S},MemberExpression:1,ArrayExpression:1,ObjectExpression:1,ArrayPattern:1,ObjectPattern:1,flatTernaryExpressions:!1};e.options.length&&("tab"===e.options[0]?(D=1,T="tab"):"number"==typeof e.options[0]&&(D=e.options[0],T="space"),e.options[1]&&(o.merge(A,e.options[1]),"number"==typeof A.VariableDeclarator&&(A.VariableDeclarator={var:A.VariableDeclarator,let:A.VariableDeclarator,const:A.VariableDeclarator})));var P=e.getSourceCode(),k=new u(P),I=new c(k,T,D),F=new WeakSet;return{ArrayExpression:d,ArrayPattern:d,ArrowFunctionExpression:function(e){m(e,A.FunctionExpression.parameters),h(e.body);var t=void 0;t=e.params.length?P.getTokenAfter(e.params[e.params.length-1],a.isArrowToken):P.getFirstToken(e,a.isArrowToken),I.matchIndentOf(P.getFirstToken(e),t)},AssignmentExpression:function(e){var t=P.getFirstTokenBetween(e.left,e.right,function(t){return t.value===e.operator}),n=l(e),r=n.slice(o.sortedIndexBy(n,t,function(e){return e.range[0]}));I.setDesiredOffsets(r,P.getFirstToken(e.left),1),I.ignoreToken(r[0]),I.ignoreToken(r[1])},BinaryExpression:g,BlockStatement:f,CallExpression:v,ClassBody:f,ClassDeclaration:y,ClassExpression:y,ConditionalExpression:function(e){var t=P.getFirstToken(e);if(!A.flatTernaryExpressions||!a.isTokenOnSameLine(e.test,e.consequent)||w(t,e)){var n=P.getFirstTokenBetween(e.test,e.consequent,function(e){return"Punctuator"===e.type&&"?"===e.value}),r=P.getFirstTokenBetween(e.consequent,e.alternate,function(e){return"Punctuator"===e.type&&":"===e.value}),i=P.getTokensBetween(n,r,{includeComments:!0}),o=P.getTokensAfter(r,function(t){return t.range[1]<=e.range[1]});I.setDesiredOffset(n,t,1),I.setDesiredOffset(r,t,1),I.setDesiredOffset(i[0],t,1),i[i.length-1].loc.end.line===o[0].loc.start.line?I.matchIndentOf(i[0],o[0]):I.setDesiredOffset(o[0],t,1),I.setDesiredOffsets(i,i[0],0),I.setDesiredOffsets(o,o[0],0)}},DoWhileStatement:function(e){return h(e.body)},ExportNamedDeclaration:function(e){if(null===e.declaration){var t=l(e),n=P.getLastToken(e,a.isClosingBraceToken),r=o.sortedIndexBy(t,n,function(e){return e.range[0]});p(e.specifiers,P.getFirstToken(e,{skip:1}),n,1),e.source&&I.setDesiredOffsets(t.slice(r+1),P.getFirstToken(e),1)}},ForInStatement:function(e){return h(e.body)},ForOfStatement:function(e){return h(e.body)},ForStatement:function(e){var t=P.getFirstToken(e,1);e.init&&I.setDesiredOffsets(l(e.init),t,1),e.test&&I.setDesiredOffsets(l(e.test),t,1),e.update&&I.setDesiredOffsets(l(e.update),t,1),h(e.body)},FunctionDeclaration:function(e){m(e,A.FunctionDeclaration.parameters)},FunctionExpression:function(e){m(e,A.FunctionExpression.parameters)},IfStatement:function(e){h(e.consequent),e.alternate&&"IfStatement"!==e.alternate.type&&h(e.alternate)},ImportDeclaration:function(e){if(e.specifiers.some(function(e){return"ImportSpecifier"===e.type})){var t=P.getFirstToken(e,a.isOpeningBraceToken),n=P.getLastToken(e,a.isClosingBraceToken);p(e.specifiers.filter(function(e){return"ImportSpecifier"===e.type}),t,n,1)}var r=P.getLastToken(e,function(e){return"Identifier"===e.type&&"from"===e.value});if(r){var i=P.getTokensBetween(r,P.getLastToken(e),1);I.setDesiredOffsets(i,P.getFirstToken(e),1)}},LogicalExpression:g,"MemberExpression, JSXMemberExpression":function(e){var t=P.getFirstTokenBetween(e.object,e.property,a.isNotClosingParenToken),n=P.getTokenAfter(t),r=P.getTokenBefore(e.object,function(e){return a.isNotOpeningParenToken(e)||F.has(e)}),i=r?P.getTokenAfter(r):P.ast.tokens[0],o=P.getTokenBefore(t);if(e.computed&&I.matchIndentOf(t,P.getLastToken(e)),"number"==typeof A.MemberExpression){var s=e.computed?t:n,u=o.loc.end.line===s.loc.start.line?o:i;I.setDesiredOffset(t,u,A.MemberExpression),I.setDesiredOffset(n,e.computed?t:u,A.MemberExpression)}else I.ignoreToken(t),I.ignoreToken(n),I.matchIndentOf(t,n)},NewExpression:function(e){(e.arguments.length>0||a.isClosingParenToken(P.getLastToken(e))&&a.isOpeningParenToken(P.getLastToken(e,1)))&&v(e)},ObjectExpression:d,ObjectPattern:d,Property:function(e){if(!e.computed&&!e.shorthand&&!e.method&&"init"===e.kind){var t=P.getFirstTokenBetween(e.key,e.value,a.isColonToken);I.ignoreToken(P.getTokenAfter(t))}},SwitchStatement:function(e){var t=l(e),n=t.findIndex(function(t){return t.range[0]>=e.discriminant.range[1]&&a.isOpeningBraceToken(t)});I.setDesiredOffsets(t.slice(n+1,-1),t[n],A.SwitchCase);var r=new WeakSet(e.cases.map(function(e){return P.getFirstToken(e)})),i=e.cases.length&&P.getFirstToken(e.cases[e.cases.length-1]),o=new WeakSet(e.cases.filter(function(e){return 1===e.consequent.length&&"BlockStatement"===e.consequent[0].type}).map(function(e){return P.getFirstToken(e)})),s=t[n];t.slice(n+1,-1).forEach(function(e){r.has(e)?s=e:s!==i||"Line"!==e.type&&"Block"!==e.type?o.has(s)||I.setDesiredOffset(e,s,1):I.ignoreToken(e)})},TemplateLiteral:function(e){var t=l(e);I.setDesiredOffsets(l(e.quasis[0]),t[0],0),e.expressions.forEach(function(t,n){var r=e.quasis[n],i=e.quasis[n+1],o=r.loc.start.line===r.loc.end.line?P.getFirstToken(r):null;I.setDesiredOffsets(P.getTokensBetween(r,i),o,1),I.setDesiredOffset(P.getFirstToken(i),o,0)})},VariableDeclaration:function(e){var t=A.VariableDeclarator.hasOwnProperty(e.kind)?A.VariableDeclarator[e.kind]:E;I.setDesiredOffsets(l(e),P.getFirstToken(e),t);var n=P.getLastToken(e);a.isSemicolonToken(n)&&I.ignoreToken(n)},VariableDeclarator:function(e){if(e.init){var t=P.getTokenBefore(e.init,a.isNotOpeningParenToken),n=P.getTokenAfter(t);I.ignoreToken(t),I.ignoreToken(n),I.matchIndentOf(t,n)}},"VariableDeclarator:exit":function(e){if(e.parent.declarations.length>1&&e.parent.declarations[0]===e&&e.init){var t=new Set(l(e.init));t.forEach(function(n){t.has(I.getFirstDependency(n))||I.increaseOffset(n,A.VariableDeclarator[e.parent.kind])})}},WhileStatement:function(e){return h(e.body)},"*:exit":_,"JSXAttribute[value]":function(e){var t=P.getFirstTokenBetween(e.name,e.value,function(e){return"Punctuator"===e.type&&"="===e.value}),n=P.getFirstToken(e.name);I.setDesiredOffset(t,n,1),I.setDesiredOffset(P.getFirstToken(e.value),n,1)},JSXElement:function(e){e.closingElement&&p(e.children,P.getFirstToken(e.openingElement),P.getFirstToken(e.closingElement),1)},JSXOpeningElement:function(e){var t=P.getFirstToken(e),n=void 0;e.selfClosing?(n=P.getLastToken(e,{skip:1}),I.matchIndentOf(n,P.getLastToken(e))):n=P.getLastToken(e),I.setDesiredOffsets(l(e.name),P.getFirstToken(e)),p(e.attributes,t,n,1)},JSXClosingElement:function(e){var t=P.getFirstToken(e);I.setDesiredOffsets(l(e.name),t,1),I.matchIndentOf(t,P.getLastToken(e))},JSXExpressionContainer:function(e){var t=P.getFirstToken(e),n=P.getFirstToken(e.expression);n&&I.setDesiredOffset(n,t,1),I.matchIndentOf(t,P.getLastToken(e))},"Program:exit":function(){x(P.ast.tokens);var e=P.ast.comments.reduce(function(e,t){var n=P.getTokenBefore(t,{includeComments:!0});return e.set(t,e.has(n)?e.get(n):n)},new WeakMap);P.lines.forEach(function(t,i){var o=i+1;if(k.firstTokensByLineNumber.has(o)){var s=k.firstTokensByLineNumber.get(o);if(s.loc.start.line===o&&!r(s,I.getDesiredIndent(s))){if(a.isCommentToken(s)){var u=e.get(s),c=u?P.getTokenAfter(u):P.ast.tokens[0];if(u&&r(s,I.getDesiredIndent(u))||c&&r(s,I.getDesiredIndent(c)))return}n(s,I.getDesiredIndent(s))}}})}}}}},{"../ast-utils":22,lodash:16}],68:[function(e,t,n){"use strict";function r(e){return"ForInStatement"===e.type||"ForOfStatement"===e.type||"ForStatement"===e.type}function i(e){var t=e.parent,n=t.parent;return r(n)?"ForStatement"===n.type?n.init===t:n.left===t:Boolean(e.init)}t.exports={meta:{docs:{description:"require or disallow initialization in variable declarations",category:"Variables",recommended:!1},schema:{anyOf:[{type:"array",items:[{enum:["always"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["never"]},{type:"object",properties:{ignoreForLoopInit:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]}},create:function(e){var t="always",n="never",o=e.options[0]||t,a=e.options[1]||{};return{"VariableDeclaration:exit":function(s){for(var u=s.kind,c=s.declarations,l=0;l1)return!1;return!0}return!1}function n(e){return!(e.method||e.shorthand||"init"!==e.kind||"Property"!==e.type)}function a(e){var t=C.getTokenAfter(e,c.isColonToken);return C.getTokenBefore(t)}function u(e){return C.getTokenAfter(e,c.isColonToken)}function p(e){var t=e.key;return e.computed?C.getText().slice(t.range[0],t.range[1]):e.key.name||e.key.value}function f(t,n,i,o,a){var s=i.length-o,c=u(t.key),f=C.getTokenBefore(c,{includeComments:!0}),d=C.getTokenAfter(c,{includeComments:!0}),h="key"===n,m=h?f.loc.start:d.loc.start,g=s>0,v=Math.abs(s),y=Array(v+1).join(" "),x=void 0;if((s&&"strict"===a||s<0&&"minimum"===a||s>0&&!o&&"minimum"===a)&&(!o||!r(i))){if(g){var b=void 0;b=h?[f.end,f.end+v]:[d.start-v,d.start],x=function(e){return e.removeRange(b)}}else x=h?function(e){return e.insertTextAfter(f,y)}:function(e){return e.insertTextBefore(d,y)};e.report({node:t[n],loc:m,message:l[n],data:{error:g?"Extra":"Missing",computed:t.computed?"computed ":"",key:p(t)},fix:x})}}function d(e){var t=C.getFirstToken(e),n=a(e.key);return n.range[1]-t.range[0]}function h(e){var t=/(\s*):(\s*)/.exec(C.getText().slice(e.key.range[1],e.value.range[0]));return t?{beforeColon:t[1],afterColon:t[2]}:null}function m(e){return 1===e.properties.length?[e.properties]:e.properties.reduce(function(e,n){var r=i(e),o=i(r);return!o||t(o,n)?r.push(n):e.push([n]),e},[[]])}function g(e){var t=e.length,n=e.map(d),r=S.on,i=Math.max.apply(null,n),o=void 0,a=void 0,s=void 0;S&&t>1?(o=S.beforeColon,a=S.afterColon,s=S.mode):(o=w.beforeColon,a=w.afterColon,s=S.mode),i+="colon"===r?o:a;for(var u=0;u]$/,u=/^(?:[([{<~!]|\+\+?|--?)$/,c=/^[)\]}>*]$/,l=/^[{*]$/,p=/\$\{$/,f=/^\}/,d=/^(?:JSXElement|RegularExpression|String|Template)$/,h=a.concat(["as","async","await","from","get","let","of","set","yield"]);!function(){h.sort();for(var e=1;e=S&&(i=!1),!g){var O=w.getTokenBefore(n,{includeComments:!0}),N=w.getTokenAfter(n,{includeComments:!0});if(!I&&s&&!o.includes(A,u)&&(!a.isCommentToken(O)||!a.isTokenOnSameLine(O,n))){var j=n.range[0]-n.loc.start.column,R=[j,j];e.report({node:n,message:"Expected line before comment.",fix:function(e){return e.insertTextBeforeRange(R,"\n"); }})}F||!i||o.includes(A,c)||a.isCommentToken(N)&&a.isTokenOnSameLine(n,N)||e.report({node:n,message:"Expected line after comment.",fix:function(e){return e.insertTextAfter(n,"\n")}})}}}var v=e.options[0]?Object.assign({},e.options[0]):{},y=v.ignorePattern,x=a.COMMENTS_IGNORE_PATTERN,b=new RegExp(y),_=v.applyDefaultIgnorePatterns!==!1;v.beforeLineComment=v.beforeLineComment||!1,v.afterLineComment=v.afterLineComment||!1,v.beforeBlockComment="undefined"==typeof v.beforeBlockComment||v.beforeBlockComment,v.afterBlockComment=v.afterBlockComment||!1,v.allowBlockStart=v.allowBlockStart||!1,v.allowBlockEnd=v.allowBlockEnd||!1;var w=e.getSourceCode(),E=w.lines,S=E.length+1,C=w.getAllComments(),T=i(C),D=r(E),A=T.concat(D);return{Program:function(){C.forEach(function(e){"Line"===e.type?(v.beforeLineComment||v.afterLineComment)&&g(e,{after:v.afterLineComment,before:v.beforeLineComment}):"Block"===e.type&&(v.beforeBlockComment||v.afterBlockComment)&&g(e,{after:v.afterBlockComment,before:v.beforeBlockComment})})}}}}},{"../ast-utils":22,lodash:16}],75:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require or disallow newlines around directives",category:"Stylistic Issues",recommended:!1,replacedBy:["padding-line-between-statements"]},schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{before:{enum:["always","never"]},after:{enum:["always","never"]}},additionalProperties:!1,minProperties:2}]}],fixable:"whitespace",deprecated:!0},create:function(e){function t(e){var t=s.getTokenBefore(e,{includeComments:!0}),n=t?t.loc.end.line:0;return e.loc.start.line-n>=2}function n(e){var t=s.getLastToken(e),n=s.getTokenBefore(t);return r.isSemicolonToken(t)&&t.loc.start.line>n.loc.end.line?n:t}function i(e){var t=n(e),r=s.getTokenAfter(t,{includeComments:!0});return r.loc.start.line-t.loc.end.line>=2}function o(t,r,i){e.report({node:t,message:'{{expected}} newline {{location}} "{{value}}" directive.',data:{expected:i?"Expected":"Unexpected",value:t.expression.value,location:r},fix:function(e){var o=n(t);return i?"before"===r?e.insertTextBefore(t,"\n"):e.insertTextAfter(o,"\n"):e.removeRange("before"===r?[t.range[0]-1,t.range[0]]:[o.range[1],o.range[1]+1])}})}function a(e){var n=r.getDirectivePrologue(e);if(n.length){var a=n[0],u=s.getCommentsBefore(a);u.length?("always"!==c||t(a)||o(a,"before",!0),"never"===c&&t(a)&&o(a,"before",!1)):"Program"===e.type&&"never"===c&&!u.length&&t(a)&&o(a,"before",!1);var p=n[n.length-1],f="Program"===e.type?e.body:e.body.body;(p!==f[f.length-1]||p.trailingComments)&&("always"!==l||i(p)||o(p,"after",!0),"never"===l&&i(p)&&o(p,"after",!1))}}var s=e.getSourceCode(),u=e.options[0]||"always",c="string"==typeof u?u:u.before,l="string"==typeof u?u:u.after;return{Program:a,FunctionDeclaration:a,FunctionExpression:a,ArrowFunctionExpression:a}}}},{"../ast-utils":22}],76:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.exports={meta:{docs:{description:"enforce a maximum depth that blocks can be nested",category:"Stylistic Issues",recommended:!1},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}]},create:function(e){function t(){a.push(0)}function n(){a.pop()}function i(t){var n=++a[a.length-1];n>u&&e.report({node:t,message:"Blocks are nested too deeply ({{depth}}).",data:{depth:n}})}function o(){a[a.length-1]--}var a=[],s=e.options[0],u=4;return"object"===("undefined"==typeof s?"undefined":r(s))&&s.hasOwnProperty("maximum")&&"number"==typeof s.maximum&&(u=s.maximum),"object"===("undefined"==typeof s?"undefined":r(s))&&s.hasOwnProperty("max")&&"number"==typeof s.max&&(u=s.max),"number"==typeof s&&(u=s),{Program:t,FunctionDeclaration:t,FunctionExpression:t,ArrowFunctionExpression:t,IfStatement:function(e){"IfStatement"!==e.parent.type&&i(e)},SwitchStatement:i,TryStatement:i,DoWhileStatement:i,WhileStatement:i,WithStatement:i,ForStatement:i,ForInStatement:i,ForOfStatement:i,"IfStatement:exit":o,"SwitchStatement:exit":o,"TryStatement:exit":o,"DoWhileStatement:exit":o,"WhileStatement:exit":o,"WithStatement:exit":o,"ForStatement:exit":o,"ForInStatement:exit":o,"ForOfStatement:exit":o,"FunctionDeclaration:exit":n,"FunctionExpression:exit":n,"ArrowFunctionExpression:exit":n,"Program:exit":n}}}},{}],77:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i={type:"object",properties:{code:{type:"integer",minimum:0},comments:{type:"integer",minimum:0},tabWidth:{type:"integer",minimum:0},ignorePattern:{type:"string"},ignoreComments:{type:"boolean"},ignoreStrings:{type:"boolean"},ignoreUrls:{type:"boolean"},ignoreTemplateLiterals:{type:"boolean"},ignoreRegExpLiterals:{type:"boolean"},ignoreTrailingComments:{type:"boolean"}},additionalProperties:!1},o={anyOf:[i,{type:"integer",minimum:0}]};t.exports={meta:{docs:{description:"enforce a maximum line length",category:"Stylistic Issues",recommended:!1},schema:[o,o,i]},create:function(e){function t(e,t){var n=0;return e.replace(/\t/g,function(e,r){var i=r+n,o=t?i%t:0,a=t-o;n+=a-1}),Array.from(e).length+n}function n(e,t,n){return n&&n.loc.start.line===t&&t<=n.loc.end.line&&(n.loc.end.line>t||n.loc.end.column===e.length)}function i(e,t,n){var r=n.loc.start,i=n.loc.end,o=!e.slice(0,n.loc.start.column).trim();return n&&(r.linet||i.line===t&&i.column===e.length)}function o(e,t,n){return e.slice(0,n.loc.start.column).replace(/\s+$/,"")}function a(e,t,n){Array.isArray(e[t])||(e[t]=[]),e[t].push(n)}function s(){return d.ast.tokens.filter(function(e){return"String"===e.type})}function u(){return d.ast.tokens.filter(function(e){return"Template"===e.type})}function c(){return d.ast.tokens.filter(function(e){return"RegularExpression"===e.type})}function l(e,t){for(var n=t.loc.start.line;n<=t.loc.end.line;++n)a(e,n,t);return e}function p(r){var a=d.lines,p=y||S||w?d.getAllComments():[],h=0,m=s(),T=m.reduce(l,{}),D=u(),A=D.reduce(l,{}),P=c(),k=P.reduce(l,{});a.forEach(function(a,s){var u=s+1,c=!1;if(hS&&e.report({node:r,loc:{line:u,column:0},message:"Line {{lineNumber}} exceeds the maximum comment line length of {{maxCommentLength}}.",data:{lineNumber:s+1,maxCommentLength:S}}):d>g&&e.report({node:r,loc:{line:u,column:0},message:"Line {{lineNumber}} exceeds the maximum line length of {{maxLength}}.",data:{lineNumber:s+1,maxLength:g}}))}})}var f=/[^:\/?#]:\/\/[^?#]/,d=e.getSourceCode(),h=e.options[e.options.length-1],m="object"===("undefined"==typeof h?"undefined":r(h))?Object.create(h):{};"number"==typeof e.options[0]&&(m.code=e.options[0]),"number"==typeof e.options[1]&&(m.tabWidth=e.options[1]);var g=m.code||80,v=m.tabWidth||4,y=m.ignoreComments||!1,x=m.ignoreStrings||!1,b=m.ignoreTemplateLiterals||!1,_=m.ignoreRegExpLiterals||!1,w=m.ignoreTrailingComments||m.ignoreComments||!1,E=m.ignoreUrls||!1,S=m.comments,C=m.ignorePattern||null;return C&&(C=new RegExp(C)),{Program:p}}}},{}],78:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("lodash"),o=e("../ast-utils");t.exports={meta:{docs:{description:"enforce a maximum number of lines per file",category:"Stylistic Issues",recommended:!1},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"}},additionalProperties:!1}]}]},create:function(e){function t(e){return e&&("Block"===e.type||"Line"===e.type)}function n(e){var n=e.loc.start.line,r=e.loc.end.line,a=void 0;a=e;do a=l.getTokenBefore(a,{includeComments:!0});while(t(a));a&&o.isTokenOnSameLine(a,e)&&(n+=1),a=e;do a=l.getTokenAfter(a,{includeComments:!0});while(t(a));return a&&o.isTokenOnSameLine(e,a)&&(r-=1),n<=r?i.range(n,r+1):[]}var a=e.options[0],s=300;"object"===("undefined"==typeof a?"undefined":r(a))&&a.hasOwnProperty("max")&&"number"==typeof a.max&&(s=a.max),"number"==typeof a&&(s=a);var u=a&&a.skipComments,c=a&&a.skipBlankLines,l=e.getSourceCode();return{"Program:exit":function(){var t=l.lines.map(function(e,t){return{lineNumber:t+1,text:e}});if(c&&(t=t.filter(function(e){return""!==e.text.trim()})),u){var r=l.getAllComments(),o=i.flatten(r.map(function(e){return n(e)}));t=t.filter(function(e){return!i.includes(o,e.lineNumber)})}t.length>s&&e.report({loc:{line:1,column:0},message:"File must be at most {{max}} lines long. It's {{actual}} lines long.",data:{max:s,actual:t.length}})}}}}},{"../ast-utils":22,lodash:16}],79:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.exports={meta:{docs:{description:"enforce a maximum depth that callbacks can be nested",category:"Stylistic Issues",recommended:!1},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}]},create:function(e){function t(t){var n=t.parent;if("CallExpression"===n.type&&a.push(t),a.length>o){var r={num:a.length,max:o};e.report({node:t,message:"Too many nested callbacks ({{num}}). Maximum allowed is {{max}}.",data:r})}}function n(){a.pop()}var i=e.options[0],o=10;"object"===("undefined"==typeof i?"undefined":r(i))&&i.hasOwnProperty("maximum")&&"number"==typeof i.maximum&&(o=i.maximum),"object"===("undefined"==typeof i?"undefined":r(i))&&i.hasOwnProperty("max")&&"number"==typeof i.max&&(o=i.max),"number"==typeof i&&(o=i);var a=[];return{ArrowFunctionExpression:t,"ArrowFunctionExpression:exit":n,FunctionExpression:t,"FunctionExpression:exit":n}}}},{}],80:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("lodash"),o=e("../ast-utils");t.exports={meta:{docs:{description:"enforce a maximum number of parameters in function definitions",category:"Stylistic Issues",recommended:!1},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}]},create:function(e){function t(t){t.params.length>a&&e.report({node:t,message:"{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}.",data:{name:i.upperFirst(o.getFunctionNameWithKind(t)),count:t.params.length,max:a}})}var n=e.options[0],a=3;return"object"===("undefined"==typeof n?"undefined":r(n))&&n.hasOwnProperty("maximum")&&"number"==typeof n.maximum&&(a=n.maximum),"object"===("undefined"==typeof n?"undefined":r(n))&&n.hasOwnProperty("max")&&"number"==typeof n.max&&(a=n.max),"number"==typeof n&&(a=n),{FunctionDeclaration:t,ArrowFunctionExpression:t,FunctionExpression:t}}}},{"../ast-utils":22,lodash:16}],81:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce a maximum number of statements allowed per line",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{max:{type:"integer",minimum:1}},additionalProperties:!1}]},create:function(e){function t(){f&&e.report({node:f,message:c,data:{numberOfStatementsOnThisLine:p,maxStatementsPerLine:u,statements:1===p?"statement":"statements"}}),f=null}function n(e){return a.getLastToken(e,r.isNotSemicolonToken)}function i(e){var n=e.loc.start.line;d.test(e.parent.type)&&e.parent.alternate!==e||(n===l?p+=1:(t(),p=1,l=n),p===u+1&&(f=f||e))}function o(e){var r=n(e).loc.end.line;r!==l&&(t(),p=1,l=r)}var a=e.getSourceCode(),s=e.options[0]||{},u="undefined"!=typeof s.max?s.max:1,c="This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}.",l=0,p=0,f=void 0,d=/^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/;return{BreakStatement:i,ClassDeclaration:i,ContinueStatement:i,DebuggerStatement:i,DoWhileStatement:i,ExpressionStatement:i,ForInStatement:i,ForOfStatement:i,ForStatement:i,FunctionDeclaration:i,IfStatement:i,ImportDeclaration:i,LabeledStatement:i,ReturnStatement:i,SwitchStatement:i,ThrowStatement:i,TryStatement:i,VariableDeclaration:i,WhileStatement:i,WithStatement:i,ExportNamedDeclaration:i,ExportDefaultDeclaration:i,ExportAllDeclaration:i,"BreakStatement:exit":o,"ClassDeclaration:exit":o,"ContinueStatement:exit":o,"DebuggerStatement:exit":o,"DoWhileStatement:exit":o,"ExpressionStatement:exit":o,"ForInStatement:exit":o,"ForOfStatement:exit":o,"ForStatement:exit":o,"FunctionDeclaration:exit":o,"IfStatement:exit":o,"ImportDeclaration:exit":o,"LabeledStatement:exit":o,"ReturnStatement:exit":o,"SwitchStatement:exit":o,"ThrowStatement:exit":o,"TryStatement:exit":o,"VariableDeclaration:exit":o,"WhileStatement:exit":o,"WithStatement:exit":o,"ExportNamedDeclaration:exit":o,"ExportDefaultDeclaration:exit":o,"ExportAllDeclaration:exit":o,"Program:exit":t}}}},{"../ast-utils":22}],82:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("lodash"),o=e("../ast-utils");t.exports={meta:{docs:{description:"enforce a maximum number of statements allowed in function blocks",category:"Stylistic Issues",recommended:!1},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]},{type:"object",properties:{ignoreTopLevelFunctions:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t,n,r){if(n>r){var a=i.upperFirst(o.getFunctionNameWithKind(t));e.report({node:t,message:"{{name}} has too many statements ({{count}}). Maximum allowed is {{max}}.",data:{name:a,count:n,max:r}})}}function n(){u.push(0)}function a(e){var n=u.pop();l&&0===u.length?p.push({node:e,count:n}):t(e,n,f)}function s(e){u[u.length-1]+=e.body.length}var u=[],c=e.options[0],l=e.options[1]&&e.options[1].ignoreTopLevelFunctions||!1,p=[],f=10;return"object"===("undefined"==typeof c?"undefined":r(c))&&c.hasOwnProperty("maximum")&&"number"==typeof c.maximum&&(f=c.maximum),"object"===("undefined"==typeof c?"undefined":r(c))&&c.hasOwnProperty("max")&&"number"==typeof c.max&&(f=c.max),"number"==typeof c&&(f=c),{FunctionDeclaration:n,FunctionExpression:n,ArrowFunctionExpression:n,BlockStatement:s,"FunctionDeclaration:exit":a,"FunctionExpression:exit":a,"ArrowFunctionExpression:exit":a,"Program:exit":function(){1!==p.length&&p.forEach(function(e){var n=e.count,r=e.node;t(r,n,f)})}}}}},{"../ast-utils":22,lodash:16}],83:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce newlines between operands of ternary expressions",category:"Stylistic Issues",recommended:!1},schema:[{enum:["always","never"]}]},create:function(e){function t(t,n,r){e.report({node:t,message:"{{expected}} newline between {{typeOfError}} of ternary expression.",data:{expected:r?"Expected":"Unexpected",typeOfError:t===n.test?"test and consequent":"consequent and alternate"}})}var n="never"!==e.options[0];return{ConditionalExpression:function(e){var i=r.isTokenOnSameLine(e.test,e.consequent),o=r.isTokenOnSameLine(e.consequent,e.alternate);n?(i&&t(e.test,e,!0),o&&t(e.consequent,e,!0)):(i||t(e.test,e,!1),o||t(e.consequent,e,!1))}}}}},{"../ast-utils":22}],84:[function(e,t,n){"use strict";function r(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)&&!Array.isArray(e[t]))throw new TypeError(t+", if provided, must be an Array");return e[t]||n}function i(e,t){return e[t]=!0,e}function o(e){var t=r(e,"capIsNewExceptions",a);return t!==a&&(t=t.concat(a)),t.reduce(i,{})}var a=["Array","Boolean","Date","Error","Function","Number","Object","RegExp","String","Symbol"];t.exports={meta:{docs:{description:"require constructor names to begin with a capital letter",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{newIsCap:{type:"boolean"},capIsNew:{type:"boolean"},newIsCapExceptions:{type:"array",items:{type:"string"}},newIsCapExceptionPattern:{type:"string"},capIsNewExceptions:{type:"array",items:{type:"string"}},capIsNewExceptionPattern:{type:"string"},properties:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){var t="";if("MemberExpression"===e.callee.type){var n=e.callee.property;"Literal"===n.type&&"string"==typeof n.value?t=n.value:"Identifier"!==n.type||e.callee.computed||(t=n.name)}else t=e.callee.name;return t}function n(e){var t=e.charAt(0),n=t.toLowerCase(),r=t.toUpperCase();return n===r?"non-alpha":t===n?"lower":"upper"}function a(e,t,n,r){var i=m.getText(t.callee);return!(!e[n]&&!e[i])||(!(!r||!r.test(i))||("UTC"===n&&"MemberExpression"===t.callee.type?"Identifier"===t.callee.object.type&&"Date"===t.callee.object.name:c&&"MemberExpression"===t.callee.type))}function s(t,n){var r=t.callee;"MemberExpression"===r.type&&(r=r.property),e.report({node:t,loc:r.loc.start,message:n})}var u=e.options[0]?Object.assign({},e.options[0]):{};u.newIsCap=u.newIsCap!==!1,u.capIsNew=u.capIsNew!==!1;var c=u.properties===!1,l=r(u,"newIsCapExceptions",[]).reduce(i,{}),p=u.newIsCapExceptionPattern?new RegExp(u.newIsCapExceptionPattern):null,f=o(u),d=u.capIsNewExceptionPattern?new RegExp(u.capIsNewExceptionPattern):null,h={},m=e.getSourceCode();return u.newIsCap&&(h.NewExpression=function(e){var r=t(e);if(r){var i=n(r),o="lower"!==i||a(l,e,r,p);o||s(e,"A constructor name should not start with a lowercase letter.")}}),u.capIsNew&&(h.CallExpression=function(e){var r=t(e);if(r){var i=n(r),o="upper"!==i||a(f,e,r,d);o||s(e,"A function with a name starting with an uppercase letter should only be used as a constructor.")}}),h}}},{}],85:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require parentheses when invoking a constructor with no arguments",category:"Stylistic Issues",recommended:!1},schema:[],fixable:"code"},create:function(e){var t=e.getSourceCode();return{NewExpression:function(n){if(0===n.arguments.length){var i=t.getLastToken(n),o=i&&r.isClosingParenToken(i),a=o&&r.isOpeningParenToken(t.getTokenBefore(i));a||e.report({node:n,message:"Missing '()' invoking a constructor.",fix:function(e){return e.insertTextAfter(n,"()")}})}}}}}},{"../ast-utils":22}],86:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require or disallow an empty line after variable declarations",category:"Stylistic Issues",recommended:!1,replacedBy:["padding-line-between-statements"]},schema:[{enum:["never","always"]}],fixable:"whitespace",deprecated:!0},create:function(e){function t(e){var t=f.getLastToken(e);if("Punctuator"===t.type&&";"===t.value){var n=f.getTokenBefore(t);if(n.loc.end.line!==t.loc.start.line)return n}return t}function n(e){return"var"===e||"let"===e||"const"===e}function i(e){return"ForStatement"===e||"ForInStatement"===e||"ForOfStatement"===e}function o(e){return"ExportNamedDeclaration"===e||"ExportSpecifier"===e||"ExportDefaultDeclaration"===e||"ExportAllDeclaration"===e}function a(e){var t=f.getTokenAfter(e);return!t||"Punctuator"===t.type&&"}"===t.value}function s(e){var t=h[e];return h[t+1]?s(t+1):t}function u(e,t){return e.loc.start.line>s(t)+1}function c(c){var m=t(c),g=m===f.getLastToken(c)?f.getTokenAfter(c):f.getLastToken(c),v=m.loc.end.line+1;if(g&&!i(c.parent.type)&&!o(c.parent.type)&&!("Keyword"===g.type&&n(g.value)||a(c))){var y=g.loc.start.line>v,x="undefined"!=typeof h[v];"never"===d&&y&&!x&&e.report({node:c,message:p,data:{identifier:c.name},fix:function(e){var t=f.getText().slice(m.range[1],g.range[0]).split(r.LINEBREAK_MATCHER);return e.replaceTextRange([m.range[1],g.range[0]],t.slice(0,-1).join("")+"\n"+t[t.length-1])}}),"always"!==d||y&&(!x||u(g,v))||e.report({node:c,message:l,data:{identifier:c.name},fix:function(e){return(y?s(v):m.loc.end.line)===g.loc.start.line?e.insertTextBefore(g,"\n\n"):e.insertTextBeforeRange([g.range[0]-g.loc.start.column,g.range[1]],"\n")}})}}var l="Expected blank line after variable declarations.",p="Unexpected blank line after variable declarations.",f=e.getSourceCode(),d="never"===e.options[0]?"never":"always",h=f.getAllComments().reduce(function(e,t){return e[t.loc.start.line]=t.loc.end.line,e},{});return{VariableDeclaration:c}}}},{"../ast-utils":22}],87:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require an empty line before `return` statements",category:"Stylistic Issues",recommended:!1,replacedBy:["padding-line-between-statements"]},fixable:"whitespace",schema:[],deprecated:!0},create:function(e){function t(e,t){var n=s.getTokenBefore(e);return t.some(function(e){return n.value===e})}function n(e){var n=e.parent.type;return e.parent.body?Array.isArray(e.parent.body)?e.parent.body[0]===e:e.parent.body===e:"IfStatement"===n?t(e,["else",")"]):"DoWhileStatement"===n?t(e,["do"]):"SwitchCase"===n?t(e,[":"]):t(e,[")"])}function r(e,t){var n=s.getCommentsBefore(e),r=0;return n.length?(n.forEach(function(n){r++,"Block"===n.type&&(r+=n.loc.end.line-n.loc.start.line),n.loc.start.line===t&&r--,n.loc.end.line===e.loc.start.line&&r--}),r):r}function i(e){var t=s.getTokenBefore(e),n=void 0;return n=t?t.loc.end.line:0}function o(e){var t=e.loc.start.line,n=i(e),o=r(e,n);return t-n-o>1}function a(e){var t=s.getCommentsBefore(e),n=t[t.length-1],r=s.getTokenBefore(e);return 0===t.length||n.loc.end.line===r.loc.end.line&&n.loc.end.line!==e.loc.start.line}var s=e.getSourceCode();return{ReturnStatement:function(t){n(t)||o(t)||e.report({node:t,message:"Expected newline before return statement.",fix:function(e){if(a(t)){var n=s.getTokenBefore(t),r=t.loc.start.line===n.loc.end.line?"\n\n":"\n";return e.insertTextBefore(t,r)}return null}})}}}}},{}],88:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require a newline after each call in a method chain",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{ignoreChainWithDepth:{type:"integer",minimum:1,maximum:10}},additionalProperties:!1}]},create:function(e){function t(e){var t=e.computed?"[":".",n=o.getText(e.property).split(r.LINEBREAK_MATCHER),i=e.computed&&1===n.length?"]":"";return t+n[0]+i}var n=e.options[0]||{},i=n.ignoreChainWithDepth||2,o=e.getSourceCode();return{"CallExpression:exit":function(n){if(n.callee&&"MemberExpression"===n.callee.type){for(var r=n.callee,o=r.object,a=1;o&&o.callee;)a+=1,o=o.callee.object;a>i&&r.property.loc.start.line===r.object.loc.end.line&&e.report({node:r.property,loc:r.property.loc.start,message:"Expected line break before `{{callee}}`.",data:{callee:t(r)}})}}}}}},{"../ast-utils":22}],89:[function(e,t,n){"use strict";function r(e){return/^(alert|confirm|prompt)$/.test(e)}function i(e,t,n){e.report(t,"Unexpected {{name}}.",{name:n})}function o(e,t){var n=e.references.filter(function(e){return e.identifier.range[0]===t.range[0]&&e.identifier.range[1]===t.range[1]});return 1===n.length?n[0]:null}function a(e,t,n){var r=o(e,n);return r&&r.resolved&&r.resolved.defs.length>0}function s(e,t,n){return"global"===e.type&&"ThisExpression"===n.type||"window"===n.name&&!a(e,t,n)}var u=e("../ast-utils").getStaticPropertyName;t.exports={meta:{docs:{description:"disallow the use of `alert`, `confirm`, and `prompt`",category:"Best Practices",recommended:!1},schema:[]},create:function(e){var t=void 0;return{Program:function(){t=e.getScope()},CallExpression:function(n){var o=n.callee,c=e.getScope();if("Identifier"===o.type){var l=o.name;!a(c,t,o)&&r(o.name)&&i(e,n,l)}else if("MemberExpression"===o.type&&s(c,t,o.object)){var p=u(o);r(p)&&i(e,n,p)}}}}}},{"../ast-utils":22}],90:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `Array` constructors",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){function t(t){1!==t.arguments.length&&"Identifier"===t.callee.type&&"Array"===t.callee.name&&e.report({node:t,message:"The array literal notation [] is preferrable."})}return{CallExpression:t,NewExpression:t}}}},{}],91:[function(e,t,n){"use strict";var r=new Set(["ForStatement","ForOfStatement","ForInStatement","WhileStatement","DoWhileStatement"]),i=new Set(["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]);t.exports={meta:{docs:{description:"disallow `await` inside of loops",category:"Possible Errors",recommended:!1},schema:[]},create:function(e){return{AwaitExpression:function(t){var n=e.getAncestors();n.reverse();for(var o=new Set(n).add(t),a=0;a>",">>>","^=","|=","&=","<<=",">>=",">>>=","~"];t.exports={meta:{docs:{description:"disallow bitwise operators",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:r},uniqueItems:!0},int32Hint:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){e.report({node:t,message:"Unexpected use of '{{operator}}'.",data:{operator:t.operator}})}function n(e){return r.indexOf(e.operator)!==-1}function i(e){return u.indexOf(e.operator)!==-1}function o(e){return c&&"|"===e.operator&&e.right&&"Literal"===e.right.type&&0===e.right.value}function a(e){!n(e)||i(e)||o(e)||t(e)}var s=e.options[0]||{},u=s.allow||[],c=s.int32Hint===!0;return{AssignmentExpression:a,BinaryExpression:a,UnaryExpression:a}}}},{}],93:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow use of the Buffer() constructor",category:"Node.js and CommonJS",recommended:!1},schema:[]},create:function(e){return{"CallExpression[callee.name='Buffer'], NewExpression[callee.name='Buffer']":function(t){e.report({node:t,message:"{{example}} is deprecated. Use Buffer.from(), Buffer.alloc(), or Buffer.allocUnsafe() instead.",data:{example:"CallExpression"===t.type?"Buffer()":"new Buffer()"}})}}}}},{}],94:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow the use of `arguments.caller` or `arguments.callee`",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{MemberExpression:function(t){var n=t.object.name,r=t.property.name;"arguments"===n&&!t.computed&&r&&r.match(/^calle[er]$/)&&e.report({node:t,message:"Avoid arguments.{{property}}.",data:{property:r}})}}}}},{}],95:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow lexical declarations in case clauses",category:"Best Practices",recommended:!0},schema:[]},create:function(e){function t(e){switch(e.type){case"FunctionDeclaration":case"ClassDeclaration":return!0;case"VariableDeclaration":return"var"!==e.kind;default:return!1}}return{SwitchCase:function(n){for(var r=0;r",">=","<","<=","==","===","!=","!=="]);return{BinaryExpression:function(r){n.has(r.operator)&&(t(r.left)||t(r.right))&&e.report({node:r,message:"Do not use the '{{operator}}' operator to compare against -0.",data:{operator:r.operator}})}}}}},{}],99:[function(e,t,n){"use strict";var r=e("../ast-utils"),i={DoWhileStatement:"a 'do...while' statement",ForStatement:"a 'for' statement",IfStatement:"an 'if' statement",WhileStatement:"a 'while' statement"};t.exports={meta:{docs:{description:"disallow assignment operators in conditional expressions",category:"Possible Errors",recommended:!0},schema:[{enum:["except-parens","always"]}]},create:function(e){function t(e){return e.parent&&e.parent.test&&e===e.parent.test}function n(e){var n=e;do if(t(n))return n.parent;while((n=n.parent)&&!r.isFunction(n));return null}function o(e){var t=c.getTokenBefore(e,1),n=c.getTokenAfter(e,1);return r.isParenthesised(c,e)&&r.isOpeningParenToken(t)&&t.range[1]<=e.range[0]&&r.isClosingParenToken(n)&&n.range[0]>=e.range[1]}function a(t){!t.test||"AssignmentExpression"!==t.test.type||("ForStatement"===t.type?r.isParenthesised(c,t.test):o(t.test))||e.report({node:t,loc:t.test.loc.start,message:"Expected a conditional expression and instead saw an assignment."})}function s(t){var r=n(t);r&&e.report({node:r,message:"Unexpected assignment within {{type}}.",data:{type:i[r.type]||r.type}})}var u=e.options[0]||"except-parens",c=e.getSourceCode();return"always"===u?{AssignmentExpression:s}:{DoWhileStatement:a,ForStatement:a,IfStatement:a,WhileStatement:a}}}},{"../ast-utils":22}],100:[function(e,t,n){"use strict";function r(e){return e&&"ConditionalExpression"===e.type}var i=e("../ast-utils.js");t.exports={meta:{docs:{description:"disallow arrow functions where they could be confused with comparisons",category:"ECMAScript 6",recommended:!1},fixable:"code",schema:[{type:"object",properties:{allowParens:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){var a=t.body;!r(a)||n.allowParens&&i.isParenthesised(o,a)||e.report({node:t,message:"Arrow function used ambiguously with a conditional expression.",fix:function(e){return n.allowParens&&e.replaceText(t.body,"("+o.getText(t.body)+")")}})}var n=e.options[0]||{},o=e.getSourceCode();return{ArrowFunctionExpression:t}}}},{"../ast-utils.js":22}],101:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow the use of `console`",category:"Possible Errors",recommended:!0},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},additionalProperties:!1}]},create:function(e){function t(e){var t=e.identifier;return t&&"console"===t.name}function n(e){var t=r.getStaticPropertyName(e);return t&&s.indexOf(t)!==-1}function i(e){var t=e.identifier,r=t.parent;return"MemberExpression"===r.type&&r.object===t&&!n(r)}function o(t){var n=t.identifier.parent; e.report({node:n,loc:n.loc,message:"Unexpected console statement."})}var a=e.options[0]||{},s=a.allow||[];return{"Program:exit":function(){var n=e.getScope(),a=r.getVariableByName(n,"console"),s=a&&a.defs.length>0,u=a?a.references:n.through.filter(t);s||u.filter(i).forEach(o)}}}}},{"../ast-utils":22}],102:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow reassigning `const` variables",category:"ECMAScript 6",recommended:!0},schema:[]},create:function(e){function t(t){r.getModifyingReferences(t.references).forEach(function(t){e.report({node:t.identifier,message:"'{{name}}' is constant.",data:{name:t.identifier.name}})})}return{VariableDeclaration:function(n){"const"===n.kind&&e.getDeclaredVariables(n).forEach(t)}}}}},{"../ast-utils":22}],103:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow constant expressions in conditions",category:"Possible Errors",recommended:!0},schema:[{type:"object",properties:{checkLoops:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e,n){switch(e.type){case"Literal":return"||"===n&&e.value===!0||"&&"===n&&e.value===!1;case"UnaryExpression":return"&&"===n&&"void"===e.operator;case"LogicalExpression":return t(e.left,e.operator)||t(e.right,e.operator)}return!1}function n(e,r){switch(e.type){case"Literal":case"ArrowFunctionExpression":case"FunctionExpression":case"ObjectExpression":case"ArrayExpression":return!0;case"UnaryExpression":return"void"===e.operator||("typeof"===e.operator&&r||n(e.argument,!0));case"BinaryExpression":return n(e.left,!1)&&n(e.right,!1)&&"in"!==e.operator;case"LogicalExpression":var i=n(e.left,r),o=n(e.right,r),a=i&&t(e.left,e.operator),s=o&&t(e.right,e.operator);return i&&o||a||s;case"AssignmentExpression":return"="===e.operator&&n(e.right,r);case"SequenceExpression":return n(e.expressions[e.expressions.length-1],r)}return!1}function r(t){t.test&&n(t.test,!0)&&e.report({node:t,message:"Unexpected constant condition."})}function i(e){a&&r(e)}var o=e.options[0]||{},a=o.checkLoops!==!1;return{ConditionalExpression:r,IfStatement:r,WhileStatement:i,DoWhileStatement:i,ForStatement:i}}}},{}],104:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `continue` statements",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){return{ContinueStatement:function(t){e.report({node:t,message:"Unexpected use of continue statement."})}}}}},{}],105:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow control characters in regular expressions",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){function t(t){if(t.value instanceof RegExp)return t.value;if("string"==typeof t.value){var n=e.getAncestors().pop();if(("NewExpression"===n.type||"CallExpression"===n.type)&&"Identifier"===n.callee.type&&"RegExp"===n.callee.name)try{return new RegExp(t.value)}catch(e){return null}}return null}function n(e){var t=e.match(r)||[],n=[],u=e.search(a);if(u>-1){var c=e.slice(0,u).match(o),l=null===c||!(c[0].length%2);l&&(n=e.slice(u,-1).split(i).filter(Boolean).map(function(e){var t=e.match(s)||[e];return"\\"+t[0]}))}return t.map(function(e){var t=("0"+e.charCodeAt(0).toString(16)).slice(-2);return"\\x"+t}).concat(n)}var r=/[\x00-\x1f]/g,i=/\\+/g,o=/\\+$/g,a=/\\x[01][0-9a-f]/gi,s=/x[01][0-9a-f]/gi;return{Literal:function(r){var i=t(r);if(i){var o=i.toString(),a=n(o);a.length>0&&e.report({node:r,message:"Unexpected control character(s) in regular expression: {{controlChars}}.",data:{controlChars:a.join(", ")}})}}}}}},{}],106:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow the use of `debugger`",category:"Possible Errors",recommended:!0},fixable:"code",schema:[]},create:function(e){return{DebuggerStatement:function(t){e.report({node:t,message:"Unexpected 'debugger' statement.",fix:function(e){return e.remove(t)}})}}}}},{}],107:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow deleting variables",category:"Variables",recommended:!0},schema:[]},create:function(e){return{UnaryExpression:function(t){"delete"===t.operator&&"Identifier"===t.argument.type&&e.report({node:t,message:"Variables should not be deleted."})}}}}},{}],108:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow division operators explicitly at the beginning of regular expressions",category:"Best Practices",recommended:!1},schema:[]},create:function(e){var t=e.getSourceCode();return{Literal:function(n){var r=t.getFirstToken(n);"RegularExpression"===r.type&&"="===r.value[1]&&e.report({node:n,message:"A regular expression literal can be confused with '/='."})}}}}},{}],109:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow duplicate arguments in `function` definitions",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){function t(e){return"Parameter"===e.type}function n(n){for(var r=e.getDeclaredVariables(n),i=0;i=2&&e.report({node:n,message:"Duplicate param '{{name}}'.",data:{name:o.name}})}}return{FunctionDeclaration:n,FunctionExpression:n}}}},{}],110:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow duplicate class members",category:"ECMAScript 6",recommended:!0},schema:[]},create:function(e){function t(e,t){var n=r[r.length-1],i="$"+e;return n[i]||(n[i]={nonStatic:{init:!1,get:!1,set:!1},static:{init:!1,get:!1,set:!1}}),n[i][t?"static":"nonStatic"]}function n(e){switch(e.type){case"Identifier":return e.name;case"Literal":return String(e.value);default:return""}}var r=[];return{Program:function(){r=[]},ClassBody:function(){r.push(Object.create(null))},"ClassBody:exit":function(){r.pop()},MethodDefinition:function(r){if(!r.computed){var i=n(r.key),o=t(i,r.static),a=!1;"get"===r.kind?(a=o.init||o.get,o.get=!0):"set"===r.kind?(a=o.init||o.set,o.set=!0):(a=o.init||o.get||o.set,o.init=!0),a&&e.report({node:r,message:"Duplicate name '{{name}}'.",data:{name:i}})}}}}}},{}],111:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n0||e.report({node:t,message:"Empty block statement."}))},SwitchStatement:function(t){"undefined"!=typeof t.cases&&0!==t.cases.length||e.report({node:t,message:"Empty switch statement."})}}}}},{"../ast-utils":22}],119:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `null` comparisons without type-checking operators",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{BinaryExpression:function(t){var n="=="===t.operator||"!="===t.operator;("Literal"===t.right.type&&"null"===t.right.raw&&n||"Literal"===t.left.type&&"null"===t.left.raw&&n)&&e.report({node:t,message:"Use ‘===’ to compare with ‘null’."})}}}}},{}],120:[function(e,t,n){"use strict";function r(e,t){return"Identifier"===e.type&&e.name===t}function i(e,t){switch(e.type){case"Literal":return e.value===t;case"TemplateLiteral":return 0===e.expressions.length&&e.quasis[0].value.cooked===t;default:return!1}}function o(e,t){return"MemberExpression"===e.type&&(e.computed?i:r)(e.property,t)}var a=e("../ast-utils"),s=Object.freeze(["global","window"]);t.exports={meta:{docs:{description:"disallow the use of `eval()`",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{allowIndirect:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){var n=e.getScope().isStrict;f={upper:f,node:t,strict:n,defaultThis:!1,initialized:n}}function n(){f=f.upper}function i(t){var n=t,r=t.parent;"MemberExpression"===t.type&&(n=t.property),"CallExpression"===r.type&&r.callee===t&&(t=r),e.report({node:t,loc:n.loc.start,message:"eval can be harmful."})}function u(e){for(var t=0;t1||"SpreadElement"===i.arguments[0].type)return null;var t=i.arguments[0];return r.getPrecedence(t)=e.range[1]}function i(e){return t(e)&&E(e)}function o(e){return t(e)&&n(e)}function a(e){return T&&"AssignmentExpression"===e.test.type}function s(e){for(;e;){if("ReturnStatement"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type)return!0;e=e.parent}return!1}function u(e){var t=_.getLastToken(e),n=_.getTokenBefore(t);return e.arguments.length>0||r.isOpeningParenToken(n)&&r.isClosingParenToken(t)}function c(e){return"AssignmentExpression"===e.type||("ConditionalExpression"===e.type&&("AssignmentExpression"===e.consequent.type||"AssignmentExpression"===e.alternate.type)||!!(e.left&&"AssignmentExpression"===e.left.type||e.right&&"AssignmentExpression"===e.right.type))}function l(e){return!(!A||!s(e))&&("ReturnStatement"===e.type?e.argument&&c(e.argument):c("ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type?e.body:e))}function p(e,t){return e.loc.end.line===t.loc.start.line?i(t):o(t)}function f(e){var t=_.getTokenBefore(e),n=_.getTokenBefore(e,1),i=_.getFirstToken(e);return n&&n.range[1]===t.range[0]&&t.range[1]===i.range[0]&&!r.canTokensBeAdjacent(n,i)}function d(e){var t=_.getTokensAfter(e,{count:2}),n=t[0],i=t[1],o=_.getLastToken(e);return n&&i&&!_.isSpaceBetweenTokens(n,i)&&!r.canTokensBeAdjacent(o,i)}function h(t){var r=_.getTokenBefore(t),i=_.getTokenAfter(t);w.has(_.getFirstToken(t))&&!n(t)||e.report({node:t,loc:r.loc.start,message:"Gratuitous parentheses around expression.",fix:function(e){var n=_.text.slice(r.range[1],i.range[0]);return e.replaceTextRange([r.range[0],i.range[1]],(f(t)?" ":"")+n+(d(t)?" ":""))}})}function m(e){"UnaryExpression"===e.type&&"BinaryExpression"===e.argument.type&&"**"===e.argument.operator||i(e.argument)&&S(e.argument)>=S(e)&&h(e.argument)}function g(e){i(e.callee)&&S(e.callee)>=S(e)&&("CallExpression"!==e.type||"FunctionExpression"!==e.callee.type&&("NewExpression"!==e.callee.type||u(e.callee))||o(e.callee))&&h(e.callee),1===e.arguments.length?o(e.arguments[0])&&S(e.arguments[0])>=k&&h(e.arguments[0]):[].forEach.call(e.arguments,function(e){i(e)&&S(e)>=k&&h(e)})}function v(e){var t=S(e),n=S(e.left),r=S(e.right),o="**"===e.operator,a=D&&("BinaryExpression"===e.left.type||"LogicalExpression"===e.left.type)||"UnaryExpression"===e.left.type&&o,s=D&&("BinaryExpression"===e.right.type||"LogicalExpression"===e.right.type);!a&&i(e.left)&&(n>t||n===t&&!o)&&h(e.left),!s&&i(e.right)&&(r>t||r===t&&o)&&h(e.right)}function y(e){if(e.superClass){var t=S(e.superClass)>I?i(e.superClass):o(e.superClass);t&&h(e.superClass)}}function x(e){var t=S(e.argument)>=k?i(e.argument):o(e.argument);t&&h(e.argument)}function b(e){var t=E(e)?_.getTokenBefore(e):_.getFirstToken(e),n=_.getTokenAfter(t,r.isNotOpeningParenToken);r.isOpeningParenToken(t)&&(r.isOpeningBraceToken(n)||"Keyword"===n.type&&("function"===n.value||"class"===n.value||"let"===n.value&&r.isOpeningBracketToken(_.getTokenAfter(n))))&&w.add(n),i(e)&&h(e)}var _=e.getSourceCode(),w=new WeakSet,E=r.isParenthesised.bind(r,_),S=r.getPrecedence,C="functions"!==e.options[0],T=C&&e.options[1]&&e.options[1].conditionalAssign===!1,D=C&&e.options[1]&&e.options[1].nestedBinaryExpressions===!1,A=C&&e.options[1]&&e.options[1].returnAssign===!1,P=C&&e.options[1]&&e.options[1].ignoreJSX,k=S({type:"AssignmentExpression"}),I=S({type:"UpdateExpression"});return{ArrayExpression:function(e){[].forEach.call(e.elements,function(e){e&&i(e)&&S(e)>=k&&h(e)})},ArrowFunctionExpression:function(e){if(!l(e)&&"BlockStatement"!==e.body.type){var t=_.getFirstToken(e.body,r.isNotOpeningParenToken),n=_.getTokenBefore(t);r.isOpeningParenToken(n)&&r.isOpeningBraceToken(t)&&w.add(t),i(e.body)&&S(e.body)>=k&&h(e.body)}},AssignmentExpression:function(e){l(e)||i(e.right)&&S(e.right)>=S(e)&&h(e.right)},BinaryExpression:v,CallExpression:g,ConditionalExpression:function(e){l(e)||(i(e.test)&&S(e.test)>=S({type:"LogicalExpression",operator:"||"})&&h(e.test),i(e.consequent)&&S(e.consequent)>=k&&h(e.consequent),i(e.alternate)&&S(e.alternate)>=k&&h(e.alternate))},DoWhileStatement:function(e){o(e.test)&&!a(e)&&h(e.test)},ExportDefaultDeclaration:function(e){return b(e.declaration)},ExpressionStatement:function(e){return b(e.expression)},ForInStatement:function(e){i(e.right)&&h(e.right),i(e.left)&&h(e.left)},ForOfStatement:function(e){i(e.right)&&h(e.right),i(e.left)&&h(e.left)},ForStatement:function(e){e.init&&i(e.init)&&h(e.init),e.test&&i(e.test)&&!a(e)&&h(e.test),e.update&&i(e.update)&&h(e.update)},IfStatement:function(e){o(e.test)&&!a(e)&&h(e.test)},LogicalExpression:v,MemberExpression:function(e){i(e.object)&&S(e.object)>=S(e)&&(e.computed||!(r.isDecimalInteger(e.object)||"Literal"===e.object.type&&e.object.regex))&&h(e.object),e.computed&&i(e.property)&&h(e.property)},NewExpression:g,ObjectExpression:function(e){[].forEach.call(e.properties,function(e){var t=e.value;t&&i(t)&&S(t)>=k&&h(t)})},ReturnStatement:function(e){var t=_.getFirstToken(e);l(e)||!e.argument||!p(t,e.argument)||"Literal"===e.argument.type&&e.argument.regex||h(e.argument)},SequenceExpression:function(e){[].forEach.call(e.expressions,function(t){i(t)&&S(t)>=S(e)&&h(t)})},SwitchCase:function(e){e.test&&i(e.test)&&h(e.test)},SwitchStatement:function(e){o(e.discriminant)&&h(e.discriminant)},ThrowStatement:function(e){var t=_.getFirstToken(e);p(t,e.argument)&&h(e.argument)},UnaryExpression:m,UpdateExpression:m,AwaitExpression:m,VariableDeclarator:function(e){e.init&&i(e.init)&&S(e.init)>=k&&("Literal"!==e.init.type||!e.init.regex)&&h(e.init)},WhileStatement:function(e){o(e.test)&&!a(e)&&h(e.test)},WithStatement:function(e){o(e.object)&&h(e.object)},YieldExpression:function(e){if(e.argument){var t=_.getFirstToken(e);(S(e.argument)>=S(e)&&p(t,e.argument)||o(e.argument))&&h(e.argument)}},ClassDeclaration:y,ClassExpression:y,SpreadElement:x,SpreadProperty:x,ExperimentalSpreadProperty:x}}}},{"../ast-utils.js":22}],127:[function(e,t,n){"use strict";var r=e("../util/fix-tracker"),i=e("../ast-utils");t.exports={meta:{docs:{description:"disallow unnecessary semicolons",category:"Possible Errors",recommended:!0},fixable:"code",schema:[]},create:function(e){function t(t){e.report({node:t,message:"Unnecessary semicolon.",fix:function(n){return new r(n,e.getSourceCode()).retainSurroundingTokens(t).remove(t)}})}function n(e){for(var n=e;"Punctuator"===n.type&&!i.isClosingBraceToken(n);n=o.getTokenAfter(n))i.isSemicolonToken(n)&&t(n)}var o=e.getSourceCode();return{EmptyStatement:function(e){var n=e.parent,r=["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement","IfStatement","LabeledStatement","WithStatement"];r.indexOf(n.type)===-1&&t(e)},ClassBody:function(e){n(o.getFirstToken(e,1))},MethodDefinition:function(e){n(o.getTokenAfter(e))}}}}},{"../ast-utils":22,"../util/fix-tracker":277}],128:[function(e,t,n){"use strict";function r(e,t,n){var r=t.getSourceCode(),i=a.last(r.getCommentsBefore(e));return Boolean(i&&n.test(i.value))}function i(e){return e.reachable}function o(e,t){return t.loc.start.line>e.loc.end.line+1}var a=e("lodash"),s=/falls?\s?through/i;t.exports={meta:{docs:{description:"disallow fallthrough of `case` statements",category:"Best Practices",recommended:!0},schema:[{type:"object",properties:{commentPattern:{type:"string"}},additionalProperties:!1}]},create:function(e){var t=e.options[0]||{},n=null,u=e.getSourceCode(),c=null,l=null;return l=t.commentPattern?new RegExp(t.commentPattern):s,{onCodePathStart:function(e){n=e},onCodePathEnd:function(){n=n.upper},SwitchCase:function(t){c&&!r(t,e,l)&&e.report({message:"Expected a 'break' statement before '{{type}}'.",data:{type:t.test?"case":"default"},node:t}),c=null},"SwitchCase:exit":function(e){var t=u.getTokenAfter(e);n.currentSegments.some(i)&&(e.consequent.length>0||o(e,t))&&a.last(e.parent.cases)!==e&&(c=e)}}}}},{lodash:16}],129:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow leading or trailing decimal points in numeric literals",category:"Best Practices",recommended:!1},schema:[],fixable:"code"},create:function(e){var t=e.getSourceCode();return{Literal:function(n){"number"==typeof n.value&&(n.raw.startsWith(".")&&e.report({node:n,message:"A leading decimal point can be confused with a dot.",fix:function(e){var i=t.getTokenBefore(n),o=i&&i.range[1]===n.range[0]&&!r.canTokensBeAdjacent(i,"0"+n.raw);return e.insertTextBefore(n,o?" 0":"0")}}),n.raw.indexOf(".")===n.raw.length-1&&e.report({node:n,message:"A trailing decimal point can be confused with a dot.",fix:function(e){return e.insertTextAfter(n,"0")}}))}}}}},{"../ast-utils":22}],130:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow reassigning `function` declarations",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){function t(t){r.getModifyingReferences(t).forEach(function(t){e.report({node:t.identifier,message:"'{{name}}' is a function.",data:{name:t.identifier.name}})})}function n(e){"FunctionName"===e.defs[0].type&&t(e.references)}function i(t){e.getDeclaredVariables(t).forEach(n)}return{FunctionDeclaration:i,FunctionExpression:i}}}},{"../ast-utils":22}],131:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow assignments to native objects or read-only global variables", category:"Best Practices",recommended:!0},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]},create:function(e){function t(t,n,r){var i=t.identifier;t.init!==!1||!t.isWrite()||0!==n&&r[n-1].identifier===i||e.report({node:i,message:"Read-only global '{{name}}' should not be modified.",data:i})}function n(e){e.writeable===!1&&i.indexOf(e.name)===-1&&e.references.forEach(t)}var r=e.options[0],i=r&&r.exceptions||[];return{Program:function(){var t=e.getScope();t.variables.forEach(n)}}}}},{}],132:[function(e,t,n){"use strict";function r(e){return e=e||{},{boolean:!("boolean"in e)||Boolean(e.boolean),number:!("number"in e)||Boolean(e.number),string:!("string"in e)||Boolean(e.string),allow:e.allow||[]}}function i(e){return"!"===e.operator&&"UnaryExpression"===e.argument.type&&"!"===e.argument.operator}function o(e){return"~"===e.operator&&"CallExpression"===e.argument.type&&"MemberExpression"===e.argument.callee.type&&"Identifier"===e.argument.callee.property.type&&h.test(e.argument.callee.property.name)}function a(e){return"*"===e.operator&&("Literal"===e.left.type&&1===e.left.value||"Literal"===e.right.type&&1===e.right.value)}function s(e){return"Literal"===e.type&&"number"==typeof e.value||"CallExpression"===e.type&&("Number"===e.callee.name||"parseInt"===e.callee.name||"parseFloat"===e.callee.name)}function u(e){var t=e.left,n=e.right;return"BinaryExpression"===n.type||s(n)?"BinaryExpression"===t.type||s(t)?null:t:n}function c(e){return d.isStringLiteral(e)&&(""===e.value||"TemplateLiteral"===e.type&&1===e.quasis.length&&""===e.quasis[0].value.cooked)}function l(e){return"+"===e.operator&&(c(e.left)&&!d.isStringLiteral(e.right)||c(e.right)&&!d.isStringLiteral(e.left))}function p(e){return"+="===e.operator&&c(e.right)}function f(e){return c(e.left)?e.right:e.left}var d=e("../ast-utils"),h=/^(?:i|lastI)ndexOf$/,m=["~","!!","+","*"];t.exports={meta:{docs:{description:"disallow shorthand type conversions",category:"Best Practices",recommended:!1},fixable:"code",schema:[{type:"object",properties:{boolean:{type:"boolean"},number:{type:"boolean"},string:{type:"boolean"},allow:{type:"array",items:{enum:m},uniqueItems:!0}},additionalProperties:!1}]},create:function(e){function t(t,n,r){r="undefined"==typeof r||r,e.report({node:t,message:"use `{{recommendation}}` instead.",data:{recommendation:n},fix:function(e){if(!r)return null;var i=c.getTokenBefore(t);return i&&i.range[1]===t.range[0]&&!d.canTokensBeAdjacent(i,n)?e.replaceText(t," "+n):e.replaceText(t,n)}})}var n=r(e.options[0]),c=e.getSourceCode();return{UnaryExpression:function(e){var r=void 0;if(r=n.allow.indexOf("!!")>=0,!r&&n.boolean&&i(e)){var a="Boolean("+c.getText(e.argument.argument)+")";t(e,a)}if(r=n.allow.indexOf("~")>=0,!r&&n.boolean&&o(e)){var u=c.getText(e.argument)+" !== -1";t(e,u,!1)}if(r=n.allow.indexOf("+")>=0,!r&&n.number&&"+"===e.operator&&!s(e.argument)){var l="Number("+c.getText(e.argument)+")";t(e,l)}},"BinaryExpression:exit":function(e){var r=void 0;r=n.allow.indexOf("*")>=0;var i=!r&&n.number&&a(e)&&u(e);if(i){var o="Number("+c.getText(i)+")";t(e,o)}if(r=n.allow.indexOf("+")>=0,!r&&n.string&&l(e)){var s="String("+c.getText(f(e))+")";t(e,s)}},AssignmentExpression:function(e){var r=n.allow.indexOf("+")>=0;if(!r&&n.string&&p(e)){var i=c.getText(f(e)),o=i+" = String("+i+")";t(e,o)}}}}}},{"../ast-utils":22}],133:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow variable and `function` declarations in the global scope",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{Program:function(){var t=e.getScope();t.variables.forEach(function(t){t.writeable||t.defs.forEach(function(t){("FunctionName"===t.type||"Variable"===t.type&&"var"===t.parent.kind)&&e.report({node:t.node,message:"Implicit global variable, assign as global property instead."})})}),t.implicit.variables.forEach(function(n){var r=t.set.get(n.name);r&&r.writeable||n.defs.forEach(function(t){e.report({node:t.node,message:"Implicit global variable, assign as global property instead."})})})}}}}},{}],134:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow the use of `eval()`-like methods",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(e){return e?e[e.length-1]:null}function n(e){var t=e.object,n=e.property,r=a.test(n.name)||a.test(n.value);return"window"===t.name&&r}function r(e){var t="MemberExpression"===e.callee.type,r="Identifier"===e.callee.type,i=r&&a.test(e.callee.name)||t&&n(e.callee);return i&&e.arguments.length}function i(e){return e.parent===t(t(s))&&("CallExpression"!==e.parent.type||e===e.parent.arguments[0])}function o(t){if(i(t)){var n=s.pop();e.report({node:n[0],message:"Implied eval. Consider passing a function instead of a string."})}}var a=/^(setTimeout|setInterval|execScript)$/,s=[];return{CallExpression:function(e){r(e)&&s.push([e])},"CallExpression:exit":function(e){e===t(t(s))&&s.pop()},BinaryExpression:function(e){"+"===e.operator&&i(e)&&t(s).push(e)},"BinaryExpression:exit":function(e){e===t(t(s))&&t(s).pop()},Literal:function(e){"string"==typeof e.value&&o(e)},TemplateLiteral:function(e){o(e)}}}}},{}],135:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow inline comments after code",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){function t(t){var i=String(n.lines[t.loc.start.line-1]),o=String(n.lines[t.loc.end.line-1]),a=i.slice(0,t.loc.start.column).trim(),s=o.slice(t.loc.end.column).trim(),u=r.isDirectiveComment(t);u||!a&&!s||e.report({node:t,message:"Unexpected comment inline with code."})}var n=e.getSourceCode();return{Program:function(){var e=n.getAllComments();e.filter(function(e){return"Shebang"!==e.type}).forEach(t)}}}}},{"../ast-utils":22}],136:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow variable or `function` declarations in nested blocks",category:"Possible Errors",recommended:!0},schema:[{enum:["functions","both"]}]},create:function(e){function t(){for(var t=e.getAncestors(),n=t.pop(),r=1;n&&["Program","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"].indexOf(n.type)<0;)r+=1,n=t.pop();return{type:n.type,distance:r}}function n(n){var r=t(),i="Program"===r.type&&1===r.distance||2===r.distance;i||e.report({node:n,message:"Move {{type}} declaration to {{body}} root.",data:{type:"FunctionDeclaration"===n.type?"function":"variable",body:"Program"===r.type?"program":"function body"}})}return{FunctionDeclaration:n,VariableDeclaration:function(t){"both"===e.options[0]&&"var"===t.kind&&n(t)}}}}},{}],137:[function(e,t,n){"use strict";var r=e("espree");t.exports={meta:{docs:{description:"disallow invalid regular expression strings in `RegExp` constructors",category:"Possible Errors",recommended:!0},schema:[{type:"object",properties:{allowConstructorFlags:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},create:function(e){function t(e){return e&&"Literal"===e.type&&"string"==typeof e.value}function n(n){if("Identifier"===n.callee.type&&"RegExp"===n.callee.name&&t(n.arguments[0])){var i=t(n.arguments[1])?n.arguments[1].value:"";o&&(i=i.replace(new RegExp("["+o+"]","gi"),""));try{void new RegExp(n.arguments[0].value)}catch(t){e.report({node:n,message:"{{message}}.",data:t})}if(i)try{r.parse("/./"+i,e.parserOptions)}catch(t){e.report({node:n,message:"Invalid flags supplied to RegExp constructor '{{flags}}'.",data:{flags:i}})}}}var i=e.options[0],o="";return i&&i.allowConstructorFlags&&(o=i.allowConstructorFlags.join("")),{CallExpression:n,NewExpression:n}}}},{espree:"espree"}],138:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow `this` keywords outside of classes or class-like objects",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(t){i.push({init:!e.getScope().isStrict,node:t,valid:!0})}function n(){i.pop()}var i=[],o=e.getSourceCode();return i.getCurrent=function(){var e=this[this.length-1];return e.init||(e.init=!0,e.valid=!r.isDefaultThisBinding(e.node,o)),e},{Program:function(t){var n=e.getScope(),r=e.parserOptions.ecmaFeatures||{};i.push({init:!0,node:t,valid:!(n.isStrict||"module"===t.sourceType||r.globalReturn&&n.childScopes[0].isStrict)})},"Program:exit":function(){i.pop()},FunctionDeclaration:t,"FunctionDeclaration:exit":n,FunctionExpression:t,"FunctionExpression:exit":n,ThisExpression:function(t){var n=i.getCurrent();n&&!n.valid&&e.report({node:t,message:"Unexpected 'this'."})}}}}},{"../ast-utils":22}],139:[function(e,t,n){"use strict";var r=e("../ast-utils"),i=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000\u2028\u2029]/,o=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/gm,a=/[\u2028\u2029]/gm,s=r.createGlobalLinebreakMatcher();t.exports={meta:{docs:{description:"disallow irregular whitespace outside of strings and comments",category:"Possible Errors",recommended:!0},schema:[{type:"object",properties:{skipComments:{type:"boolean"},skipStrings:{type:"boolean"},skipTemplates:{type:"boolean"},skipRegExps:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){var t=e.loc.start,n=e.loc.end;f=f.filter(function(e){var r=e[1];return!(r.line>=t.line&&r.line<=n.line&&r.column>=t.column&&(r.column<=n.column||r.line=6&&(o={BlockStatement:function(e){n(e)&&i.push(e)},"BlockStatement:exit":function(e){i.length>0&&i[i.length-1]===e&&(i.pop(),t(e))}},o.VariableDeclaration=function(e){"let"!==e.kind&&"const"!==e.kind||r()},o.FunctionDeclaration=function(){e.getScope().isStrict&&r()},o.ClassDeclaration=r),o}}},{}],144:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `if` statements as the only statement in `else` blocks",category:"Stylistic Issues",recommended:!1},schema:[],fixable:"code"},create:function(e){var t=e.getSourceCode();return{IfStatement:function(n){var r=e.getAncestors(),i=r.pop(),o=r.pop();i&&"BlockStatement"===i.type&&1===i.body.length&&o&&"IfStatement"===o.type&&i===o.alternate&&e.report({node:n,message:"Unexpected if as the only statement in an else block.",fix:function(e){var r=t.getFirstToken(i),o=t.getLastToken(i),a=t.getTokenBefore(r),s=t.getTokenAfter(o),u=t.getLastToken(n.consequent),c=t.getText();return c.slice(r.range[1],n.range[0]).trim()||c.slice(n.range[1],o.range[0]).trim()?null:"BlockStatement"!==n.consequent.type&&";"!==u.value&&s&&(n.consequent.loc.end.line===s.loc.start.line||/^[([\/+`-]/.test(s.value)||"++"===u.value||"--"===u.value)?null:e.replaceTextRange([r.range[0],o.range[1]],(a.range[1]===r.range[0]?" ":"")+t.getText(n))}})}}}}},{}],145:[function(e,t,n){"use strict";function r(e){for(var t=e.parent;t;){switch(t.type){case"WhileStatement":case"DoWhileStatement":return t;case"ForStatement":if(t.init!==e)return t;break;case"ForInStatement":case"ForOfStatement":if(t.right!==e)return t;break;case"ArrowFunctionExpression":case"FunctionExpression":case"FunctionDeclaration":return null}e=t,t=e.parent}return null}function i(e,t){for(var n=e,i=t?t.range[1]:0;e&&e.range[0]>=i;)n=e,e=r(e);return n}function o(e,t,n){function r(e){var t=e.identifier;return!e.isWrite()||o.scope.variableScope===e.from.variableScope&&t.range[0]t.range[0]&&s.range[1]0&&!i.every(o.bind(null,t,n))&&e.report({node:t,message:"Don't make functions within a loop."})}}return{ArrowFunctionExpression:t,FunctionExpression:t,FunctionDeclaration:t}}}},{}],146:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow magic numbers",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{detectObjects:{type:"boolean"},enforceConst:{type:"boolean"},ignore:{type:"array",items:{type:"number"},uniqueItems:!0},ignoreArrayIndexes:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){return"number"==typeof e.value}function n(e){return c.indexOf(e)!==-1}function r(e,t){return"CallExpression"===e.type&&t===e.arguments[1]&&("parseInt"===e.callee.name||"MemberExpression"===e.callee.type&&"Number"===e.callee.object.name&&"parseInt"===e.callee.property.name)}function i(e){return 0===e.type.indexOf("JSX")}function o(e){return"MemberExpression"===e.type&&l}var a=e.options[0]||{},s=!!a.detectObjects,u=!!a.enforceConst,c=a.ignore||[],l=!!a.ignoreArrayIndexes;return{Literal:function(a){var c=a.parent,l=a.value,p=a.raw,f=s?[]:["ObjectExpression","Property","AssignmentExpression"];t(a)&&("UnaryExpression"===c.type&&"-"===c.operator&&(a=c,c=a.parent,l=-l,p="-"+p),n(l)||r(c,a)||o(c)||i(c)||("VariableDeclarator"===c.type?u&&"const"!==c.parent.kind&&e.report({node:a,message:"Number constants declarations must use 'const'."}):(f.indexOf(c.type)===-1||"AssignmentExpression"===c.type&&"Identifier"===c.left.type)&&e.report({node:a,message:"No magic number: {{raw}}.",data:{raw:p}})))}}}}},{}],147:[function(e,t,n){"use strict";function r(e){var t=e&&e.groups&&e.groups.length>0,n=t?e.groups:f,r=(e&&e.allowSamePrecedence)!==!1;return{groups:n,allowSamePrecedence:r}}function i(e,t,n){return e.some(function(e){return e.indexOf(t)!==-1&&e.indexOf(n)!==-1})}var o=e("../ast-utils.js"),a=["+","-","*","/","%","**"],s=["&","|","^","~","<<",">>",">>>"],u=["==","!=","===","!==",">",">=","<","<="],c=["&&","||"],l=["in","instanceof"],p=[].concat(a,s,u,c,l),f=[a,s,u,c,l],d=/^(?:Binary|Logical)Expression$/;t.exports={meta:{docs:{description:"disallow mixed binary operators",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{groups:{type:"array",items:{type:"array",items:{enum:p},minItems:2,uniqueItems:!0},uniqueItems:!0},allowSamePrecedence:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){var t=e,n=e.parent;return!i(l.groups,t.operator,n.operator)||l.allowSamePrecedence&&o.getPrecedence(t)===o.getPrecedence(n)}function n(e){return e.operator!==e.parent.operator&&!o.isParenthesised(c,e)}function a(e){return c.getTokenAfter(e.left,o.isNotClosingParenToken)}function s(t){var n=t.parent,r=n.left===t?t:n,i=n.left!==t?t:n,o="Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'.",s={leftOperator:r.operator,rightOperator:i.operator};e.report({node:r,loc:a(r).loc.start,message:o,data:s}),e.report({node:i,loc:a(i).loc.start,message:o,data:s})}function u(e){d.test(e.parent.type)&&n(e)&&!t(e)&&s(e)}var c=e.getSourceCode(),l=r(e.options[0]);return{BinaryExpression:u,LogicalExpression:u}}}},{"../ast-utils.js":22}],148:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.exports={meta:{docs:{description:"disallow `require` calls to be mixed with regular variable declarations",category:"Node.js and CommonJS",recommended:!1},schema:[{oneOf:[{type:"boolean"},{type:"object",properties:{grouping:{type:"boolean"},allowCall:{type:"boolean"}},additionalProperties:!1}]}]},create:function(e){function t(){return["assert","buffer","child_process","cluster","crypto","dgram","dns","domain","events","fs","http","https","net","os","path","punycode","querystring","readline","repl","smalloc","stream","string_decoder","tls","tty","url","util","v8","vm","zlib"]}function n(e){return e?"CallExpression"===e.type&&"Identifier"===e.callee.type&&"require"===e.callee.name?p:c&&"CallExpression"===e.type&&"CallExpression"===e.callee.type?n(e.callee):"MemberExpression"===e.type?n(e.object):d:f}function i(e){if("MemberExpression"===e.type)return i(e.object);if(0===e.arguments.length)return v;var t=e.arguments[0];return"Literal"!==t.type||"string"!=typeof t.value?v:l.indexOf(t.value)!==-1?h:/^\.{0,2}\//.test(t.value)?m:g}function o(e){var t={};return e.forEach(function(e){var r=n(e.init);t[r]=!0}),!(!t[p]||!t[f]&&!t[d])}function a(e){var t={};return e.forEach(function(e){n(e.init)===p&&(t[i(e.init)]=!0)}),Object.keys(t).length<=1}var s=e.options[0],u=!1,c=!1;"object"===("undefined"==typeof s?"undefined":r(s))?(u=s.grouping,c=s.allowCall):u=!!s;var l=t(),p="require",f="uninitialized",d="other",h="core",m="file",g="module",v="computed";return{VariableDeclaration:function(t){o(t.declarations)?e.report({node:t,message:"Do not mix 'require' and other declarations."}):u&&!a(t.declarations)&&e.report({node:t,message:"Do not mix core, module, file and computed requires."})}}}}},{}],149:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow mixed spaces and tabs for indentation",category:"Stylistic Issues",recommended:!0},schema:[{enum:["smart-tabs",!0,!1]}]},create:function(e){function t(e,t,n){return te.end.line||t===e.end.line&&n>e.end.column}var r=e.getSourceCode(),i=void 0,o=[];switch(e.options[0]){case!0:case"smart-tabs":i=!0;break;default:i=!1}return{TemplateElement:function(e){o.push(e.loc)},"Program:exit":function(a){var s=/^(?=[\t ]*(\t | \t))/,u=r.lines,c=r.getAllComments();c.forEach(function(e){o.push(e.loc)}),o.sort(function(e,n){return t(e,n.start.line,n.start.column)?1:t(n,e.start.line,n.start.column)?-1:0}),i&&(s=/^(?=[\t ]* \t)/),u.forEach(function(r,i){var u=s.exec(r);if(u){for(var c=i+1,l=u.index+1,p=0;pn.range[1]))break;p++}return!1}function i(e){var t=e.value.split("\n"),n=t[0],r=n.substring(0,12)+"...";return 1===t.length&&n.length<=12?n:r}function o(e,t){return function(n){return n.replaceTextRange([e.range[1],t.range[0]]," ")}}var a=e.getSourceCode(),s={Property:!0},u=e.options[0]||{},c=u.ignoreEOLComments,l=!0,p=0;return u&&u.exceptions&&(Object.keys(u.exceptions).forEach(function(e){u.exceptions[e]?s[e]=!0:delete s[e]}),l=Object.keys(s).length>0),{Program:function(){for(var u=a.getText(),p=a.getAllComments(),f=/[^\s].*? {2,}/g,d=void 0;f.test(u);)if(!n(f.lastIndex,p)){var h=a.getTokenByRangeStart(f.lastIndex,{includeComments:!0});if(h){if(c&&r.isCommentToken(h)&&t(h))return;var m=a.getTokenBefore(h,{includeComments:!0});if(l&&(d=a.getNodeByRangeIndex(f.lastIndex-1)),!d||!s[d.type]){var g=h.value;"Block"===h.type?g="/*"+i(h)+"*/":"Line"===h.type&&(g="//"+i(h)),e.report({node:h,loc:h.loc.start,message:"Multiple spaces found before '{{value}}'.",data:{value:g},fix:o(m,h)})}}}}}}}},{"../ast-utils":22}],152:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow multiline strings",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(e){return 0===e.type.indexOf("JSX")}return{Literal:function(n){r.LINEBREAK_MATCHER.test(n.raw)&&!t(n.parent)&&e.report({node:n,message:"Multiline support is limited to browsers supporting ES5 only."})}}}}},{"../ast-utils":22}],153:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow multiple empty lines",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{type:"object",properties:{max:{type:"integer",minimum:0},maxEOF:{type:"integer",minimum:0},maxBOF:{type:"integer",minimum:0}},required:["max"],additionalProperties:!1}]},create:function(e){var t=2,n=t,r=t;e.options.length&&(t=e.options[0].max,n="undefined"!=typeof e.options[0].maxEOF?e.options[0].maxEOF:t,r="undefined"!=typeof e.options[0].maxBOF?e.options[0].maxBOF:t);var i=e.getSourceCode(),o=""===i.lines[i.lines.length-1]?i.lines.slice(0,-1):i.lines,a=new Set;return{TemplateLiteral:function(e){e.quasis.forEach(function(e){for(var t=e.loc.start.line;tl&&e.report({node:s,loc:{start:{line:a+1,column:0},end:{line:u,column:0}},message:c,data:{max:l,pluralizedLines:1===l?"line":"lines"},fix:function(e){var t=i.getIndexFromLoc({line:a+1,column:0}),n=u-l,r=n<=o.length?i.getIndexFromLoc({line:n,column:0}):i.text.length;return e.removeRange([t,r])}}),u},0)}}}}},{}],154:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow assignments to native objects or read-only global variables",category:"Best Practices",recommended:!1,replacedBy:["no-global-assign"]},deprecated:!0,schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]},create:function(e){function t(t,n,r){var i=t.identifier;t.init!==!1||!t.isWrite()||0!==n&&r[n-1].identifier===i||e.report({node:i,message:"Read-only global '{{name}}' should not be modified.",data:i})}function n(e){e.writeable===!1&&i.indexOf(e.name)===-1&&e.references.forEach(t)}var r=e.options[0],i=r&&r.exceptions||[];return{Program:function(){var t=e.getScope();t.variables.forEach(n)}}}}},{}],155:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow negated conditions",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){function t(e){return e.alternate&&"IfStatement"!==e.alternate.type}function n(e){return"UnaryExpression"===e.type&&"!"===e.operator}function r(e){return"BinaryExpression"===e.type&&("!="===e.operator||"!=="===e.operator)}function i(e){return n(e.test)||r(e.test)}return{IfStatement:function(n){t(n)&&i(n)&&e.report({node:n,message:"Unexpected negated condition."})},ConditionalExpression:function(t){i(t)&&e.report({node:t,message:"Unexpected negated condition."})}}}}},{}],156:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow negating the left operand in `in` expressions",category:"Possible Errors",recommended:!1,replacedBy:["no-unsafe-negation"]},deprecated:!0,schema:[]},create:function(e){return{BinaryExpression:function(t){"in"===t.operator&&"UnaryExpression"===t.left.type&&"!"===t.left.operator&&e.report({node:t,message:"The 'in' expression's left operand is negated."})}}}}},{}],157:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow nested ternary expressions",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){return{ConditionalExpression:function(t){"ConditionalExpression"!==t.alternate.type&&"ConditionalExpression"!==t.consequent.type||e.report({node:t,message:"Do not nest ternary expressions."})}}}}},{}],158:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `new` operators with the `Function` object",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(t){e.report({node:t,message:"The Function constructor is eval."})}return{"NewExpression[callee.name = 'Function']":t,"CallExpression[callee.name = 'Function']":t}}}},{}],159:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `Object` constructors",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){return{NewExpression:function(t){"Object"===t.callee.name&&e.report({node:t,message:"The object literal notation {} is preferrable."})}}}}},{}],160:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `new` operators with calls to `require`",category:"Node.js and CommonJS",recommended:!1},schema:[]},create:function(e){return{NewExpression:function(t){"Identifier"===t.callee.type&&"require"===t.callee.name&&e.report({node:t,message:"Unexpected use of new with require."})}}}}},{}],161:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `new` operators with the `Symbol` object",category:"ECMAScript 6",recommended:!0},schema:[]},create:function(e){return{"Program:exit":function(){var t=e.getScope(),n=t.set.get("Symbol");n&&0===n.defs.length&&n.references.forEach(function(t){var n=t.identifier;n.parent&&"NewExpression"===n.parent.type&&e.report({node:n,message:"`Symbol` cannot be called as a constructor."})})}}}}},{}],162:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `new` operators with the `String`, `Number`, and `Boolean` objects",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{NewExpression:function(t){var n=["String","Number","Boolean","Math","JSON"];n.indexOf(t.callee.name)>-1&&e.report({node:t,message:"Do not use {{fn}} as a constructor.",data:{fn:t.callee.name}})}}}}},{}],163:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `new` operators outside of assignments or comparisons",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{"ExpressionStatement > NewExpression":function(t){e.report({node:t.parent,message:"Do not use 'new' for side effects."})}}}}},{}],164:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow calling global object properties as functions",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){return{CallExpression:function(t){if("Identifier"===t.callee.type){var n=t.callee.name;"Math"!==n&&"JSON"!==n&&"Reflect"!==n||e.report({node:t,message:"'{{name}}' is not a function.",data:{name:n}})}}}}}},{}],165:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow octal escape sequences in string literals",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{Literal:function(t){if("string"==typeof t.value){var n=t.raw.match(/^([^\\]|\\[^0-7])*\\([0-3][0-7]{1,2}|[4-7][0-7]|[0-7])/);if(n){var r=n[2];"0"===n[2]&&"undefined"==typeof n[3]||e.report({node:t,message:"Don't use octal: '\\{{octalDigit}}'. Use '\\u....' instead.",data:{octalDigit:r}})}}}}}}},{}],166:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow octal literals",category:"Best Practices",recommended:!0},schema:[]},create:function(e){return{Literal:function(t){"number"==typeof t.value&&/^0[0-7]/.test(t.raw)&&e.report({node:t,message:"Octal literals should not be used."})}}}}},{}],167:[function(e,t,n){"use strict";var r=/(?:Statement|Declaration|Function(?:Expression)?|Program)$/;t.exports={meta:{docs:{description:"disallow reassigning `function` parameters",category:"Best Practices",recommended:!1},schema:[{oneOf:[{type:"object",properties:{props:{enum:[!1]}},additionalProperties:!1},{type:"object",properties:{props:{enum:[!0]},ignorePropertyModificationsFor:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]}]},create:function(e){function t(e){for(var t=e.identifier,n=t.parent;n&&!r.test(n.type);){switch(n.type){case"AssignmentExpression":return n.left===t; case"UpdateExpression":return!0;case"UnaryExpression":if("delete"===n.operator)return!0;break;case"CallExpression":if(n.callee!==t)return!1;break;case"MemberExpression":if(n.property===t)return!1;break;case"Property":if(n.key===t)return!1}t=n,n=t.parent}return!1}function n(n,r,i){var o=n.identifier;!o||n.init||0!==r&&i[r-1].identifier===o||(n.isWrite()?e.report({node:o,message:"Assignment to function parameter '{{name}}'.",data:{name:o.name}}):a&&t(n)&&s.indexOf(o.name)===-1&&e.report({node:o,message:"Assignment to property of function parameter '{{name}}'.",data:{name:o.name}}))}function i(e){"Parameter"===e.defs[0].type&&e.references.forEach(n)}function o(t){e.getDeclaredVariables(t).forEach(i)}var a=e.options[0]&&Boolean(e.options[0].props),s=e.options[0]&&e.options[0].ignorePropertyModificationsFor||[];return{"FunctionDeclaration:exit":o,"FunctionExpression:exit":o,"ArrowFunctionExpression:exit":o}}}},{}],168:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow string concatenation with `__dirname` and `__filename`",category:"Node.js and CommonJS",recommended:!1},schema:[]},create:function(e){var t=/^__(?:dir|file)name$/;return{BinaryExpression:function(n){var r=n.left,i=n.right;"+"===n.operator&&("Identifier"===r.type&&t.test(r.name)||"Identifier"===i.type&&t.test(i.name))&&e.report({node:n,message:"Use path.join() or path.resolve() instead of + to create paths."})}}}}},{}],169:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.exports={meta:{docs:{description:"disallow the unary operators `++` and `--`",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{allowForLoopAfterthoughts:{type:"boolean"}},additionalProperties:!1}]},create:function(e){var t=e.options[0],n=!1;return"object"===("undefined"==typeof t?"undefined":r(t))&&(n=t.allowForLoopAfterthoughts===!0),{UpdateExpression:function(t){n&&"ForStatement"===t.parent.type||e.report({node:t,message:"Unary operator '{{operator}}' used.",data:{operator:t.operator}})}}}}},{}],170:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow the use of `process.env`",category:"Node.js and CommonJS",recommended:!1},schema:[]},create:function(e){return{MemberExpression:function(t){var n=t.object.name,r=t.property.name;"process"===n&&!t.computed&&r&&"env"===r&&e.report({node:t,message:"Unexpected use of process.env."})}}}}},{}],171:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow the use of `process.exit()`",category:"Node.js and CommonJS",recommended:!1},schema:[]},create:function(e){return{"CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']":function(t){e.report({node:t.parent,message:"Don't use process.exit(); throw an error instead."})}}}}},{}],172:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow the use of the `__proto__` property",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{MemberExpression:function(t){(t.property&&"Identifier"===t.property.type&&"__proto__"===t.property.name&&!t.computed||"Literal"===t.property.type&&"__proto__"===t.property.value)&&e.report({node:t,message:"The '__proto__' property is deprecated."})}}}}},{}],173:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow calling some `Object.prototype` methods directly on objects",category:"Possible Errors",recommended:!1},schema:[]},create:function(e){function t(t){if("MemberExpression"===t.callee.type&&!t.callee.computed){var r=t.callee.property.name;n.indexOf(r)>-1&&e.report({message:"Do not access Object.prototype method '{{prop}}' from target object.",loc:t.callee.property.loc.start,data:{prop:r},node:t})}}var n=["hasOwnProperty","isPrototypeOf","propertyIsEnumerable"];return{CallExpression:t}}}},{}],174:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow variable redeclaration",category:"Best Practices",recommended:!0},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){t.variables.forEach(function(t){var n=i.builtinGlobals&&"writeable"in t,r=(n?1:0)+t.identifiers.length;if(r>=2){t.identifiers.sort(function(e,t){return e.range[1]-t.range[1]});for(var o=n?0:1,a=t.identifiers.length;o=6?{Program:n,BlockStatement:r,SwitchStatement:r}:{Program:n,FunctionDeclaration:r,FunctionExpression:r,ArrowFunctionExpression:r}}}},{}],175:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow multiple spaces in regular expressions",category:"Possible Errors",recommended:!0},schema:[],fixable:"code"},create:function(e){function t(t,n,r){var i=/( {2,})+?/,o=i.exec(n);if(null!==o){var a=o[0].length;e.report({node:t,message:"Spaces are hard to count. Use {{{count}}}.",data:{count:a},fix:function(e){return e.replaceTextRange([r+o.index,r+o.index+a]," {"+a+"}")}})}}function n(e){var n=a.getFirstToken(e),r=n.type,i=n.value;"RegularExpression"===r&&t(e,i,n.start)}function i(e){return e&&"Literal"===e.type&&"string"==typeof e.value}function o(n){var o=e.getScope(),a=r.getVariableByName(o,"RegExp"),s=a&&a.defs.length>0;"Identifier"===n.callee.type&&"RegExp"===n.callee.name&&i(n.arguments[0])&&!s&&t(n,n.arguments[0].value,n.arguments[0].start+1)}var a=e.getSourceCode();return{Literal:n,CallExpression:o,NewExpression:o}}}},{"../ast-utils":22}],176:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow specified global variables",category:"Variables",recommended:!1},schema:{type:"array",items:{type:"string"},uniqueItems:!0}},create:function(e){function t(t){e.report({node:t.identifier,message:"Unexpected use of '{{name}}'.",data:{name:t.identifier.name}})}function n(e){return r.indexOf(e)>=0}var r=e.options;return 0===r.length?{}:{Program:function(){var r=e.getScope();r.variables.forEach(function(e){!e.defs.length&&n(e.name)&&e.references.forEach(t)}),r.through.forEach(function(e){n(e.identifier.name)&&t(e)})}}}}},{}],177:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("ignore"),o={type:"array",items:{type:"string"},uniqueItems:!0};t.exports={meta:{docs:{description:"disallow specified modules when loaded by `import`",category:"ECMAScript 6",recommended:!1},schema:{anyOf:[o,{type:"array",items:[{type:"object",properties:{paths:o,patterns:o},additionalProperties:!1}],additionalItems:!1}]}},create:function(e){var t=Array.isArray(e.options)?e.options:[],n="object"!==r(t[0]),o=new Set(n?e.options:t[0].paths||[]),a=n?[]:t[0].patterns||[];if(0===o.size&&0===a.length)return{};var s=i().add(a);return{ImportDeclaration:function(t){if(t&&t.source&&t.source.value){var n=t.source.value.trim();o.has(n)&&e.report({node:t,message:"'{{importName}}' import is restricted from being used.",data:{importName:n}}),a.length>0&&s.ignores(n)&&e.report({node:t,message:"'{{importName}}' import is restricted from being used by a pattern.",data:{importName:n}})}}}}}},{ignore:14}],178:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("ignore"),o={type:"array",items:{type:"string"},uniqueItems:!0};t.exports={meta:{docs:{description:"disallow specified modules when loaded by `require`",category:"Node.js and CommonJS",recommended:!1},schema:{anyOf:[o,{type:"array",items:[{type:"object",properties:{paths:o,patterns:o},additionalProperties:!1}],additionalItems:!1}]}},create:function(e){function t(e){return e&&"Literal"===e.type&&"string"==typeof e.value}function n(e){return"Identifier"===e.callee.type&&"require"===e.callee.name}var o=Array.isArray(e.options)?e.options:[],a="object"!==r(o[0]),s=new Set(a?e.options:o[0].paths||[]),u=a?[]:o[0].patterns||[];if(0===s.size&&0===u.length)return{};var c=i().add(u);return{CallExpression:function(r){if(n(r)&&r.arguments.length&&t(r.arguments[0])){var i=r.arguments[0].value.trim();s.has(i)&&e.report({node:r,message:"'{{moduleName}}' module is restricted from being used.",data:{moduleName:i}}),u.length>0&&c.ignores(i)&&e.report({node:r,message:"'{{moduleName}}' module is restricted from being used by a pattern.",data:{moduleName:i}})}}}}}},{ignore:14}],179:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow certain properties on certain objects",category:"Best Practices",recommended:!1},schema:{type:"array",items:{anyOf:[{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["object"]},{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["property"]}]},uniqueItems:!0}},create:function(e){function t(t,n,r){if(null!==r){var i=o.get(n),u=i?i.get(r):a.get(n),c=s.get(r);if(u){var l=u.message?" "+u.message:"";e.report({node:t,message:"'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",data:{objectName:n,propertyName:r,message:l}})}else if(c){var p=c.message?" "+c.message:"";e.report({node:t,message:"'{{propertyName}}' is restricted from being used.{{message}}",data:{propertyName:r,message:p}})}}}function n(e){if("Identifier"===e.right.type){var n=e.right.name;"ObjectPattern"===e.left.type&&e.left.properties.forEach(function(i){t(e.left,n,r.getStaticPropertyName(i))})}}var i=e.options;if(0===i.length)return{};var o=new Map,a=new Map,s=new Map;return i.forEach(function(e){var t=e.object,n=e.property;"undefined"==typeof t?s.set(n,{message:e.message}):"undefined"==typeof n?a.set(t,{message:e.message}):(o.has(t)||o.set(t,new Map),o.get(t).set(n,{message:e.message}))}),{MemberExpression:function(e){t(e,e.object&&e.object.name,r.getStaticPropertyName(e))},VariableDeclarator:function(e){if(e.init&&"Identifier"===e.init.type){var n=e.init.name;"ObjectPattern"===e.id.type&&e.id.properties.forEach(function(i){t(e.id,n,r.getStaticPropertyName(i))})}},AssignmentExpression:n,AssignmentPattern:n}}}},{"../ast-utils":22}],180:[function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.exports={meta:{docs:{description:"disallow specified syntax",category:"Stylistic Issues",recommended:!1},schema:{type:"array",items:[{oneOf:[{type:"string"},{type:"object",properties:{selector:{type:"string"},message:{type:"string"}},required:["selector"],additionalProperties:!1}]}],uniqueItems:!0,minItems:0}},create:function(e){return e.options.reduce(function(t,n){var i="string"==typeof n,o=!i&&Boolean(n.message),a=i?n:n.selector,s=o?n.message:"Using '{{selector}}' is not allowed.";return Object.assign(t,r({},a,function(t){e.report({node:t,message:s,data:o?{}:{selector:a}})}))},{})}}},{}],181:[function(e,t,n){"use strict";var r=e("../ast-utils"),i=/^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/;t.exports={meta:{docs:{description:"disallow assignment operators in `return` statements",category:"Best Practices",recommended:!1},schema:[{enum:["except-parens","always"]}]},create:function(e){var t="except-parens"!==(e.options[0]||"except-parens"),n=e.getSourceCode();return{AssignmentExpression:function(o){if(t||!r.isParenthesised(n,o)){for(var a=o.parent;a&&!i.test(a.type);)o=a,a=a.parent;a&&"ReturnStatement"===a.type?e.report({node:a,message:"Return statement should not contain assignment."}):a&&"ArrowFunctionExpression"===a.type&&a.body===o&&e.report({node:a,message:"Arrow function should not return assignment."})}}}}}},{"../ast-utils":22}],182:[function(e,t,n){"use strict";var r=e("../ast-utils"),i="Redundant use of `await` on a return value.";t.exports={meta:{docs:{description:"disallow unnecessary `return await`",category:"Best Practices",recommended:!1},fixable:null,schema:[]},create:function(e){function t(t){e.report({node:e.getSourceCode().getFirstToken(t),loc:t.loc,message:i})}function n(e){for(var t=e;!r.isFunction(t)&&"Program"!==t.type;){if("TryStatement"===t.parent.type&&(t===t.parent.block||t===t.parent.handler&&t.parent.finalizer))return!0;t=t.parent}return!1}function o(e){return"ArrowFunctionExpression"===e.parent.type||("ReturnStatement"===e.parent.type?!n(e.parent):"ConditionalExpression"!==e.parent.type||e!==e.parent.consequent&&e!==e.parent.alternate?"LogicalExpression"===e.parent.type&&e===e.parent.right?o(e.parent):"SequenceExpression"===e.parent.type&&e===e.parent.expressions[e.parent.expressions.length-1]&&o(e.parent):o(e.parent))}return{AwaitExpression:function(e){o(e)&&!n(e)&&t(e)}}}}},{"../ast-utils":22}],183:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `javascript:` urls",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{Literal:function(t){if(t.value&&"string"==typeof t.value){var n=t.value.toLowerCase();0===n.indexOf("javascript:")&&e.report({node:t,message:"Script URL is a form of eval."})}}}}}},{}],184:[function(e,t,n){"use strict";function r(e,t){if("Identifier"===e.property.type&&e.property.type===t.property.type&&e.property.name===t.property.name&&e.computed===t.computed)return!0;var n=a.getStaticPropertyName(e),r=a.getStaticPropertyName(t);return null!==n&&n===r}function i(e,t){if(!r(e,t))return!1;var n=e.object,o=t.object;return n.type===o.type&&("MemberExpression"===n.type?i(n,o):"Identifier"===n.type&&n.name===o.name)}function o(e,t,n,r){if(e&&t)if("Identifier"===e.type&&"Identifier"===t.type&&e.name===t.name)r(t);else if("ArrayPattern"===e.type&&"ArrayExpression"===t.type)for(var a=Math.min(e.elements.length,t.elements.length),s=0;s=1){for(var c=0,l=t.properties.length-1;l>=0;--l)if("ExperimentalSpreadProperty"===t.properties[l].type){c=l+1;break}for(var p=0;p","<",">=","<="]);r.has(n.operator)&&t(n.left,n.right)&&e.report({node:n,message:"Comparing to itself is potentially pointless."})}}}}},{}],186:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow comma operators",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(e){return e.parent&&a[e.parent.type]&&e===e.parent[a[e.parent.type]]}function n(e){return r.isParenthesised(o,e)}function i(e){var t=o.getTokenBefore(e,1),i=o.getTokenAfter(e,1);return n(e)&&t&&i&&r.isOpeningParenToken(t)&&t.range[1]<=e.range[0]&&r.isClosingParenToken(i)&&i.range[0]>=e.range[1]}var o=e.getSourceCode(),a={DoWhileStatement:"test",IfStatement:"test",SwitchStatement:"discriminant",WhileStatement:"test",WithStatement:"object",ArrowFunctionExpression:"body"};return{SequenceExpression:function(r){if("ForStatement"!==r.parent.type||r!==r.parent.init&&r!==r.parent.update){if(t(r)){if(i(r))return}else if(n(r))return;var a=o.getTokenAfter(r.expressions[0]);e.report({node:r,loc:a.loc.start,message:"Unexpected use of comma operator."})}}}}}},{"../ast-utils":22}],187:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow identifiers from shadowing restricted names",category:"Variables",recommended:!1},schema:[]},create:function(e){function t(t){n.indexOf(t.name)>-1&&e.report({node:t,message:"Shadowing of global property '{{idName}}'.",data:{idName:t.name}})}var n=["undefined","NaN","Infinity","arguments","eval"];return{VariableDeclarator:function(e){t(e.id)},ArrowFunctionExpression:function(e){[].map.call(e.params,t)},FunctionExpression:function(e){e.id&&t(e.id),[].map.call(e.params,t)},FunctionDeclaration:function(e){e.id&&(t(e.id),[].map.call(e.params,t))},CatchClause:function(e){t(e.param)}}}}},{}],188:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow variable declarations from shadowing variables declared in the outer scope",category:"Variables",recommended:!1},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean"},hoist:{enum:["all","functions","never"]},allow:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},create:function(e){function t(e){return u.allow.indexOf(e.name)!==-1}function n(e){var t=e.scope.block;return"ClassDeclaration"===t.type&&t.id===e.identifiers[0]}function i(e,t){var n=t.scope,r=t.defs[0],i=r&&r.parent&&r.parent.range,o=e.scope,a=e.defs[0],s=a&&a.name.range;return i&&s&&i[0]0||u.builtinGlobals&&"writeable"in p)||i(l,p)||"all"!==u.hoist&&a(l,p)||e.report({node:l.identifiers[0],message:"'{{name}}' is already declared in the upper scope.",data:l})}}}var u={builtinGlobals:Boolean(e.options[0]&&e.options[0].builtinGlobals),hoist:e.options[0]&&e.options[0].hoist||"functions",allow:e.options[0]&&e.options[0].allow||[]};return{"Program:exit":function(){for(var t=e.getScope(),n=t.childScopes.slice();n.length;){var r=n.pop();n.push.apply(n,r.childScopes),s(r)}}}}}},{"../ast-utils":22}],189:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow spacing between function identifiers and their applications (deprecated)",category:"Stylistic Issues",recommended:!1,replacedBy:["func-call-spacing"]},deprecated:!0,fixable:"whitespace",schema:[]},create:function(e){function t(t){for(var r=n.getLastToken(t.callee),i=r,o=n.getTokenAfter(r);o&&o.range[1]-1;n&&e.report({node:t,message:"Unexpected comma in middle of array."})}}}}},{}],191:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow synchronous methods",category:"Node.js and CommonJS",recommended:!1},schema:[]},create:function(e){return{"MemberExpression[property.name=/.*Sync$/]":function(t){e.report({node:t,message:"Unexpected sync method: '{{propertyName}}'.",data:{propertyName:t.property.name}})}}}}},{}],192:[function(e,t,n){"use strict";var r=/\t/;t.exports={meta:{docs:{description:"disallow all tabs",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){return{Program:function(t){e.getSourceLines().forEach(function(n,i){var o=r.exec(n);o&&e.report({node:t,loc:{line:i+1,column:o.index+1},message:"Unexpected tab character."})})}}}}},{}],193:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow template literal placeholder syntax in regular strings",category:"Possible Errors",recommended:!1},schema:[]},create:function(e){var t=/\$\{[^}]+\}/;return{Literal:function(n){"string"==typeof n.value&&t.test(n.value)&&e.report({node:n,message:"Unexpected template string expression."})}}}}},{}],194:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow ternary operators",category:"Stylistic Issues",recommended:!1},schema:[]},create:function(e){return{ConditionalExpression:function(t){e.report({node:t,message:"Ternary operator used."})}}}}},{}],195:[function(e,t,n){"use strict";function r(e){return"FunctionExpression"===e.type&&"MethodDefinition"===e.parent.type&&"constructor"===e.parent.kind}var i=e("../ast-utils");t.exports={meta:{docs:{description:"disallow `this`/`super` before calling `super()` in constructors",category:"ECMAScript 6",recommended:!0},schema:[]},create:function(e){function t(e){return!e.reachable||c[e.id].superCalled}function n(){return Boolean(u&&u.isConstructor&&u.hasExtends)}function o(){return n()&&!u.codePath.currentSegments.every(t)}function a(e){for(var t=u.codePath.currentSegments,n=0;n0&&e.prevSegments.every(t),invalidNodes:[]})},onCodePathSegmentLoop:function(e,r){n()&&u.codePath.traverseSegments({first:r,last:e},function(e,n){var r=c[e.id];r.superCalled?(r.invalidNodes=[],n.skip()):e.prevSegments.length>0&&e.prevSegments.every(t)&&(r.superCalled=!0,r.invalidNodes=[])})},ThisExpression:function(e){o()&&a(e)},Super:function(e){!i.isCallee(e)&&o()&&a(e)},"CallExpression:exit":function(e){"Super"===e.callee.type&&o()&&s()},"Program:exit":function(){c=Object.create(null)}}}}},{"../ast-utils":22}],196:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow throwing literals as exceptions",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{ThrowStatement:function(t){r.couldBeError(t.argument)?"Identifier"===t.argument.type&&"undefined"===t.argument.name&&e.report({node:t,message:"Do not throw undefined."}):e.report({node:t,message:"Expected an object to be thrown."})}}}}},{"../ast-utils":22}],197:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow trailing whitespace at the end of lines",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{type:"object",properties:{skipBlankLines:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t,n,r){e.report({node:t,loc:n,message:"Trailing spaces not allowed.",fix:function(e){return e.removeRange(r)}})}var n=e.getSourceCode(),i="[ \t  -​ ]",o="^"+i+"*$",a=i+"+$",s=e.options[0]||{},u=s.skipBlankLines||!1;return{Program:function(e){for(var i=new RegExp(a),s=new RegExp(o),c=n.lines,l=n.getText().match(r.createGlobalLinebreakMatcher()),p=0,f=[],d=0,h=c.length;d_.parent.range[0]&&b<_.parent.range[1]){p+=v;continue}if(u&&s.test(c[d])){p+=v;continue}f=[x,b],t(e,y,f)}p+=v}}}}}},{"../ast-utils":22}],198:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow initializing variables to `undefined`",category:"Variables",recommended:!1},schema:[],fixable:"code"},create:function(e){var t=e.getSourceCode();return{VariableDeclarator:function(n){var i=t.getText(n.id),o=n.init&&n.init.name,a=e.getScope(),s=r.getVariableByName(a,"undefined"),u=s&&s.defs.length>0;"undefined"!==o||"const"===n.parent.kind||u||e.report({node:n,message:"It's not necessary to initialize '{{name}}' to undefined.",data:{name:i},fix:function(e){return"ArrayPattern"===n.id.type||"ObjectPattern"===n.id.type?null:e.removeRange([n.id.range[1],n.range[1]])}})}}}}},{"../ast-utils":22}],199:[function(e,t,n){"use strict";function r(e){var t=e.parent;return"UnaryExpression"===t.type&&"typeof"===t.operator}t.exports={meta:{docs:{description:"disallow the use of undeclared variables unless mentioned in `/*global */` comments",category:"Variables",recommended:!0},schema:[{type:"object",properties:{typeof:{type:"boolean"}},additionalProperties:!1}]},create:function(e){var t=e.options[0],n=t&&t.typeof===!0||!1;return{"Program:exit":function(){var t=e.getScope();t.through.forEach(function(t){var i=t.identifier;!n&&r(i)||e.report({node:i,message:"'{{name}}' is not defined.",data:i})})}}}}},{}],200:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow the use of `undefined` as an identifier",category:"Variables",recommended:!1},schema:[]},create:function(e){function t(t){e.report({node:t,message:"Unexpected use of undefined."})}function n(e){var n=e.set.get("undefined");if(n){var r=n.references,i=n.defs;r.filter(function(e){return!e.init}).forEach(function(e){return t(e.identifier)}),i.forEach(function(e){return t(e.name)})}}return{"Program:exit":function(){for(var t=e.getScope(),r=[t];r.length;){var i=r.pop();r.push.apply(r,i.childScopes),n(i)}}}}}},{}],201:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow dangling underscores in identifiers",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"}},allowAfterThis:{type:"boolean"},allowAfterSuper:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){return c.some(function(t){return t===e})}function n(e){var t=e.length;return"_"!==e&&("_"===e[0]||"_"===e[t-1])}function r(e){return"__proto__"===e}function i(e){return"_"===e}function o(r){if(r.id){var i=r.id.name;"undefined"!=typeof i&&n(i)&&!t(i)&&e.report({node:r,message:"Unexpected dangling '_' in '{{identifier}}'.",data:{identifier:i}})}}function a(r){var o=r.id.name;"undefined"==typeof o||!n(o)||i(o)||t(o)||e.report({node:r,message:"Unexpected dangling '_' in '{{identifier}}'.",data:{identifier:o}})}function s(i){var o=i.property.name,a="ThisExpression"===i.object.type,s="Super"===i.object.type;"undefined"==typeof o||!n(o)||a&&l||s&&p||r(o)||t(o)||e.report({node:i,message:"Unexpected dangling '_' in '{{identifier}}'.",data:{identifier:o}})}var u=e.options[0]||{},c=u.allow?u.allow:[],l="undefined"!=typeof u.allowAfterThis&&u.allowAfterThis,p="undefined"!=typeof u.allowAfterSuper&&u.allowAfterSuper;return{FunctionDeclaration:o,VariableDeclarator:a,MemberExpression:s}}}},{}],202:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow confusing multiline expressions",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){function t(t,n){var i=u.getTokenAfter(t,r.isNotClosingParenToken),o=u.getTokenBefore(i);i.loc.start.line!==o.loc.end.line&&e.report({node:t,loc:i.loc.start,message:n,data:{char:i.value}})}var n="Unexpected newline between function and ( of function call.",i="Unexpected newline between object and [ of property access.",o="Unexpected newline between template tag and template literal.",a="Unexpected newline between numerator and division operator.",s=/^[gimuy]+$/,u=e.getSourceCode();return{MemberExpression:function(e){e.computed&&t(e.object,i)},TaggedTemplateExpression:function(t){t.tag.loc.end.line!==t.quasi.loc.start.line&&e.report({node:t,loc:t.loc.start,message:o})},CallExpression:function(e){0!==e.arguments.length&&t(e.callee,n)},"BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left":function(e){var n=u.getTokenAfter(e,function(e){return"/"===e.value}),r=u.getTokenAfter(n);"Identifier"===r.type&&s.test(r.value)&&n.range[1]===r.range[0]&&t(e.left,a)}}}}},{"../ast-utils":22}],203:[function(e,t,n){"use strict";function r(e){if(e.init){var t=e.resolved&&e.resolved.defs[0];if(!t||"Variable"!==t.type||"var"!==t.parent.kind)return!1}return e.isWrite()}function i(e){return!e.modified}function o(e){return!(e.modified||e.group)}function a(e,t){var n=e.range,r=t.identifier.range;return n[0]<=r[0]&&r[1]<=n[1]}function s(e){var t=!1,n=new p;return n.traverse(e,{enter:function(e){y.test(e.type)?(t=!0,this.break()):v.test(e.type)&&this.skip()}}),t}function u(e){if(e.init)return null;for(var t=null,n=e.identifier,r=n.parent;r;){if(h.test(r.type)){if(m.test(r.type)&&r.test===n)return{reference:e,group:t,isInLoop:x[r.type].bind(null,r),modified:!1};break}if(g.test(r.type)){if(s(r))break;t=r}n=r,r=r.parent}return null}function c(e){for(var t=e.identifier;t;){if("FunctionDeclaration"===t.type)return t.id?t:null;t=t.parent}return null}function l(e,t){for(var n=void 0,r=void 0,i=0;i0&&l(i,a),i.filter(o).forEach(t)}}var c=null;return{"Program:exit":function(){var t=[e.getScope()];c=new Map;for(var n=void 0;n=t.pop();)d(t,n.childScopes),n.variables.forEach(s);c.forEach(a),c=null}}}}},{"../ast-utils":22,"../util/traverser":280}],204:[function(e,t,n){"use strict";var r=e("../ast-utils"),i=new Set(["==","===","!=","!==",">",">=","<","<=","in","instanceof"]),o={"==":"!=","!=":"==","===":"!==","!==":"==="};t.exports={meta:{docs:{description:"disallow ternary operators when simpler alternatives exist",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{defaultAssignment:{type:"boolean"}},additionalProperties:!1}],fixable:"code"},create:function(e){function t(e){return"Literal"===e.type&&"boolean"==typeof e.value}function n(e){if("BinaryExpression"===e.type&&Object.prototype.hasOwnProperty.call(o,e.operator)){var t=l.getFirstTokenBetween(e.left,e.right,function(t){return t.value===e.operator});return l.getText().slice(e.range[0],t.range[0])+o[e.operator]+l.getText().slice(t.range[1],e.range[1])}return r.getPrecedence(e)=this.startNode.range[0]&&e.range[1]<=this.endNode.range[1]}},{key:"isConsecutive",value:function(e){return this.contains(this.sourceCode.getTokenBefore(e))}},{key:"merge",value:function(e){this.endNode=e}},{key:"reset",value:function(e){this.startNode=this.endNode=e}},{key:"location",get:function(){return{start:this.startNode.loc.start,end:this.endNode.loc.end}}},{key:"isEmpty",get:function(){return!(this.startNode&&this.endNode)}}]),e}();t.exports={meta:{docs:{description:"disallow unreachable code after `return`, `throw`, `continue`, and `break` statements",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){function t(t){var i=null;if(t&&n.currentSegments.every(o)){if(r.isEmpty)return void r.reset(t);if(r.contains(t))return;if(r.isConsecutive(t))return void r.merge(t);i=t}r.isEmpty||e.report({message:"Unreachable code.",loc:r.location,node:r.startNode}),r.reset(i)}var n=null,r=new s(e.getSourceCode());return{onCodePathStart:function(e){n=e},onCodePathEnd:function(){n=n.upper},BlockStatement:t,BreakStatement:t,ClassDeclaration:t,ContinueStatement:t,DebuggerStatement:t,DoWhileStatement:t,EmptyStatement:t,ExpressionStatement:t,ForInStatement:t,ForOfStatement:t,ForStatement:t,IfStatement:t,ImportDeclaration:t,LabeledStatement:t,ReturnStatement:t,SwitchStatement:t,ThrowStatement:t,TryStatement:t,VariableDeclaration:function(e){("var"!==e.kind||e.declarations.some(i))&&t(e)},WhileStatement:t,WithStatement:t,ExportNamedDeclaration:t,ExportDefaultDeclaration:t,ExportAllDeclaration:t,"Program:exit":function(){t()}}}}},{}],206:[function(e,t,n){"use strict";var r=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression)$/,i=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement|SwitchStatement)$/,o=/^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement)$/;t.exports={meta:{docs:{description:"disallow control flow statements in `finally` blocks",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){function t(e){return"TryStatement"===e.parent.type&&e.parent.finalizer===e}function n(e,n){var a=!1,s=void 0;for(s="BreakStatement"!==e.type||e.label?"ContinueStatement"===e.type?o:r:i;e&&!s.test(e.type);){if(e.parent.label&&n&&e.parent.label.name===n.name&&(a=!0),t(e))return!n||!a;e=e.parent}return!1}function a(t){n(t,t.label)&&e.report({message:"Unsafe usage of {{nodeType}}.",data:{nodeType:t.type},node:t,line:t.loc.line,column:t.loc.column})}return{ReturnStatement:a,ThrowStatement:a,BreakStatement:a,ContinueStatement:a}}}},{}],207:[function(e,t,n){"use strict";function r(e){return"in"===e||"instanceof"===e}function i(e){return"UnaryExpression"===e.type&&"!"===e.operator}var o=e("../ast-utils");t.exports={meta:{docs:{description:"disallow negating the left operand of relational operators",category:"Possible Errors",recommended:!0},schema:[],fixable:"code"},create:function(e){var t=e.getSourceCode();return{BinaryExpression:function(n){r(n.operator)&&i(n.left)&&!o.isParenthesised(t,n.left)&&e.report({node:n,loc:n.left.loc,message:"Unexpected negating the left operand of '{{operator}}' operator.",data:n,fix:function(e){var r=t.getFirstToken(n.left),i=[r.range[1],n.range[1]],o=t.text.slice(i[0],i[1]);return e.replaceTextRange(i,"("+o+")")}})}}}}},{"../ast-utils":22}],208:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow unused expressions",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{allowShortCircuit:{type:"boolean"},allowTernary:{type:"boolean"},allowTaggedTemplates:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value}function n(e,t){for(var n=0;n=0}function o(e){return u&&"ConditionalExpression"===e.type?o(e.consequent)&&o(e.alternate):s&&"LogicalExpression"===e.type?o(e.right):!(!c||"TaggedTemplateExpression"!==e.type)||(/^(?:Assignment|Call|New|Update|Yield|Await)Expression$/.test(e.type)||"UnaryExpression"===e.type&&["delete","void"].indexOf(e.operator)>=0)}var a=e.options[0]||{},s=a.allowShortCircuit||!1,u=a.allowTernary||!1,c=a.allowTaggedTemplates||!1;return{ExpressionStatement:function(t){o(t.expression)||i(t,e.getAncestors())||e.report({node:t,message:"Expected an assignment or function call and instead saw an expression."})}}}}},{}],209:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow unused labels",category:"Best Practices",recommended:!0},schema:[],fixable:"code"},create:function(e){function t(e){o={label:e.label.name,used:!1,upper:o}}function n(t){o.used||e.report({node:t.label,message:"'{{name}}:' is defined but never used.",data:t.label,fix:function(e){return i.getTokenAfter(t.label,{includeComments:!0})===i.getTokenBefore(t.body,{includeComments:!0})?e.removeRange([t.range[0],t.body.range[0]]):null}}),o=o.upper}function r(e){if(e.label)for(var t=e.label.name,n=o;n;){if(n.label===t){n.used=!0;break}n=n.upper}}var i=e.getSourceCode(),o=null;return{LabeledStatement:t,"LabeledStatement:exit":n,BreakStatement:r,ContinueStatement:r}}}},{}],210:[function(e,t,n){"use strict";var r=e("lodash"),i=e("../ast-utils");t.exports={meta:{docs:{description:"disallow unused variables",category:"Variables",recommended:!0},schema:[{oneOf:[{enum:["all","local"]},{type:"object",properties:{vars:{enum:["all","local"]},varsIgnorePattern:{type:"string"},args:{enum:["all","after-used","none"]},ignoreRestSiblings:{type:"boolean"},argsIgnorePattern:{type:"string"},caughtErrors:{enum:["all","none"]},caughtErrorsIgnorePattern:{type:"string"}}}]}]},create:function(e){function t(e){var t=e.defs[0];if(t){var n=t.node;if("VariableDeclarator"===n.type)n=n.parent;else if("Parameter"===t.type)return!1;return 0===n.parent.type.indexOf("Export")}return!1}function n(e){return!!w.ignoreRestSiblings&&e.defs.some(function(e){var t=e.name.parent,n=t.parent;return"Property"===t.type&&"ObjectPattern"===n.type&&_.test(n.properties[n.properties.length-1].type)})}function o(e){return e.isRead()}function a(e,t){for(var n=e.from;n;){if(t.indexOf(n.block)>=0)return!0;n=n.upper}return!1}function s(e,t){return e.range[0]>=t.range[0]&&e.range[1]<=t.range[1]}function u(e,t){var n=e.identifier,r=n.parent,o=r.parent,a=e.from.variableScope,u=e.resolved.scope.variableScope,c=a!==u||i.isInLoop(n);return t&&s(n,t)?t:"AssignmentExpression"!==r.type||"ExpressionStatement"!==o.type||n!==r.left||c?null:r.right}function c(e,t){for(var n=e,r=e.parent;r&&s(r,t);){switch(r.type){case"SequenceExpression":if(r.expressions[r.expressions.length-1]!==n)return!1;break;case"CallExpression":case"NewExpression":return r.callee!==n;case"AssignmentExpression":case"TaggedTemplateExpression":case"YieldExpression":return!0;default:if(S.test(r.type))return!0}n=r,r=r.parent}return!1}function l(e,t){var n=i.getUpperFunction(e);return n&&s(n,t)&&c(n,t)}function p(e,t){var n=e.identifier,r=n.parent,i=r.parent;return e.isRead()&&("AssignmentExpression"===r.type&&"ExpressionStatement"===i.type&&r.left===n||"UpdateExpression"===r.type&&"ExpressionStatement"===i.type||t&&s(n,t)&&!l(n,t))}function f(e){var t=e.identifier.parent;return"VariableDeclarator"===t.type&&(t=t.parent.parent),"ForInStatement"===t.type&&(t="BlockStatement"===t.body.type?t.body.body[0]:t.body,!!t&&"ReturnStatement"===t.type)}function d(e){var t=e.defs.filter(function(e){return"FunctionName"===e.type}).map(function(e){return e.node}),n=t.length>0,r=null;return e.references.some(function(e){if(f(e))return!0;var i=p(e,r);return r=u(e,r),o(e)&&!i&&!(n&&a(e,t))})}function h(t){var n=t.defs[0];if(n.index===n.node.params.length-1)return!0;if(w.argsIgnorePattern){var r=e.getDeclaredVariables(n.node),i=r.slice(r.indexOf(t)+1);if(i.every(function(e){return 0===e.references.length&&w.argsIgnorePattern.test(e.name)}))return!0}return!1}function m(e,r){var o=e.variables,a=e.childScopes,s=void 0,u=void 0;if("TDZ"!==e.type&&("global"!==e.type||"all"===w.vars))for(s=0,u=o.length;s0&&e.report({node:o.identifiers[0],message:o.references.some(function(e){return e.isWrite()})?b:x,data:o})}}}}}},{"../ast-utils":22,lodash:16}],211:[function(e,t,n){"use strict";function r(e){var t=!0,n=!0,r=!0;return"string"==typeof e?t="nofunc"!==e:"object"===("undefined"==typeof e?"undefined":c(e))&&null!==e&&(t=e.functions!==!1,n=e.classes!==!1,r=e.variables!==!1),{functions:t,classes:n,variables:r}}function i(e){return"FunctionName"===e.defs[0].type}function o(e,t){return"ClassName"===e.defs[0].type&&e.scope.variableScope!==t.from.variableScope}function a(e,t){return"Variable"===e.defs[0].type&&e.scope.variableScope!==t.from.variableScope}function s(e,t){return e&&e.range[0]<=t&&t<=e.range[1]}function u(e,t){if(e.scope!==t.from)return!1;for(var n=e.identifiers[0].parent,r=t.identifier.range[1];n;){if("VariableDeclarator"===n.type){if(s(n.init,r))return!0;if(p.test(n.parent.parent.type)&&s(n.parent.parent.right,r))return!0;break}if("AssignmentPattern"===n.type){if(s(n.right,r))return!0}else if(l.test(n.type))break;n=n.parent}return!1}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/,p=/^For(?:In|Of)Statement$/;t.exports={meta:{docs:{description:"disallow the use of variables before they are defined",category:"Variables",recommended:!1},schema:[{oneOf:[{enum:["nofunc"]},{type:"object",properties:{functions:{type:"boolean"},classes:{type:"boolean"},variables:{type:"boolean"}},additionalProperties:!1}]}]},create:function(e){function t(e,t){return i(e)?c.functions:o(e,t)?c.classes:!a(e,t)||c.variables}function n(n){n.references.forEach(function(n){var r=n.resolved;n.init||!r||0===r.identifiers.length||r.identifiers[0].range[1]=6?(l["BlockStatement:exit"]=l["SwitchStatement:exit"]=s,l["ArrowFunctionExpression:exit"]=function(e){"BlockStatement"!==e.body.type&&s()}):l["FunctionExpression:exit"]=l["FunctionDeclaration:exit"]=l["ArrowFunctionExpression:exit"]=s,l}}},{}],212:[function(e,t,n){"use strict";function r(e){return"MemberExpression"===e.callee.type&&"Identifier"===e.callee.property.type&&e.callee.computed===!1&&("call"===e.callee.property.name&&e.arguments.length>=1||"apply"===e.callee.property.name&&2===e.arguments.length&&"ArrayExpression"===e.arguments[1].type)}function i(e,t,n){var r=n.getTokens(e),i=n.getTokens(t);if(r.length!==i.length)return!1;for(var o=0;o=2}function c(e){function t(t){var n=e.range,r=t.identifier.range;return r[0]n[1]}return function(e){return e.references.some(t)}}function l(e){var t=e.range[0],n=e.range[1];return function(e){var r=e.defs[0].name,i=r.range[0],o="AssignmentPattern"===r.parent.type?r.parent.right:null,a=o&&o.range[0],s=o&&o.range[1];return e.references.some(function(e){var r=e.identifier.range[0],u=e.identifier.range[1];return!e.init&&(r=a&&u<=s||r>=t&&u<=n)})}}var p=e("../ast-utils"),f=/^(?:Program|BlockStatement|SwitchStatement|ForStatement|ForInStatement|ForOfStatement)$/;t.exports={meta:{docs:{description:"require `let` or `const` instead of `var`",category:"ECMAScript 6",recommended:!1},schema:[],fixable:"code"},create:function(e){function t(t){if(!t.init)return!1;var n=e.getDeclaredVariables(t);return n.some(l(t.init))}function n(n){var r=e.getDeclaredVariables(n),l=s(n);if("SwitchCase"===n.parent.type||n.declarations.some(t)||r.some(u)||r.some(c(l)))return!1;if(p.isInLoop(n)){if(r.some(i))return!1;if(!o(n)&&!a(n))return!1}return!!(o(n)||"ForStatement"===n.parent.type&&n.parent.init===n||p.STATEMENT_LIST_PARENTS.has(n.parent.type))}function r(t){var r=f.getFirstToken(t);e.report({node:t,message:"Unexpected var, use let or const instead.",fix:function(e){return n(t)?e.replaceText(r,"let"):null}})}var f=e.getSourceCode();return{"VariableDeclaration:exit":function(e){"var"===e.kind&&r(e)}}}}},{"../ast-utils":22}],220:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `void` operators",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{UnaryExpression:function(t){"void"===t.operator&&e.report({node:t,message:"Expected 'undefined' and instead saw 'void'."})}}}}},{}],221:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow specified warning terms in comments",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{terms:{type:"array",items:{type:"string"}},location:{enum:["start","anywhere"]}},additionalProperties:!1}]},create:function(e){function t(e){var t=e.replace(/[-\/\\$^*+?.()|[\]{}]/g,"\\$&"),n=void 0,r=/\w$/.test(e)?"\\b":"";return n="start"===u?"^\\s*":/^\w/.test(e)?"\\b":"",new RegExp(n+t+r,"i")}function n(e){var t=[];return l.forEach(function(n,r){n.test(e)&&t.push(s[r])}),t}function i(t){if(!r.isDirectiveComment(t)||!c.test(t.value)){var i=n(t.value);i.forEach(function(n){e.report({node:t,message:"Unexpected '{{matchedTerm}}' comment.",data:{matchedTerm:n}})})}}var o=e.getSourceCode(),a=e.options[0]||{},s=a.terms||["todo","fixme","xxx"],u=a.location||"start",c=/\bno-warning-comments\b/,l=s.map(t);return{Program:function(){var e=o.getAllComments();e.filter(function(e){return"Shebang"!==e.type}).forEach(i)}}}}},{"../ast-utils":22}],222:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"disallow whitespace before properties",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[]},create:function(e){function t(t,i,o){var a=t.computed?"":".";e.report({node:t,message:"Unexpected whitespace before property {{propName}}.",data:{propName:n.getText(t.property)},fix:function(e){return!t.computed&&r.isDecimalInteger(t.object)?null:e.replaceTextRange([i.range[1],o.range[0]],a)}})}var n=e.getSourceCode();return{MemberExpression:function(e){var i=void 0,o=void 0;r.isTokenOnSameLine(e.object,e.property)&&(e.computed?(i=n.getTokenBefore(e.property,r.isOpeningBracketToken),o=n.getTokenBefore(i)):(i=n.getFirstToken(e.property),o=n.getTokenBefore(i,1)),n.isSpaceBetweenTokens(o,i)&&t(e,o,i))}}}}},{"../ast-utils":22}],223:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"disallow `with` statements",category:"Best Practices",recommended:!1},schema:[]},create:function(e){return{WithStatement:function(t){e.report({node:t,message:"Unexpected use of 'with' statement."})}}}}},{}],224:[function(e,t,n){"use strict";var r={enum:["beside","below","any"]};t.exports={meta:{docs:{description:"enforce the location of single-line statements",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[r,{properties:{overrides:{properties:{if:r,else:r,while:r,do:r,for:r},additionalProperties:!1}},additionalProperties:!1}]},create:function(e){function t(t){return e.options[1]&&e.options[1].overrides&&e.options[1].overrides[t]||e.options[0]||"beside"}function n(n,i){var o=t(i);if("BlockStatement"!==n.type&&"any"!==o){var a=r.getTokenBefore(n);a.loc.end.line===n.loc.start.line&&"below"===o?e.report({node:n,message:"Expected a linebreak before this statement.",fix:function(e){return e.insertTextBefore(n,"\n")}}):a.loc.end.line!==n.loc.start.line&&"beside"===o&&e.report({node:n,message:"Expected no linebreak before this statement.",fix:function(e){return r.getText().slice(a.range[1],n.range[0]).trim()?null:e.replaceTextRange([a.range[1],n.range[0]]," "); }})}}var r=e.getSourceCode();return{IfStatement:function(e){n(e.consequent,"if"),e.alternate&&"IfStatement"!==e.alternate.type&&n(e.alternate,"else")},WhileStatement:function(e){return n(e.body,"while")},DoWhileStatement:function(e){return n(e.body,"do")},ForStatement:function(e){return n(e.body,"for")},ForInStatement:function(e){return n(e.body,"for")},ForOfStatement:function(e){return n(e.body,"for")}}}}},{}],225:[function(e,t,n){"use strict";function r(e){var t=!1,n=Number.POSITIVE_INFINITY,r=!1;return e?"always"===e?n=0:"never"===e?n=Number.POSITIVE_INFINITY:(t=Boolean(e.multiline),n=e.minProperties||Number.POSITIVE_INFINITY,r=Boolean(e.consistent)):t=!0,{multiline:t,minProperties:n,consistent:r}}function i(e){if(e&&(e.ObjectExpression||e.ObjectPattern))return{ObjectExpression:r(e.ObjectExpression),ObjectPattern:r(e.ObjectPattern)};var t=r(e);return{ObjectExpression:t,ObjectPattern:t}}var o=e("../ast-utils"),a={oneOf:[{enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]};t.exports={meta:{docs:{description:"enforce consistent line breaks inside braces",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{oneOf:[a,{type:"object",properties:{ObjectExpression:a,ObjectPattern:a},additionalProperties:!1,minProperties:1}]}]},create:function(e){function t(t){var i=r[t.type],a=n.getFirstToken(t),s=n.getLastToken(t),u=n.getTokenAfter(a,{includeComments:!0}),c=n.getTokenBefore(s,{includeComments:!0}),l=t.properties.length>=i.minProperties||i.multiline&&t.properties.length>0&&u.loc.start.line!==c.loc.end.line;if(u=n.getTokenAfter(a),c=n.getTokenBefore(s),l)o.isTokenOnSameLine(a,u)&&e.report({message:"Expected a line break after this opening brace.",node:t,loc:a.loc.start,fix:function(e){return e.insertTextAfter(a,"\n")}}),o.isTokenOnSameLine(c,s)&&e.report({message:"Expected a line break before this closing brace.",node:t,loc:s.loc.start,fix:function(e){return e.insertTextBefore(s,"\n")}});else{var p=i.consistent,f=!o.isTokenOnSameLine(a,u),d=!o.isTokenOnSameLine(c,s);(!p&&f||p&&f&&!d)&&e.report({message:"Unexpected line break after this opening brace.",node:t,loc:a.loc.start,fix:function(e){return e.removeRange([a.range[1],u.range[0]])}}),(!p&&d||p&&!f&&d)&&e.report({message:"Unexpected line break before this closing brace.",node:t,loc:s.loc.start,fix:function(e){return e.removeRange([c.range[1],s.range[0]])}})}}var n=e.getSourceCode(),r=i(e.options[0]);return{ObjectExpression:t,ObjectPattern:t}}}},{"../ast-utils":22}],226:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing inside braces",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{arraysInObjects:{type:"boolean"},objectsInObjects:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(t){return!!e.options[1]&&e.options[1][t]===!f}function n(t,n){e.report({node:t,loc:n.loc.start,message:"There should be no space after '{{token}}'.",data:{token:n.value},fix:function(t){var r=e.getSourceCode().getTokenAfter(n);return t.removeRange([n.range[1],r.range[0]])}})}function i(t,n){e.report({node:t,loc:n.loc.start,message:"There should be no space before '{{token}}'.",data:{token:n.value},fix:function(t){var r=e.getSourceCode().getTokenBefore(n);return t.removeRange([r.range[1],n.range[0]])}})}function o(t,n){e.report({node:t,loc:n.loc.start,message:"A space is required after '{{token}}'.",data:{token:n.value},fix:function(e){return e.insertTextAfter(n," ")}})}function a(t,n){e.report({node:t,loc:n.loc.start,message:"A space is required before '{{token}}'.",data:{token:n.value},fix:function(e){return e.insertTextBefore(n," ")}})}function s(e,t,s,u,c){if(r.isTokenOnSameLine(t,s)){var l=d.isSpaceBetweenTokens(t,s);h.spaced&&!l&&o(e,t),!h.spaced&&l&&n(e,t)}if(r.isTokenOnSameLine(u,c)){var p=h.arraysInObjectsException&&r.isClosingBracketToken(u)||h.objectsInObjectsException&&r.isClosingBraceToken(u),f=p&&d.getNodeByRangeIndex(u.start).type,m=h.arraysInObjectsException&&"ArrayExpression"===f||h.objectsInObjectsException&&("ObjectExpression"===f||"ObjectPattern"===f)?!h.spaced:h.spaced,g=d.isSpaceBetweenTokens(u,c);m&&!g&&a(e,c),!m&&g&&i(e,c)}}function u(e){var t=e.properties[e.properties.length-1];return d.getTokenAfter(t,r.isClosingBraceToken)}function c(e){if(0!==e.properties.length){var t=d.getFirstToken(e),n=u(e),r=d.getTokenAfter(t),i=d.getTokenBefore(n);s(e,t,r,i,n)}}function l(e){if(0!==e.specifiers.length){var t=e.specifiers[0],n=e.specifiers[e.specifiers.length-1];if("ImportSpecifier"===n.type){"ImportSpecifier"!==t.type&&(t=e.specifiers[1]);var i=d.getTokenBefore(t),o=d.getTokenAfter(n,r.isNotCommaToken),a=d.getTokenAfter(i),u=d.getTokenBefore(o);s(e,i,a,u,o)}}}function p(e){if(0!==e.specifiers.length){var t=e.specifiers[0],n=e.specifiers[e.specifiers.length-1],i=d.getTokenBefore(t),o=d.getTokenAfter(n,r.isNotCommaToken),a=d.getTokenAfter(i),u=d.getTokenBefore(o);s(e,i,a,u,o)}}var f="always"===e.options[0],d=e.getSourceCode(),h={spaced:f,arraysInObjectsException:t("arraysInObjects"),objectsInObjectsException:t("objectsInObjects")};return{ObjectPattern:c,ObjectExpression:c,ImportDeclaration:l,ExportNamedDeclaration:p}}}},{"../ast-utils":22}],227:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce placing object properties on separate lines",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{allowMultiplePropertiesPerLine:{type:"boolean"}},additionalProperties:!1}],fixable:"whitespace"},create:function(e){var t=e.options[0]&&Boolean(e.options[0].allowMultiplePropertiesPerLine),n=t?"Object properties must go on a new line if they aren't all on the same line.":"Object properties must go on a new line.",r=e.getSourceCode();return{ObjectExpression:function(i){if(t&&i.properties.length>1){var o=r.getFirstToken(i.properties[0]),a=r.getLastToken(i.properties[i.properties.length-1]);if(o.loc.end.line===a.loc.start.line)return}for(var s=function(t){var o=r.getLastToken(i.properties[t-1]),a=r.getFirstToken(i.properties[t]);o.loc.end.line===a.loc.start.line&&e.report({node:i,loc:a.loc.start,message:n,fix:function(e){var t=r.getTokenBefore(a),n=[t.range[1],a.range[0]];return r.text.slice(n[0],n[1]).trim()?null:e.replaceTextRange(n,"\n")}})},u=1;u0){var o=i.filter(a);if(o.length!==i.length)if(o.length>0)e.report({node:t,message:"Unexpected mix of shorthand and non-shorthand properties."});else if(r){var u=i.every(s);u&&e.report({node:t,message:"Expected shorthand for all properties."})}}}function c(e,t){var n=t.computed?S.getFirstToken(t,i.isOpeningBracketToken):S.getFirstToken(t.key),r=t.computed?S.getFirstTokenBetween(t.key,t.value,i.isClosingBracketToken):S.getLastToken(t.key),o=S.text.slice(n.range[0],r.range[1]),a="";if(t.value.generator?a="*":t.value.async&&(a="async "),"FunctionExpression"===t.value.type){var s=S.getTokens(t.value).find(function(e){return"Keyword"===e.type&&"function"===e.value}),u=t.value.generator?S.getTokenAfter(s):s;return e.replaceTextRange([n.range[0],t.range[1]],a+o+S.text.slice(u.range[1],t.value.range[1]))}var c=S.getTokens(t.value).find(function(e){return"=>"===e.value}),l=S.getTokenBefore(c),p="Punctuator"===l.type&&")"===l.value,f=S.text.slice(S.getFirstToken(t.value,t.value.async?1:0).range[0],l.range[1]),d=p?f:"("+f+")";return e.replaceTextRange([n.range[0],t.range[1]],a+o+d+S.text.slice(c.range[1],t.value.range[1]))}function l(e,t){var n=t.computed?S.getTokens(t).find(function(e){return"["===e.value}):S.getFirstToken(t.key),r=t.computed?S.getTokensBetween(t.key,t.value).find(function(e){return"]"===e.value}):S.getLastToken(t.key),i=S.text.slice(n.range[0],r.range[1]),o="function";return t.value.generator?o="function*":t.value.async&&(o="async function"),e.replaceTextRange([t.range[0],r.range[1]],i+": "+o)}function p(){C.unshift(new Set),e.getScope().variables.filter(function(e){return"arguments"===e.name}).forEach(function(e){e.references.map(function(e){return e.identifier}).forEach(function(e){return D.add(e)})})}function f(){C.shift()}function d(){C[0].forEach(function(e){return T.add(e)})}var h=e.options[0]||r.always,m=h===r.methods||h===r.always,g=h===r.properties||h===r.always,v=h===r.never,y=h===r.consistent,x=h===r.consistentAsNeeded,b=e.options[1]||{},_=b.ignoreConstructors,w=b.avoidQuotes,E=!!b.avoidExplicitReturnArrows,S=e.getSourceCode(),C=[],T=new WeakSet,D=new WeakSet;return{Program:p,FunctionDeclaration:p,FunctionExpression:p,"Program:exit":f,"FunctionDeclaration:exit":f,"FunctionExpression:exit":f,ArrowFunctionExpression:function(e){C[0].add(e)},"ArrowFunctionExpression:exit":function(e){C[0].delete(e)},ThisExpression:d,Super:d,MetaProperty:function(e){"new"===e.meta.name&&"target"===e.property.name&&d()},Identifier:function(e){D.has(e)&&d()},ObjectExpression:function(e){y?u(e,!1):x&&u(e,!0)},"Property:exit":function(n){var r=n.method||n.shorthand;if("ObjectPattern"!==n.parent.type&&"get"!==n.kind&&"set"!==n.kind&&(!n.computed||"FunctionExpression"===n.value.type||"ArrowFunctionExpression"===n.value.type))if(r)if(n.method&&(v||w&&o(n.key))){var i=v?"Expected longform method syntax.":"Expected longform method syntax for string literal keys.";e.report({node:n,message:i,fix:function(e){return l(e,n)}})}else v&&e.report({node:n,message:"Expected longform property syntax.",fix:function(e){return e.insertTextAfter(n.key,": "+n.key.name)}});else if(!m||n.value.id||"FunctionExpression"!==n.value.type&&"ArrowFunctionExpression"!==n.value.type){if("Identifier"===n.value.type&&n.key.name===n.value.name&&g)e.report({node:n,message:"Expected property shorthand.",fix:function(e){return e.replaceText(n,n.value.name)}});else if("Identifier"===n.value.type&&"Literal"===n.key.type&&n.key.value===n.value.name&&g){if(w)return;e.report({node:n,message:"Expected property shorthand.",fix:function(e){return e.replaceText(n,n.value.name)}})}}else{if(_&&"Identifier"===n.key.type&&t(n.key.name))return;if(w&&o(n.key))return;("FunctionExpression"===n.value.type||"ArrowFunctionExpression"===n.value.type&&"BlockStatement"===n.value.body.type&&E&&!T.has(n.value))&&e.report({node:n,message:"Expected method shorthand.",fix:function(e){return c(e,n)}})}}}}}},{"../ast-utils":22}],229:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require or disallow newlines around variable declarations",category:"Stylistic Issues",recommended:!1},schema:[{enum:["always","initializations"]}],fixable:"whitespace"},create:function(e){function t(e){return"ForStatement"===e||"ForInStatement"===e||"ForOfStatement"===e}function n(n){if(!t(n.parent.type)){var o=n.declarations,a=void 0;o.forEach(function(t){a&&a.loc.end.line===t.loc.start.line&&(i||a.init||t.init)&&e.report({node:n,message:r,loc:t.loc.start,fix:function(e){return e.insertTextBefore(t,"\n")}}),a=t})}}var r="Expected variable declaration to be on a new line.",i="always"===e.options[0];return{VariableDeclaration:n}}}},{}],230:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.exports={meta:{docs:{description:"enforce variables to be declared either together or separately in functions",category:"Stylistic Issues",recommended:!1},schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{var:{enum:["always","never"]},let:{enum:["always","never"]},const:{enum:["always","never"]}},additionalProperties:!1},{type:"object",properties:{initialized:{enum:["always","never"]},uninitialized:{enum:["always","never"]}},additionalProperties:!1}]}]},create:function(e){function t(){m.push({let:{initialized:!1,uninitialized:!1},const:{initialized:!1,uninitialized:!1}})}function n(){h.push({initialized:!1,uninitialized:!1}),t()}function i(){m.pop()}function o(){h.pop(),i()}function a(e,t,n){for(var r=0;r0&&r.uninitialized===l&&i.uninitialized)&&(!(n.initialized>0&&r.initialized===l&&i.initialized)&&(a(e,t,i),!0)))}var l="always",p="never",f=e.options[0]||l,d={};"string"==typeof f?(d.var={uninitialized:f,initialized:f},d.let={uninitialized:f,initialized:f},d.const={uninitialized:f,initialized:f}):"object"===("undefined"==typeof f?"undefined":r(f))&&(f.hasOwnProperty("var")&&"string"==typeof f.var&&(d.var={uninitialized:f.var,initialized:f.var}),f.hasOwnProperty("let")&&"string"==typeof f.let&&(d.let={uninitialized:f.let,initialized:f.let}),f.hasOwnProperty("const")&&"string"==typeof f.const&&(d.const={uninitialized:f.const,initialized:f.const}),f.hasOwnProperty("uninitialized")&&(d.var||(d.var={}),d.let||(d.let={}),d.const||(d.const={}),d.var.uninitialized=f.uninitialized,d.let.uninitialized=f.uninitialized,d.const.uninitialized=f.uninitialized),f.hasOwnProperty("initialized")&&(d.var||(d.var={}),d.let||(d.let={}),d.const||(d.const={}),d.var.initialized=f.initialized,d.let.initialized=f.initialized,d.const.initialized=f.initialized));var h=[],m=[];return{Program:n,FunctionDeclaration:n,FunctionExpression:n,ArrowFunctionExpression:n,BlockStatement:t,ForStatement:t,ForInStatement:t,ForOfStatement:t,SwitchStatement:t,VariableDeclaration:function(t){var n=t.parent,r=t.kind;if(d[r]){var i=t.declarations,o=u(i);if(!c(r,i))if(d[r].initialized===l&&d[r].uninitialized===l)e.report({node:t,message:"Combine this with the previous '{{type}}' statement.",data:{type:r}});else if(d[r].initialized===l&&e.report({node:t,message:"Combine this with the previous '{{type}}' statement with initialized variables.",data:{type:r}}),d[r].uninitialized===l){if(t.parent.left===t&&("ForInStatement"===t.parent.type||"ForOfStatement"===t.parent.type))return;e.report({node:t,message:"Combine this with the previous '{{type}}' statement with uninitialized variables.",data:{type:r}})}if("ForStatement"!==n.type||n.init!==t){var a=o.uninitialized+o.initialized;a>1&&(d[r].initialized===p&&d[r].uninitialized===p?e.report({node:t,message:"Split '{{type}}' declarations into multiple statements.",data:{type:r}}):d[r].initialized===p&&o.initialized>0?e.report({node:t,message:"Split initialized '{{type}}' declarations into multiple statements.",data:{type:r}}):d[r].uninitialized===p&&o.uninitialized>0&&e.report({node:t,message:"Split uninitialized '{{type}}' declarations into multiple statements.",data:{type:r}}))}}},"ForStatement:exit":i,"ForOfStatement:exit":i,"ForInStatement:exit":i,"SwitchStatement:exit":i,"BlockStatement:exit":i,"Program:exit":o,"FunctionDeclaration:exit":o,"FunctionExpression:exit":o,"ArrowFunctionExpression:exit":o}}}},{}],231:[function(e,t,n){"use strict";function r(e){return["*","&","^","|"].indexOf(e)>=0}function i(e){return["+","-","/","%","<<",">>",">>>","**"].indexOf(e)>=0}function o(e,t){if(e.type!==t.type)return!1;switch(e.type){case"Identifier":return e.name===t.name;case"Literal":return e.value===t.value;case"MemberExpression":return o(e.object,t.object)&&o(e.property,t.property);default:return!1}}function a(e){return"Identifier"===e.type||"MemberExpression"===e.type&&"Identifier"===e.object.type&&(!e.computed||"Literal"===e.property.type)}var s=e("../ast-utils");t.exports={meta:{docs:{description:"require or disallow assignment operator shorthand where possible",category:"Stylistic Issues",recommended:!1},schema:[{enum:["always","never"]}],fixable:"code"},create:function(e){function t(e){return c.getFirstTokenBetween(e.left,e.right,function(t){return t.value===e.operator})}function n(n){if("="===n.operator&&"BinaryExpression"===n.right.type){var s=n.left,u=n.right,l=u.operator;(r(l)||i(l))&&(o(s,u.left)?e.report({node:n,message:"Assignment can be replaced with operator assignment.",fix:function(e){if(a(s)){var r=t(n),i=t(u),o=c.getText().slice(n.range[0],r.range[0]),l=c.getText().slice(i.range[1],n.right.range[1]);return e.replaceText(n,""+o+u.operator+"="+l)}return null}}):o(s,u.right)&&r(l)&&e.report({node:n,message:"Assignment can be replaced with operator assignment."}))}}function u(n){"="!==n.operator&&e.report({node:n,message:"Unexpected operator assignment shorthand.",fix:function(e){if(a(n.left)){var r=t(n),i=c.getText().slice(n.range[0],r.range[0]),o=n.operator.slice(0,-1),u=void 0;return u=s.getPrecedence(n.right)<=s.getPrecedence({type:"BinaryExpression",operator:o})&&!s.isParenthesised(c,n.right)?c.text.slice(r.range[1],n.right.range[0])+"("+c.getText(n.right)+")":c.text.slice(r.range[1],n.range[1]),e.replaceText(n,i+"= "+i+o+u)}return null}})}var c=e.getSourceCode();return{AssignmentExpression:"never"!==e.options[0]?n:u}}}},{"../ast-utils":22}],232:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent linebreak style for operators",category:"Stylistic Issues",recommended:!1},schema:[{enum:["after","before","none",null]},{type:"object",properties:{overrides:{type:"object",properties:{anyOf:{type:"string",enum:["after","before","none","ignore"]}}}},additionalProperties:!1}],fixable:"code"},create:function(e){function t(e,t){return function(n){var i=c.getTokenBefore(e),o=c.getTokenAfter(e),a=c.text.slice(i.range[1],e.range[0]),s=c.text.slice(e.range[1],o.range[0]),u=!r.isTokenOnSameLine(i,e),l=!r.isTokenOnSameLine(e,o),p=void 0,f=void 0;if(u!==l&&"none"!==t){if(c.getTokenBefore(e,{includeComments:!0})!==i&&c.getTokenAfter(e,{includeComments:!0})!==o)return null;p=s,f=a}else{var d=r.createGlobalLinebreakMatcher();if(p="before"===t||a.trim()?a:a.replace(d,""),f="after"===t||s.trim()?s:s.replace(d,""),p===a&&f===s)return null}return""===f&&"Punctuator"===o.type&&"+-".includes(e.value)&&o.value===e.value&&(f+=" "),n.replaceTextRange([i.range[1],o.range[0]],p+e.value+f)}}function n(n,i){var o=c.getTokenAfter(i,r.isNotClosingParenToken),s=c.getTokenBefore(o),l=c.getTokenAfter(o),p=o.value,f=u[p],d=f||a,h=t(o,d);r.isTokenOnSameLine(s,o)&&r.isTokenOnSameLine(o,l)||("ignore"===f||r.isTokenOnSameLine(s,o)||r.isTokenOnSameLine(o,l)?"before"===d&&r.isTokenOnSameLine(s,o)?e.report({node:n,loc:{line:o.loc.end.line,column:o.loc.end.column},message:"'{{operator}}' should be placed at the beginning of the line.",data:{operator:p},fix:h}):"after"===d&&r.isTokenOnSameLine(o,l)?e.report({node:n,loc:{line:o.loc.end.line,column:o.loc.end.column},message:"'{{operator}}' should be placed at the end of the line.",data:{operator:p},fix:h}):"none"===d&&e.report({node:n,loc:{line:o.loc.end.line,column:o.loc.end.column},message:"There should be no line break before or after '{{operator}}'.",data:{operator:p},fix:h}):e.report({node:n,loc:{line:o.loc.end.line,column:o.loc.end.column},message:"Bad line breaking before and after '{{operator}}'.",data:{operator:p},fix:h}))}function i(e){n(e,e.left)}var o=!e.options[0],a=e.options[0]||"after",s=e.options[1]||{},u=s.overrides?Object.assign({},s.overrides):{};o&&!u["?"]&&(u["?"]="before"),o&&!u[":"]&&(u[":"]="before");var c=e.getSourceCode();return{BinaryExpression:i,LogicalExpression:i,AssignmentExpression:i,VariableDeclarator:function(e){e.init&&n(e,e.id)},ConditionalExpression:function(e){n(e,e.test),n(e,e.consequent)}}}}},{"../ast-utils":22}],233:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require or disallow padding within blocks",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{blocks:{enum:["always","never"]},switches:{enum:["always","never"]},classes:{enum:["always","never"]}},additionalProperties:!1,minProperties:1}]}]},create:function(e){function t(e){return"SwitchStatement"===e.type?d.getTokenBefore(e.cases[0]):d.getFirstToken(e)}function n(e){return"Line"===e.type||"Block"===e.type}function r(e,t){return t.loc.start.line-e.loc.end.line>=2}function i(e){var t=e,r=e;do t=r,r=d.getTokenAfter(r,{includeComments:!0});while(n(r)&&r.loc.start.line===t.loc.end.line);return r}function o(e){var t=e,r=e;do r=t,t=d.getTokenBefore(t,{includeComments:!0});while(n(t)&&t.loc.end.line===r.loc.start.line);return t}function a(e){switch(e.type){case"BlockStatement":return u.blocks;case"SwitchStatement":return u.switches;case"ClassBody":return u.classes;default:throw new Error("unreachable")}}function s(n){var s=t(n),u=i(s),c=d.getTokenBefore(u,{includeComments:!0}),l=d.getLastToken(n),h=o(l),m=d.getTokenAfter(h,{includeComments:!0}),g=r(c,u),v=r(h,m);a(n)?(g||e.report({node:n,loc:{line:c.loc.start.line,column:c.loc.start.column},fix:function(e){return e.insertTextAfter(c,"\n")},message:p}),v||e.report({node:n,loc:{line:m.loc.end.line,column:m.loc.end.column-1},fix:function(e){return e.insertTextBefore(m,"\n")},message:p})):(g&&e.report({node:n,loc:{line:c.loc.start.line,column:c.loc.start.column},fix:function(e){return e.replaceTextRange([c.end,u.start-u.loc.start.column],"\n")},message:f}),v&&e.report({node:n,loc:{line:m.loc.end.line,column:m.loc.end.column-1},message:f,fix:function(e){return e.replaceTextRange([h.end,m.start-m.loc.start.column],"\n")}}))}var u={},c=e.options[0]||"always";if("string"==typeof c){var l="always"===c;u.blocks=l,u.switches=l,u.classes=l}else c.hasOwnProperty("blocks")&&(u.blocks="always"===c.blocks),c.hasOwnProperty("switches")&&(u.switches="always"===c.switches),c.hasOwnProperty("classes")&&(u.classes="always"===c.classes);var p="Block must be padded by blank lines.",f="Block must not be padded by blank lines.",d=e.getSourceCode(),h={};return u.hasOwnProperty("switches")&&(h.SwitchStatement=function(e){0!==e.cases.length&&s(e)}),u.hasOwnProperty("blocks")&&(h.BlockStatement=function(e){0!==e.body.length&&s(e)}),u.hasOwnProperty("classes")&&(h.ClassBody=function(e){0!==e.body.length&&s(e)}),h}}},{}],234:[function(e,t,n){"use strict";function r(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function i(e){return{test:function(t,n){return n.getFirstToken(t).value===e}}}function o(e){return{test:function(t){return t.type===e}}}function a(e){if("ExpressionStatement"===e.type){var t=e.expression;return"UnaryExpression"===t.type&&(t=t.argument),"CallExpression"===t.type&&g.isFunction(t.callee)}return!1}function s(e,t){if("DoWhileStatement"===t.type&&"BlockStatement"===t.body.type)return!0;if(a(t))return!0;var n=e.getLastToken(t,g.isNotSemicolonToken),r=g.isClosingBraceToken(n)?e.getNodeByRangeIndex(n.range[0]):null;return Boolean(r)&&("BlockStatement"===r.type||"SwitchStatement"===r.type)}function u(e,t){return"ExpressionStatement"===e.type&&("Program"===e.parent.type||"BlockStatement"===e.parent.type&&g.isFunction(e.parent.parent))&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&!g.isParenthesised(t,e.expression)}function c(e,t){if(u(e,t)){var n=!0,r=!1,i=void 0;try{for(var o,a=e.parent.body[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(s===e)break;if(!u(s,t))return!1}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return!0}return!1}function l(e,t){var n=e.getLastToken(t),r=e.getTokenBefore(n),i=e.getTokenAfter(n),o=Boolean(r&&i&&r.range[0]>=t.range[0]&&g.isSemicolonToken(n)&&n.loc.start.line!==r.loc.end.line&&n.loc.end.line===i.loc.start.line);return o?r:n}function p(e,t,n){return t+n}function f(){}function d(e,t,n,r){0!==r.length&&e.report({node:n,message:"Unexpected blank line before this statement.",fix:function(t){if(r.length>=2)return null;var n=r[0][0],i=r[0][1],o=n.range[1],a=i.range[0],s=e.getSourceCode().text.slice(o,a).replace(y,p);return t.replaceTextRange([o,a],s)}})}function h(e,t,n,r){r.length>0||e.report({node:n,message:"Expected blank line before this statement.",fix:function(r){var i=e.getSourceCode(),o=l(i,t),a=i.getFirstTokenBetween(o,n,{includeComments:!0,filter:function(e){return!g.isTokenOnSameLine(o,e)||(o=e,!1)}})||n,s=g.isTokenOnSameLine(o,a)?"\n\n":"\n";return r.insertTextAfter(o,s)}})}var m=r(["^(s*?",")s*","(s*;?)$"],["^(\\s*?",")\\s*","(\\s*;?)$"]),g=e("../ast-utils"),v="["+Array.from(g.LINEBREAKS).join("")+"]",y=new RegExp(String.raw(m,v,v)),x=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/,b=/^require\(/,_={any:{verify:f},never:{verify:d},always:{verify:h}},w={"*":{test:function(){return!0}},"block-like":{test:function(e,t){return s(t,e)}},"cjs-export":{test:function(e,t){return"ExpressionStatement"===e.type&&"AssignmentExpression"===e.expression.type&&x.test(t.getText(e.expression.left))}},"cjs-import":{test:function(e,t){return"VariableDeclaration"===e.type&&e.declarations.length>0&&Boolean(e.declarations[0].init)&&b.test(t.getText(e.declarations[0].init))}},directive:{test:c},expression:{test:function(e,t){return"ExpressionStatement"===e.type&&!c(e,t)}},"multiline-block-like":{test:function(e,t){return e.loc.start.line!==e.loc.end.line&&s(t,e)}},block:o("BlockStatement"),empty:o("EmptyStatement"),break:i("break"),case:i("case"),class:i("class"),const:i("const"),continue:i("continue"),debugger:i("debugger"),default:i("default"),do:i("do"),export:i("export"),for:i("for"),function:i("function"),if:i("if"),import:i("import"),let:i("let"),return:i("return"),switch:i("switch"),throw:i("throw"),try:i("try"),var:i("var"),while:i("while"),with:i("with")};t.exports={meta:{docs:{description:"require or disallow padding lines between statements",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:{definitions:{paddingType:{enum:Object.keys(_)},statementType:{anyOf:[{enum:Object.keys(w)},{type:"array",items:{enum:Object.keys(w)},minItems:1,uniqueItems:!0,additionalItems:!1}]}},type:"array",items:{type:"object",properties:{blankLine:{$ref:"#/definitions/paddingType"},prev:{$ref:"#/definitions/statementType"},next:{$ref:"#/definitions/statementType"}},additionalProperties:!1,required:["blankLine","prev","next"]},additionalItems:!1}},create:function(e){function t(){p={upper:p,prevNode:null}}function n(){p=p.upper}function r(e,t){for(;"LabeledStatement"===e.type;)e=e.body;return Array.isArray(t)?t.some(r.bind(null,e)):w[t].test(e,u)}function i(e,t){for(var n=c.length-1;n>=0;--n){var i=c[n],o=r(e,i.prev)&&r(t,i.next);if(o)return _[i.blankLine]}return _.any}function o(e,t){var n=[],r=l(u,e);if(t.loc.start.line-r.loc.end.line>=2)do{var i=u.getTokenAfter(r,{includeComments:!0});i.loc.start.line-r.loc.end.line>=2&&n.push([r,i]),r=i}while(r.range[0]0)){var f=o(e.getScope());if(!(f&&f.references.length>0)){var d=a(t);!d.isCallback||c&&i.this&&!d.isLexicalThis||i.super||i.meta||e.report({node:t,message:"Unexpected function expression.",fix:function(e){if(!d.isLexicalThis&&i.this||s(t.params))return null;var n=t.params.length?p.getTokenBefore(t.params[0]):p.getTokenBefore(t.body,1),r=p.getTokenBefore(t.body),o=t.async?"async ":"",a=p.text.slice(n.range[0],r.range[1]),u=""+o+a+" => "+p.getText(t.body),c=d.isLexicalThis?t.parent.parent:t,l="CallExpression"!==c.parent.type&&"ConditionalExpression"!==c.parent.type,f=l?"("+u+")":u;return e.replaceText(c,f)}})}}}}}}}},{}],236:[function(e,t,n){"use strict";function r(e){return"ForStatement"===e.parent.type&&e.parent.init===e}function i(e){for(var t=e.parent;c.test(t.type);)t=t.parent;return"VariableDeclarator"===t.type||"AssignmentExpression"===t.type&&"ExpressionStatement"===t.parent.type&&l.test(t.parent.parent.type)}function o(e,t){if(e.eslintUsed&&"global"===e.scope.type)return null;for(var n=null,r=!1,o=e.references,a=0;a1&&"Identifier"===n.arguments[0].params[1].type&&e.getDeclaredVariables(n.arguments[0]).find(function(e){return e.name===n.arguments[0].params[1].name}).references.filter(function(e){return e.isRead()}).filter(function(e){return"CallExpression"===e.identifier.parent.type&&e.identifier===e.identifier.parent.callee}).forEach(function(e){return t(e.identifier.parent)})}}}}},{"../ast-utils":22}],240:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require `Reflect` methods where applicable",category:"ECMAScript 6",recommended:!1,replacedBy:[]},deprecated:!0,schema:[{type:"object",properties:{exceptions:{type:"array",items:{enum:["apply","call","delete","defineProperty","getOwnPropertyDescriptor","getPrototypeOf","setPrototypeOf","isExtensible","getOwnPropertyNames","preventExtensions"]},uniqueItems:!0}},additionalProperties:!1}]},create:function(e){function t(t,n,r){e.report({node:t,message:"Avoid using {{existing}}, instead use {{substitute}}.",data:{existing:n,substitute:r}})}var n={apply:"Function.prototype.apply",call:"Function.prototype.call",defineProperty:"Object.defineProperty",getOwnPropertyDescriptor:"Object.getOwnPropertyDescriptor",getPrototypeOf:"Object.getPrototypeOf",setPrototypeOf:"Object.setPrototypeOf",isExtensible:"Object.isExtensible",getOwnPropertyNames:"Object.getOwnPropertyNames",preventExtensions:"Object.preventExtensions"},r={apply:"Reflect.apply",call:"Reflect.apply",defineProperty:"Reflect.defineProperty",getOwnPropertyDescriptor:"Reflect.getOwnPropertyDescriptor",getPrototypeOf:"Reflect.getPrototypeOf",setPrototypeOf:"Reflect.setPrototypeOf",isExtensible:"Reflect.isExtensible",getOwnPropertyNames:"Reflect.getOwnPropertyNames",preventExtensions:"Reflect.preventExtensions"},i=(e.options[0]||{}).exceptions||[];return{CallExpression:function(e){var o=(e.callee.property||{}).name,a="Reflect"===(e.callee.object||{}).name,s=r.hasOwnProperty(o),u=i.indexOf(o)!==-1;!s||a||u||t(e,n[o],r[o])},UnaryExpression:function(e){var n="delete"===e.operator,r="Identifier"===e.argument.type,o=i.indexOf("delete")!==-1;!n||r||o||t(e,"the delete keyword","Reflect.deleteProperty")}}}}},{}],241:[function(e,t,n){"use strict";function r(e){for(var t=e.variables,n=0;n=0}function n(e,t,n){return 1===t.length&&0===t[0].start&&t[0].end===e.length&&(["Identifier","Keyword","Null","Boolean"].indexOf(t[0].type)>=0||"Numeric"===t[0].type&&!n&&String(+t[0].value)===t[0].value)}function o(e){return"Identifier"===e.type?e.name:e.value}function a(e){return"Literal"===e.type&&"string"==typeof e.value?y.getText(e):'"'+("Identifier"===e.type?e.name:e.value)+'"'}function s(i){var s=i.key,u=void 0;if(!(i.method||i.computed||i.shorthand))if("Literal"===s.type&&"string"==typeof s.value){try{u=r.tokenize(s.value)}catch(e){return}if(1!==u.length)return;var c=t(u[0].value);if(c&&p)return;f&&n(s.value,u,d)&&e.report({node:i,message:h,data:{property:s.value},fix:function(e){return e.replaceText(s,o(s))}})}else p&&"Identifier"===s.type&&t(s.name)?e.report({node:i,message:v,data:{property:s.name},fix:function(e){return e.replaceText(s,a(s))}}):d&&"Literal"===s.type&&"number"==typeof s.value&&e.report({node:i,message:g,data:{property:s.value},fix:function(e){return e.replaceText(s,a(s))}})}function u(t){var n=t.key;t.method||t.computed||t.shorthand||"Literal"===n.type&&"string"==typeof n.value||e.report({node:t,message:m,data:{property:n.name||n.value},fix:function(e){return e.replaceText(n,a(n))}})}function c(i,s){var u=[],c=[],l=null,f=!1;i.properties.forEach(function(e){var i=e.key,o=void 0;if(i&&!e.method&&!e.computed&&!e.shorthand)if("Literal"===i.type&&"string"==typeof i.value){if(u.push(e),s){try{o=r.tokenize(i.value)}catch(e){return void(f=!0)}f=f||!n(i.value,o)||p&&t(o[0].value)}}else p&&s&&"Identifier"===i.type&&t(i.name)?(c.push(e),f=!0,l=i.name):c.push(e)}),s&&u.length&&!f?u.forEach(function(t){e.report({node:t,message:"Properties shouldn't be quoted as all quotes are redundant.",fix:function(e){return e.replaceText(t.key,o(t.key))}})}):c.length&&l?c.forEach(function(t){e.report({node:t,message:"Properties should be quoted as '{{property}}' is a reserved word.",data:{property:l},fix:function(e){return e.replaceText(t.key,a(t.key))}})}):u.length&&c.length&&c.forEach(function(t){e.report({node:t,message:"Inconsistently quoted property '{{key}}' found.",data:{key:t.key.name||t.key.value},fix:function(e){return e.replaceText(t.key,a(t.key))}})})}var l=e.options[0],p=e.options[1]&&e.options[1].keywords,f=!e.options[1]||e.options[1].unnecessary!==!1,d=e.options[1]&&e.options[1].numbers,h="Unnecessarily quoted property '{{property}}' found.",m="Unquoted property '{{property}}' found.",g="Unquoted number literal '{{property}}' used as key.",v="Unquoted reserved word '{{property}}' used as key.",y=e.getSourceCode();return{Property:function(e){"always"!==l&&l||u(e),"as-needed"===l&&s(e)},ObjectExpression:function(e){"consistent"===l&&c(e,!1),"consistent-as-needed"===l&&c(e,!0)}}}}},{"../util/keywords":278,espree:"espree"}],245:[function(e,t,n){"use strict";function r(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var i=r(["(^|[^\\])(\\\\)*[","]"],["(^|[^\\\\])(\\\\\\\\)*[","]"]),o=e("../ast-utils"),a={double:{quote:'"',alternateQuote:"'",description:"doublequote"},single:{quote:"'",alternateQuote:'"',description:"singlequote"},backtick:{quote:"`",alternateQuote:'"',description:"backtick"}},s=new RegExp(String.raw(i,Array.from(o.LINEBREAKS).join("")));a.double.convert=a.single.convert=a.backtick.convert=function(e){var t=this.quote,n=e[0];return t===n?e:t+e.slice(1,-1).replace(/\\(\${|\r\n?|\n|.)|["'`]|\${|(\r\n?|\n)/g,function(e,r,i){return r===n||"`"===n&&"${"===r?r:e===t||"`"===t&&"${"===e?"\\"+e:i&&"`"===n?"\\n":e})+t};var u="avoid-escape";t.exports={meta:{docs:{description:"enforce the consistent use of either backticks, double, or single quotes",category:"Stylistic Issues",recommended:!1},fixable:"code",schema:[{enum:["single","double","backtick"]},{anyOf:[{enum:["avoid-escape"]},{type:"object",properties:{avoidEscape:{type:"boolean"},allowTemplateLiterals:{type:"boolean"}},additionalProperties:!1}]}]},create:function(e){function t(e){return"JSXAttribute"===e.parent.type||"JSXElement"===e.parent.type}function n(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value}function r(e){var t=e.parent.parent;if("Program"!==t.type&&("BlockStatement"!==t.type||!o.isFunction(t.parent)))return!1;for(var r=0;r=0),s||e.report({node:n,message:"Strings must use {{description}}.",data:{description:l.description},fix:function(e){return e.replaceText(n,l.convert(n.raw))}}))},TemplateLiteral:function(t){if(!(f||"backtick"===c||"TaggedTemplateExpression"===t.parent.type&&t===t.parent.quasi)){var n=1===t.quasis.length&&!s.test(t.quasis[0].value.raw);n&&e.report({node:t,message:"Strings must use {{description}}.",data:{description:l.description},fix:function(e){return r(t)?null:e.replaceText(t,l.convert(d.getText(t)))}})}}}}}},{"../ast-utils":22}],246:[function(e,t,n){"use strict";function r(e){return e.defs.length>=1}function i(e){return"MemberExpression"===e.type&&!e.computed&&"Identifier"===e.property.type&&"parseInt"===e.property.name}function o(e){return!("Literal"===e.type&&"number"!=typeof e.value||"Identifier"===e.type&&"undefined"===e.name)}function a(e){return"Literal"===e.type&&10===e.value}var s=e("../ast-utils"),u="always",c="as-needed";t.exports={meta:{docs:{description:"enforce the consistent use of the radix argument when using `parseInt()`",category:"Best Practices",recommended:!1},schema:[{enum:["always","as-needed"]}]},create:function(e){function t(t){var r=t.arguments;switch(r.length){case 0:e.report({node:t,message:"Missing parameters."});break;case 1:n===u&&e.report({node:t,message:"Missing radix parameter."});break;default:n===c&&a(r[1])?e.report({node:t,message:"Redundant radix parameter."}):o(r[1])||e.report({node:t,message:"Invalid radix parameter."})}}var n=e.options[0]||u;return{"Program:exit":function(){var n=e.getScope(),o=void 0;o=s.getVariableByName(n,"parseInt"),r(o)||o.references.forEach(function(e){var n=e.identifier;s.isCallee(n)&&t(n.parent)}),o=s.getVariableByName(n,"Number"),r(o)||o.references.forEach(function(e){var n=e.identifier.parent;i(n)&&s.isCallee(n)&&t(n.parent)})}}}}},{"../ast-utils":22}],247:[function(e,t,n){"use strict";function r(e){return e[0].toUpperCase()+e.slice(1)}var i=e("../ast-utils");t.exports={meta:{docs:{description:"disallow async functions which have no `await` expression",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(){a={upper:a,hasAwait:!1}}function n(t){!t.async||a.hasAwait||i.isEmptyFunction(t)||e.report({node:t,loc:i.getFunctionHeadLoc(t,o),message:"{{name}} has no 'await' expression.",data:{name:r(i.getFunctionNameWithKind(t))}}),a=a.upper}var o=e.getSourceCode(),a=null;return{FunctionDeclaration:t,FunctionExpression:t,ArrowFunctionExpression:t,"FunctionDeclaration:exit":n,"FunctionExpression:exit":n,"ArrowFunctionExpression:exit":n,AwaitExpression:function(){a.hasAwait=!0}}}}},{"../ast-utils":22}],248:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require JSDoc comments",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{require:{type:"object",properties:{ClassDeclaration:{type:"boolean"},MethodDefinition:{type:"boolean"},FunctionDeclaration:{type:"boolean"},ArrowFunctionExpression:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]},create:function(e){function t(t){e.report({node:t,message:"Missing JSDoc comment."})}function n(e){if("MethodDefinition"===e.parent.type){var n=i.getJSDocComment(e);n||t(e)}}function r(e){var n=i.getJSDocComment(e);n||t(e)}var i=e.getSourceCode(),o={FunctionDeclaration:!0,MethodDefinition:!1,ClassDeclaration:!1},a=Object.assign(o,e.options[0]&&e.options[0].require||{});return{FunctionDeclaration:function(e){a.FunctionDeclaration&&r(e)},FunctionExpression:function(e){a.MethodDefinition&&n(e)},ClassDeclaration:function(e){a.ClassDeclaration&&r(e)},ArrowFunctionExpression:function(e){a.ArrowFunctionExpression&&"VariableDeclarator"===e.parent.type&&r(e)}}}}},{}],249:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require generator functions to contain `yield`",category:"ECMAScript 6",recommended:!0},schema:[]},create:function(e){function t(e){e.generator&&r.push(0)}function n(t){if(t.generator){var n=r.pop();0===n&&t.body.body.length>0&&e.report({node:t,message:"This generator function does not have 'yield'."})}}var r=[];return{FunctionDeclaration:t,"FunctionDeclaration:exit":n,FunctionExpression:t,"FunctionExpression:exit":n,YieldExpression:function(){r.length>0&&(r[r.length-1]+=1)}}}}},{}],250:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce spacing between rest and spread operators and their expressions",category:"ECMAScript 6",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]}]},create:function(e){function t(t){var i=n.getFirstToken(t),o=n.getTokenAfter(i),a=n.isSpaceBetweenTokens(i,o),s=void 0;switch(t.type){case"SpreadElement":s="spread";break;case"RestElement":s="rest";break;case"ExperimentalSpreadProperty":s="spread property";break;case"ExperimentalRestProperty":s="rest property";break;default:return}r&&!a?e.report({node:t,loc:{line:i.loc.end.line,column:i.loc.end.column},message:"Expected whitespace after {{type}} operator.",data:{type:s},fix:function(e){return e.replaceTextRange([i.range[1],o.range[0]]," ")}}):!r&&a&&e.report({node:t,loc:{line:i.loc.end.line,column:i.loc.end.column},message:"Unexpected whitespace after {{type}} operator.",data:{type:s},fix:function(e){return e.removeRange([i.range[1],o.range[0]])}})}var n=e.getSourceCode(),r="always"===e.options[0];return{SpreadElement:t,RestElement:t,ExperimentalSpreadProperty:t,ExperimentalRestProperty:t}}}},{}],251:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing before and after semicolons",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){var t=p.getTokenBefore(e);return t&&i.isTokenOnSameLine(t,e)&&p.isSpaceBetweenTokens(t,e)}function n(e){var t=p.getTokenAfter(e);return t&&i.isTokenOnSameLine(e,t)&&p.isSpaceBetweenTokens(e,t)}function o(e){var t=p.getTokenAfter(e);return!(t&&i.isTokenOnSameLine(e,t))}function a(e){var t=p.getTokenBefore(e);return!(t&&i.isTokenOnSameLine(e,t))}function s(e){var t=p.getTokenAfter(e);return t&&i.isClosingBraceToken(t)||i.isClosingParenToken(t)}function u(r,u){if(i.isSemicolonToken(r)){var c=r.loc.start;t(r)?f||e.report({node:u,loc:c,message:"Unexpected whitespace before semicolon.",fix:function(e){var t=p.getTokenBefore(r);return e.removeRange([t.range[1],r.range[0]])}}):f&&e.report({node:u,loc:c,message:"Missing whitespace before semicolon.",fix:function(e){return e.insertTextBefore(r," ")}}),a(r)||o(r)||s(r)||(n(r)?d||e.report({node:u,loc:c,message:"Unexpected whitespace after semicolon.",fix:function(e){var t=p.getTokenAfter(r);return e.removeRange([r.range[1],t.range[0]])}}):d&&e.report({node:u,loc:c,message:"Missing whitespace after semicolon.",fix:function(e){return e.insertTextAfter(r," ")}}))}}function c(e){var t=p.getLastToken(e);u(t,e)}var l=e.options[0],p=e.getSourceCode(),f=!1,d=!0;return"object"===("undefined"==typeof l?"undefined":r(l))&&(l.hasOwnProperty("before")&&(f=l.before),l.hasOwnProperty("after")&&(d=l.after)),{VariableDeclaration:c,ExpressionStatement:c,BreakStatement:c,ContinueStatement:c,DebuggerStatement:c,ReturnStatement:c,ThrowStatement:c,ImportDeclaration:c,ExportNamedDeclaration:c,ExportAllDeclaration:c,ExportDefaultDeclaration:c,ForStatement:function(e){e.init&&u(p.getTokenAfter(e.init),e),e.test&&u(p.getTokenAfter(e.test),e)}}}}},{"../ast-utils":22}],252:[function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=e("../ast-utils"),o=":matches("+["BreakStatement","ContinueStatement","DebuggerStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ImportDeclaration","ReturnStatement","ThrowStatement","VariableDeclaration"].join(",")+")";t.exports={meta:{docs:{description:"enforce location of semicolons",category:"Stylistic Issues",recommended:!1},schema:[{enum:["last","first"]}],fixable:"whitespace"},create:function(e){function t(e,t){return null!==s.getFirstTokenBetween(e,t,{includeComments:!0,filter:i.isCommentToken})}function n(n,r){var o=s.getTokenBefore(n),a=s.getTokenAfter(n),u=!o||i.isTokenOnSameLine(o,n),c=!a||i.isTokenOnSameLine(n,a);("last"===r&&!u||"first"===r&&!c)&&e.report({loc:n.loc,message:"Expected this semicolon to be at {{pos}}.",data:{pos:"last"===r?"the end of the previous line":"the beginning of the next line"},fix:function(e){if(o&&a&&t(o,a))return null;var i=o?o.range[1]:n.range[0],s=a?a.range[0]:n.range[1],u="last"===r?";\n":"\n;";return e.replaceTextRange([i,s],u)}})}var a,s=e.getSourceCode(),u=e.options[0]||"last";return a={},r(a,o,function(e){var t=s.getLastToken(e);i.isSemicolonToken(t)&&n(t,u)}),r(a,"ForStatement",function(e){var t=e.init&&s.getTokenAfter(e.init,i.isSemicolonToken),r=e.test&&s.getTokenAfter(e.test,i.isSemicolonToken);t&&n(t,"last"),r&&n(r,"last")}),a}}},{"../ast-utils":22}],253:[function(e,t,n){"use strict";var r=e("../util/fix-tracker"),i=e("../ast-utils");t.exports={meta:{docs:{description:"require or disallow semicolons instead of ASI",category:"Stylistic Issues",recommended:!1},fixable:"code",schema:{anyOf:[{type:"array",items:[{enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always"]},{type:"object",properties:{omitLastInOneLineBlock:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]}},create:function(e){function t(t,n){var i=f.getLastToken(t),o=void 0,a=void 0,s=i.loc;n?(o="Extra semicolon.",s=s.start,a=function(e){return new r(e,f).retainSurroundingTokens(i).remove(i)}):(o="Missing semicolon.",s=s.end,a=function(e){return e.insertTextAfter(i,";")}),e.report({node:t,loc:s,message:o,fix:a})}function n(e){if(!i.isSemicolonToken(e))return!1;var t=f.getTokenAfter(e);if(!t)return!0;var n=e.loc.end.line,r=t.loc.start.line,o=u.test(t.value)&&"++"!==t.value&&"--"!==t.value,a=i.isClosingBraceToken(t)||i.isSemicolonToken(t);return n!==r&&!o||a}function o(e){var t=f.getTokenAfter(e);if(!t||"}"!==t.value)return!1;var n=e.parent;return n&&"BlockStatement"===n.type&&n.loc.start.line===n.loc.end.line}function a(e){var r=f.getLastToken(e);l?n(r)&&t(e,!0):i.isSemicolonToken(r)?p&&o(e)&&t(e,!0):p&&o(e)||t(e)}function s(t){var n=e.getAncestors(),r=n.length-1,i=n[r];"ForStatement"===i.type&&i.init===t||/^For(?:In|Of)Statement/.test(i.type)&&i.left===t||a(t)}var u=/^[-[(\/+`]/,c=e.options[1],l="never"===e.options[0],p=c&&c.omitLastInOneLineBlock===!0,f=e.getSourceCode();return{VariableDeclaration:s,ExpressionStatement:a,ReturnStatement:a,ThrowStatement:a,DoWhileStatement:a,DebuggerStatement:a,BreakStatement:a,ContinueStatement:a,ImportDeclaration:a,ExportAllDeclaration:a,ExportNamedDeclaration:function(e){e.declaration||a(e)},ExportDefaultDeclaration:function(e){/(?:Class|Function)Declaration/.test(e.declaration.type)||a(e)}}}}},{"../ast-utils":22,"../util/fix-tracker":277}],254:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce sorted import declarations within modules",category:"ECMAScript 6",recommended:!1},schema:[{type:"object",properties:{ignoreCase:{type:"boolean"},memberSyntaxSortOrder:{type:"array",items:{enum:["none","all","multiple","single"]},uniqueItems:!0,minItems:4,maxItems:4},ignoreMemberSort:{type:"boolean"}},additionalProperties:!1}],fixable:"code"},create:function(e){function t(e){return 0===e.specifiers.length?"none":"ImportNamespaceSpecifier"===e.specifiers[0].type?"all":1===e.specifiers.length?"single":"multiple"}function n(e){return s.indexOf(t(e))}function r(e){return e.specifiers[0]?e.specifiers[0].local.name:null}var i=e.options[0]||{},o=i.ignoreCase||!1,a=i.ignoreMemberSort||!1,s=i.memberSyntaxSortOrder||["none","all","multiple","single"],u=e.getSourceCode(),c=null;return{ImportDeclaration:function(t){if(c){var i=n(t),l=n(c),p=r(t),f=r(c);o&&(f=f&&f.toLowerCase(),p=p&&p.toLowerCase()),i!==l?ie});m!==-1&&e.report({node:d[m],message:"Member '{{memberName}}' of the import declaration should be sorted alphabetically.",data:{memberName:d[m].local.name},fix:function(e){return d.some(function(e){return u.getCommentsBefore(e).length||u.getCommentsAfter(e).length})?null:e.replaceTextRange([d[0].range[0],d[d.length-1].range[1]],d.slice().sort(function(e,t){var n=h(e),r=h(t);return n>r?1:-1}).reduce(function(e,t,n){var r=n===d.length-1?"":u.getText().slice(d[n].range[1],d[n+1].range[0]);return e+u.getText(t)+r},""))}})}c=t}}}}},{}],255:[function(e,t,n){"use strict";function r(e){return i.getStaticPropertyName(e)||e.key.name||null}var i=e("../ast-utils"),o=e("natural-compare"),a={asc:function(e,t){return e<=t},ascI:function(e,t){return e.toLowerCase()<=t.toLowerCase()},ascN:function(e,t){return o(e,t)<=0},ascIN:function(e,t){return o(e.toLowerCase(),t.toLowerCase())<=0},desc:function(e,t){return a.asc(t,e)},descI:function(e,t){return a.ascI(t,e)},descN:function(e,t){return a.ascN(t,e)},descIN:function(e,t){return a.ascIN(t,e)}};t.exports={meta:{docs:{description:"require object keys to be sorted",category:"Stylistic Issues",recommended:!1},schema:[{enum:["asc","desc"]},{type:"object",properties:{caseSensitive:{type:"boolean"},natural:{type:"boolean"}},additionalProperties:!1}]},create:function(e){var t=e.options[0]||"asc",n=e.options[1],i=(n&&n.caseSensitive)===!1,o=Boolean(n&&n.natural),s=a[t+(i?"I":"")+(o?"N":"")],u=null;return{ObjectExpression:function(){u={upper:u,prevName:null}},"ObjectExpression:exit":function(){u=u.upper},Property:function(n){if("ObjectPattern"!==n.parent.type){var a=u.prevName,c=r(n);u.prevName=c||a,a&&c&&(s(a,c)||e.report({node:n,loc:n.key.loc,message:"Expected object keys to be in {{natual}}{{insensitive}}{{order}}ending order. '{{thisName}}' should be before '{{prevName}}'.",data:{thisName:c,prevName:a,order:t,insensitive:i?"insensitive ":"",natual:o?"natural ":""}}))}}}}}},{"../ast-utils":22,"natural-compare":17}],256:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require variables within the same declaration block to be sorted",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{ignoreCase:{type:"boolean"}},additionalProperties:!1}]},create:function(e){var t=e.options[0]||{},n=t.ignoreCase||!1;return{VariableDeclaration:function(t){var r=t.declarations.filter(function(e){return"Identifier"===e.id.type});r.slice(1).reduce(function(t,r){var i=t.id.name,o=r.id.name;return n&&(i=i.toLowerCase(),o=o.toLowerCase()),o"===e.value||"Keyword"===e.type}function n(n){var r=s.getTokenBefore(n),o=void 0;if(r&&!t(r)&&i.isTokenOnSameLine(r,n)){var a=s.isSpaceBetweenTokens(r,n),p=e.getAncestors().pop();o="FunctionExpression"===p.type||"FunctionDeclaration"===p.type?u:"ClassBody"===n.type?l:c,o?a||e.report({node:n,message:"Missing space before opening brace.",fix:function(e){return e.insertTextBefore(n," ")}}):a&&e.report({node:n,message:"Unexpected space before opening brace.",fix:function(e){return e.removeRange([r.range[1],n.range[0]])}})}}function o(e){var t=e.cases,r=void 0;r=t.length>0?s.getTokenBefore(t[0]):s.getLastToken(e,1),n(r)}var a=e.options[0],s=e.getSourceCode(),u=!0,c=!0,l=!0;return"object"===("undefined"==typeof a?"undefined":r(a))?(u="never"!==a.functions,c="never"!==a.keywords,l="never"!==a.classes):"never"===a&&(u=!1,c=!1,l=!1),{BlockStatement:n,ClassBody:n,SwitchStatement:o}}}},{"../ast-utils":22}],258:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing before `function` definition opening parenthesis",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{anonymous:{enum:["always","never","ignore"]},named:{enum:["always","never","ignore"]},asyncArrow:{enum:["always","never","ignore"]}},additionalProperties:!1}]}]},create:function(e){function t(e){if(e.id)return!0;var t=e.parent;return"MethodDefinition"===t.type||"Property"===t.type&&("get"===t.kind||"set"===t.kind||t.method)}function n(e){if("ArrowFunctionExpression"===e.type){if(e.async&&i.isOpeningParenToken(a.getFirstToken(e,{skip:1})))return u.asyncArrow||s}else{if(t(e))return u.named||s;if(!e.generator)return u.anonymous||s}return"ignore"}function o(t){var r=n(t);if("ignore"!==r){var o=a.getFirstToken(t,i.isOpeningParenToken),s=a.getTokenBefore(o),u=a.isSpaceBetweenTokens(s,o);u&&"never"===r?e.report({node:t,loc:s.loc.end,message:"Unexpected space before function parentheses.",fix:function(e){return e.removeRange([s.range[1],o.range[0]])}}):u||"always"!==r||e.report({node:t,loc:s.loc.end,message:"Missing space before function parentheses.",fix:function(e){return e.insertTextAfter(s," ")}})}}var a=e.getSourceCode(),s="string"==typeof e.options[0]?e.options[0]:"always",u="object"===r(e.options[0])?e.options[0]:{};return{ArrowFunctionExpression:o,FunctionDeclaration:o,FunctionExpression:o}}}},{"../ast-utils":22}],259:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing inside parentheses",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{enum:["{}","[]","()","empty"]},uniqueItems:!0}},additionalProperties:!1}]},create:function(e){function t(){var e=[],t=[];return d.braceException&&(e.push("{"),t.push("}")),d.bracketException&&(e.push("["),t.push("]")),d.parenException&&(e.push("("),t.push(")")),d.empty&&(e.push(")"),t.push("(")),{openers:e,closers:t}}function n(e){return"Punctuator"===e.type&&h.openers.indexOf(e.value)>=0}function i(e){return"Punctuator"===e.type&&h.closers.indexOf(e.value)>=0}function o(e,t){return!m.isSpaceBetweenTokens(e,t)&&(p?!r.isClosingParenToken(t)&&!n(t):n(t))}function a(e,t){return!r.isOpeningParenToken(e)&&(!m.isSpaceBetweenTokens(e,t)&&(p?!i(e):i(e)))}function s(e,t){return"Line"!==t.type&&(!!r.isTokenOnSameLine(e,t)&&(!!m.isSpaceBetweenTokens(e,t)&&(p?n(t):!n(t))))}function u(e,t){return!r.isOpeningParenToken(e)&&(!!r.isTokenOnSameLine(e,t)&&(!!m.isSpaceBetweenTokens(e,t)&&(p?i(e):!i(e))))}var c="There must be a space inside this paren.",l="There should be no spaces inside this paren.",p="always"===e.options[0],f=2===e.options.length?e.options[1].exceptions:[],d={},h=void 0;f.length&&(d.braceException=f.indexOf("{}")!==-1,d.bracketException=f.indexOf("[]")!==-1,d.parenException=f.indexOf("()")!==-1,d.empty=f.indexOf("empty")!==-1);var m=e.getSourceCode();return{Program:function(n){h=t();var i=m.tokensAndComments;i.forEach(function(t,p){var f=i[p-1],d=i[p+1];(r.isOpeningParenToken(t)||r.isClosingParenToken(t))&&("("===t.value&&o(t,d)?e.report({node:n,loc:t.loc.start,message:c,fix:function(e){return e.insertTextAfter(t," ")}}):"("===t.value&&s(t,d)?e.report({node:n,loc:t.loc.start,message:l,fix:function(e){return e.removeRange([t.range[1],d.range[0]])}}):")"===t.value&&a(f,t)?e.report({node:n,loc:t.loc.start,message:c,fix:function(e){return e.insertTextBefore(t," ")}}):")"===t.value&&u(f,t)&&e.report({node:n,loc:t.loc.start,message:l,fix:function(e){return e.removeRange([f.range[1],t.range[0]])}}))})}}}}},{"../ast-utils":22}],260:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require spacing around infix operators",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{type:"object",properties:{int32Hint:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e,t){for(var n=u.getTokensBetween(e,t,1),r=1,i=n.length-1;r=0&&(n[r-1].range[1]>=o.range[0]||o.range[1]>=n[r+1].range[0]))return o}return null}function n(t,n){e.report({node:t,loc:n.loc.start,message:"Infix operators must be spaced.",fix:function(e){var t=u.getTokenBefore(n),r=u.getTokenAfter(n),i="";return n.range[0]-t.range[1]===0&&(i=" "),i+=n.value,r.range[0]-n.range[1]===0&&(i+=" "),e.replaceText(n,i)}})}function r(e){if(!e.left.typeAnnotation){var r=t(e.left,e.right);r&&(a&&"|0"===u.getText(e).substr(-2)||n(e,r))}}function i(e){var r=t(e.test,e.consequent),i=t(e.consequent,e.alternate);r?n(e,r):i&&n(e,i)}function o(e){if(e.init){var r=t(e.id,e.init);r&&n(e,r)}}var a=!!e.options[0]&&e.options[0].int32Hint===!0,s=["*","/","%","+","-","<<",">>",">>>","<","<=",">",">=","in","instanceof","==","!=","===","!==","&","^","|","&&","||","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","^=","|=","?",":",",","**"],u=e.getSourceCode();return{AssignmentExpression:r,AssignmentPattern:r,BinaryExpression:r,LogicalExpression:r,ConditionalExpression:i,VariableDeclarator:o}}}},{}],261:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing before or after unary operators",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{type:"object",properties:{words:{type:"boolean"},nonwords:{type:"boolean"},overrides:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}]},create:function(e){function t(e){return e&&"UnaryExpression"===e.type&&"!"===e.argument.operator&&e.argument&&"UnaryExpression"===e.argument.type&&"!"===e.argument.operator}function n(e){return e.argument&&e.argument.type&&"ObjectExpression"===e.argument.type}function i(e,t){return h.overrides&&h.overrides.hasOwnProperty(t)}function o(e,t){return h.overrides[t]}function a(t,n,r,i){r.range[0]===n.range[1]&&e.report({node:t,message:"Unary word operator '{{word}}' must be followed by whitespace.",data:{word:i},fix:function(e){return e.insertTextAfter(n," ")}})}function s(t,r,i,o){n(t)&&i.range[0]>r.range[1]&&e.report({node:t,message:"Unexpected space after unary word operator '{{word}}'.",data:{word:o},fix:function(e){return e.removeRange([r.range[1],i.range[0]])}})}function u(e,t,n,r){r=r||t.value,i(e,r)?o(e,r)?a(e,t,n,r):s(e,t,n,r):h.words?a(e,t,n,r):s(e,t,n,r)}function c(e){var t=m.getFirstTokens(e,3),n="yield";e.argument&&!e.delegate&&u(e,t[0],t[1],n)}function l(e){var t=m.getFirstTokens(e,3);u(e,t[0],t[1],"await")}function p(n,r,i){if(n.prefix){if(t(n))return;r.range[1]===i.range[0]&&e.report({node:n,message:"Unary operator '{{operator}}' must be followed by whitespace.",data:{operator:r.value},fix:function(e){return e.insertTextAfter(r," ")}})}else r.range[1]===i.range[0]&&e.report({node:n,message:"Space is required before unary expressions '{{token}}'.",data:{token:i.value},fix:function(e){return e.insertTextBefore(i," ")}})}function f(t,n,i){t.prefix?i.range[0]>n.range[1]&&e.report({node:t,message:"Unexpected space after unary operator '{{operator}}'.",data:{operator:n.value},fix:function(e){return r.canTokensBeAdjacent(n,i)?e.removeRange([n.range[1],i.range[0]]):null}}):i.range[0]>n.range[1]&&e.report({node:t,message:"Unexpected space before unary operator '{{operator}}'.",data:{operator:i.value},fix:function(e){return e.removeRange([n.range[1],i.range[0]])}})}function d(e){var t="UpdateExpression"!==e.type||e.prefix?m.getFirstTokens(e,2):m.getLastTokens(e,2),n=t[0],r=t[1];if(("NewExpression"===e.type||e.prefix)&&"Keyword"===n.type)return void u(e,n,r);var a=e.prefix?t[0].value:t[1].value;i(e,a)?o(e,a)?p(e,n,r):f(e,n,r):h.nonwords?p(e,n,r):f(e,n,r)}var h=e.options&&Array.isArray(e.options)&&e.options[0]||{words:!0,nonwords:!1},m=e.getSourceCode();return{UnaryExpression:d,UpdateExpression:d,NewExpression:d,YieldExpression:c,AwaitExpression:l}}}},{"../ast-utils":22}],262:[function(e,t,n){"use strict";function r(e){var t=1===e.length;return e=c.escapeRegExp(e),t?e:"(?:"+e+")"}function i(e){return r(e)+"+"}function o(e){return e=e?e.slice(0):[],e.indexOf("*")===-1&&e.push("*"),e}function a(e){var t="";return 0===e.length?t+="\\s":(t+="(?:\\s|",1===e.length?t+=i(e[0]):(t+="(?:",t+=e.map(i).join("|"),t+=")"),t+="(?:$|["+Array.from(l.LINEBREAKS).join("")+"]))"),t}function s(e,t){var n="^";return 1===e.length?n+=r(e[0]):(n+="(?:",n+=e.map(r).join("|"),n+=")"),n+="?",n+=a(t),new RegExp(n)}function u(e){var t="^("+e.map(r).join("|")+")?[ \t]+";return new RegExp(t)}var c=e("lodash"),l=e("../ast-utils");t.exports={meta:{docs:{description:"enforce consistent spacing after the `//` or `/*` in a comment",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},line:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}}},additionalProperties:!1},block:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},balanced:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]},create:function(e){function t(t,n,r,i){var o=t.type.toLowerCase(),a="block"===o?"/*":"//";e.report({node:t,fix:function(e){var n=t.range[0],i=n+2;return l?(r&&(i+=r[0].length),e.insertTextAfterRange([n,i]," ")):(i+=r[0].length,e.replaceTextRange([n,i],a+(r[1]?r[1]:"")))},message:n,data:{refChar:i}})}function n(t,n,r){e.report({node:t,fix:function(e){if(l)return e.insertTextAfterRange([t.start,t.end-2]," ");var n=t.end-2,i=n-r[0].length;return e.replaceTextRange([i,n],"")},message:n})}function i(e){var r=e.type.toLowerCase(),i=d[r],o="block"===r?"/*":"//";if(0!==e.value.length){var a=i.beginRegex.exec(e.value),s=i.endRegex.exec(e.value);if(l){if(!a){var u=i.markers.exec(e.value),c=u?o+u[0]:o;i.hasExceptions?t(e,"Expected exception block, space or tab after '{{refChar}}' in comment.",u,c):t(e,"Expected space or tab after '{{refChar}}' in comment.",u,c)}f&&"block"===r&&!s&&n(e,"Expected space or tab before '*/' in comment.")}else a&&(a[1]?t(e,"Unexpected space or tab after marker ({{refChar}}) in comment.",a,a[1]):t(e,"Unexpected space or tab after '{{refChar}}' in comment.",a,o)),f&&"block"===r&&s&&n(e,"Unexpected space or tab before '*/' in comment.",s)}}var c=e.getSourceCode(),l="never"!==e.options[0],p=e.options[1]||{},f=p.block&&p.block.balanced,d=["block","line"].reduce(function(e,t){var n=o(p[t]&&p[t].markers||p.markers),i=p[t]&&p[t].exceptions||p.exceptions||[],c="[ \t]+$";return e[t]={beginRegex:l?s(n,i):u(n),endRegex:f&&l?new RegExp(a(i)+"$"):new RegExp(c),hasExceptions:i.length>0,markers:new RegExp("^("+n.map(r).join("|")+")")},e},{});return{Program:function(){var e=c.getAllComments();e.filter(function(e){return"Shebang"!==e.type}).forEach(i)}}}}},{"../ast-utils":22,lodash:16}],263:[function(e,t,n){"use strict";function r(e){for(var t=[],n=0;n0,u=0===h.length&&0===m.length,l=h.length>0&&h[h.length-1],p=r.length>0;p?(o(t.params)?l?e.report({node:r[0],message:s.unnecessary,fix:n(r[0])}):i&&e.report({node:r[0],message:s.unnecessaryInClasses,fix:n(r[0])}):e.report({node:r[0],message:s.nonSimpleParameterList}),c(r,s.multiple,!0)):u&&(o(t.params)?e.report({node:t,message:s.function}):e.report({node:t,message:s.wrap,data:{name:a.getFunctionNameWithKind(t)}})),h.push(l||p)}function p(){h.pop()}function f(n){var i="BlockStatement"===n.body.type,a=i?r(n.body.body):[];"function"===g?l(n,a):a.length>0&&(o(n.params)?u(a,s[g],t(g)):(e.report({node:a[0],message:s.nonSimpleParameterList}),c(a,s.multiple,!0)))}var d=e.parserOptions.ecmaFeatures||{},h=[],m=[],g=e.options[0]||"safe";d.impliedStrict?g="implied":"safe"===g&&(g=d.globalReturn?"global":"function");var v={Program:function(n){var i=r(n.body);"module"===n.sourceType&&(g="module"),"global"===g?(n.body.length>0&&0===i.length&&e.report({node:n,message:s.global}),c(i,s.multiple,!0)):u(i,s[g],t(g))},FunctionDeclaration:f,FunctionExpression:f,ArrowFunctionExpression:f};return"function"===g&&Object.assign(v,{ClassBody:function(){m.push(!0)},"ClassBody:exit":function(){m.pop()},"FunctionDeclaration:exit":p,"FunctionExpression:exit":p,"ArrowFunctionExpression:exit":p}),v}}},{"../ast-utils":22}],264:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"enforce spacing around colons of switch statements",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}],fixable:"whitespace"},create:function(e){function t(e){return e.test?a.getTokenAfter(e.test,r.isColonToken):a.getFirstToken(e,1)}function n(e,t,n){return r.isClosingBraceToken(t)||!r.isTokenOnSameLine(e,t)||a.isSpaceBetweenTokens(e,t)===n}function i(e,t){return null!==a.getFirstTokenBetween(e,t,{includeComments:!0,filter:r.isCommentToken})}function o(e,t,n,r){return i(t,n)?null:r?e.insertTextAfter(t," "):e.removeRange([t.range[1],n.range[0]])}var a=e.getSourceCode(),s=e.options[0]||{},u=s.before===!0,c=s.after!==!1;return{SwitchCase:function(r){var i=t(r),s=a.getTokenBefore(i),l=a.getTokenAfter(i);n(s,i,u)||e.report({node:r,loc:i.loc,message:"{{verb}} space(s) before this colon.",data:{verb:u?"Expected":"Unexpected"},fix:function(e){return o(e,s,i,u)}}),n(i,l,c)||e.report({node:r,loc:i.loc,message:"{{verb}} space(s) after this colon.",data:{verb:c?"Expected":"Unexpected"},fix:function(e){return o(e,i,l,c)}})}}}}},{"../ast-utils":22}],265:[function(e,t,n){"use strict";var r=e("../ast-utils");t.exports={meta:{docs:{description:"require symbol descriptions",category:"ECMAScript 6",recommended:!1},schema:[]},create:function(e){function t(t){0===t.arguments.length&&e.report({node:t,message:"Expected Symbol to have a description."})}return{"Program:exit":function(){var n=e.getScope(),i=r.getVariableByName(n,"Symbol");i&&0===i.defs.length&&i.references.forEach(function(e){var n=e.identifier;r.isCallee(n)&&t(n.parent)})}}}}},{"../ast-utils":22}],266:[function(e,t,n){"use strict";var r=e("../ast-utils"),i=/\$\{$/,o=/^\}/;t.exports={meta:{docs:{description:"require or disallow spacing around embedded expressions of template strings",category:"ECMAScript 6",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]}]},create:function(e){function t(t){var n=a.getTokenBefore(t);n&&o.test(t.value)&&r.isTokenOnSameLine(n,t)&&a.isSpaceBetweenTokens(n,t)!==s&&e.report({loc:t.loc.start,message:"{{prefix}} space(s) before '}'.",data:{prefix:u},fix:function(e){return s?e.insertTextBefore(t," "):e.removeRange([n.range[1],t.range[0]])}})}function n(t){var n=a.getTokenAfter(t);n&&i.test(t.value)&&r.isTokenOnSameLine(t,n)&&a.isSpaceBetweenTokens(t,n)!==s&&e.report({loc:{line:t.loc.end.line,column:t.loc.end.column-2},message:"{{prefix}} space(s) after '${'.",data:{prefix:u},fix:function(e){return s?e.insertTextAfter(t," "):e.removeRange([t.range[1],n.range[0]])}})}var a=e.getSourceCode(),s="always"===e.options[0],u=s?"Expected":"Unexpected";return{TemplateElement:function(e){var r=a.getFirstToken(e);t(r),n(r)}}}}},{"../ast-utils":22}],267:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require or disallow spacing between template tags and their literals",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]}]},create:function(e){function t(t){var i=r.getTokenBefore(t.quasi),o=r.getFirstToken(t.quasi),a=r.isSpaceBetweenTokens(i,o);n&&a?e.report({node:t,loc:i.loc.start,message:"Unexpected space between template tag and template literal.",fix:function(e){var n=r.getCommentsBefore(t.quasi);return n.some(function(e){return"Line"===e.type})?null:e.replaceTextRange([i.range[1],o.range[0]],n.reduce(function(e,t){return e+r.getText(t)},""))}}):n||a||e.report({node:t,loc:i.loc.start,message:"Missing space between template tag and template literal.",fix:function(e){return e.insertTextAfter(i," ")}})}var n="always"!==e.options[0],r=e.getSourceCode();return{TaggedTemplateExpression:t}}}},{}],268:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require or disallow Unicode byte order mark (BOM)",category:"Stylistic Issues",recommended:!1},fixable:"whitespace",schema:[{enum:["always","never"]}]},create:function(e){return{Program:function(t){var n=e.getSourceCode(),r={column:0,line:1},i=e.options[0]||"never";n.hasBOM||"always"!==i?n.hasBOM&&"never"===i&&e.report({node:t,loc:r,message:"Unexpected Unicode BOM (Byte Order Mark).",fix:function(e){return e.removeRange([-1,0])}}):e.report({node:t,loc:r,message:"Expected Unicode BOM (Byte Order Mark).",fix:function(e){return e.insertTextBeforeRange([0,1],"\ufeff")}})}}}}},{}],269:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require calls to `isNaN()` when checking for `NaN`",category:"Possible Errors",recommended:!0},schema:[]},create:function(e){return{BinaryExpression:function(t){!/^(?:[<>]|[!=]=)=?$/.test(t.operator)||"NaN"!==t.left.name&&"NaN"!==t.right.name||e.report({node:t,message:"Use the isNaN function to compare with NaN."})}}}}},{}],270:[function(e,t,n){"use strict";var r=e("doctrine");t.exports={meta:{docs:{description:"enforce valid JSDoc comments",category:"Possible Errors",recommended:!1},schema:[{type:"object",properties:{prefer:{type:"object",additionalProperties:{type:"string"}},preferType:{type:"object",additionalProperties:{type:"string"}},requireReturn:{type:"boolean"},requireParamDescription:{type:"boolean"},requireReturnDescription:{type:"boolean"},matchDescription:{type:"string"},requireReturnType:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){return"ClassExpression"===e.type||"ClassDeclaration"===e.type}function n(e){x.push({returnPresent:"ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type||t(e)})}function i(e){var t=x[x.length-1];t&&null!==e.argument&&(t.returnPresent=!0)}function o(e){return null===e.type||"void"===e.type.name||"UndefinedLiteral"===e.type.type}function a(e){return"UndefinedLiteral"!==e&&"NullLiteral"!==e&&"NullableLiteral"!==e&&"FunctionType"!==e&&"AllLiteral"!==e}function s(e){var t=void 0;e.name?t=e.name:e.expression&&(t=e.expression.name);var n=t&&v[t];return{currentType:t,expectedType:n}}function u(t,n){if(n&&a(n.type)){var r=[],i=[];switch(n.type){case"TypeApplication":i="UnionType"===n.applications[0].type?n.applications[0].elements:n.applications,r.push(s(n));break;case"RecordType":i=n.fields;break;case"UnionType":case"ArrayType":i=n.elements;break;case"FieldType":n.value&&r.push(s(n.value));break;default:r.push(s(n))}i.forEach(u.bind(null,t)),r.forEach(function(n){n.expectedType&&n.expectedType!==n.currentType&&e.report({node:t,message:"Use '{{expectedType}}' instead of '{{currentType}}'.",data:{currentType:n.currentType,expectedType:n.expectedType}})})}}function c(n){var i=f.getJSDocComment(n),a=x.pop(),s=Object.create(null),c=!1,v=!1,b=!1,_=!1,w=!1,E=void 0;if(i){try{E=r.parse(i.value,{strict:!0,unwrap:!0,sloppy:!0})}catch(t){return void(/braces/i.test(t.message)?e.report({node:i,message:"JSDoc type missing brace."}):e.report({node:i,message:"JSDoc syntax error."}))}E.tags.forEach(function(t){switch(t.title.toLowerCase()){case"param":case"arg":case"argument":t.type||e.report({node:i,message:"Missing JSDoc parameter type for '{{name}}'.",data:{name:t.name}}),!t.description&&h&&e.report({node:i,message:"Missing JSDoc parameter description for '{{name}}'.",data:{name:t.name}}),s[t.name]?e.report({node:i,message:"Duplicate JSDoc parameter '{{name}}'.",data:{name:t.name}}):t.name.indexOf(".")===-1&&(s[t.name]=1);break;case"return":case"returns":c=!0,d||a.returnPresent||null!==t.type&&o(t)||w?(g&&!t.type&&e.report({node:i,message:"Missing JSDoc return type."}),o(t)||t.description||!m||e.report({node:i,message:"Missing JSDoc return description."})):e.report({node:i,message:"Unexpected @{{title}} tag; function has no return statement.",data:{title:t.title}});break;case"constructor":case"class":v=!0;break;case"override":case"inheritdoc":_=!0;break;case"abstract":case"virtual":w=!0;break;case"interface":b=!0}p.hasOwnProperty(t.title)&&t.title!==p[t.title]&&e.report({node:i,message:"Use @{{name}} instead.",data:{name:p[t.title]}}),y&&t.type&&u(i,t.type)}),_||c||v||b||"get"===n.parent.kind||"constructor"===n.parent.kind||"set"===n.parent.kind||t(n)||(d||a.returnPresent)&&e.report({node:i,message:"Missing JSDoc @{{returns}} for function.",data:{returns:p.returns||"returns"}});var S=Object.keys(s);if(n.params&&n.params.forEach(function(t,n){"AssignmentPattern"===t.type&&(t=t.left);var r=t.name;"Identifier"===t.type&&(S[n]&&r!==S[n]?e.report({node:i,message:"Expected JSDoc for '{{name}}' but found '{{jsdocName}}'.",data:{name:r,jsdocName:S[n]}}):s[r]||_||e.report({node:i,message:"Missing JSDoc for parameter '{{name}}'.",data:{name:r}}))}),l.matchDescription){var C=new RegExp(l.matchDescription);C.test(E.description)||e.report({node:i,message:"JSDoc description does not satisfy the regex pattern."})}}}var l=e.options[0]||{},p=l.prefer||{},f=e.getSourceCode(),d=l.requireReturn!==!1,h=l.requireParamDescription!==!1,m=l.requireReturnDescription!==!1,g=l.requireReturnType!==!1,v=l.preferType||{},y=0!==Object.keys(v).length,x=[];return{ArrowFunctionExpression:n,FunctionExpression:n,FunctionDeclaration:n,ClassExpression:n,ClassDeclaration:n,"ArrowFunctionExpression:exit":c,"FunctionExpression:exit":c,"FunctionDeclaration:exit":c,"ClassExpression:exit":c,"ClassDeclaration:exit":c,ReturnStatement:i}}}},{doctrine:2}],271:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"enforce comparing `typeof` expressions against valid strings",category:"Possible Errors",recommended:!0},schema:[{type:"object",properties:{requireStringLiterals:{type:"boolean"}},additionalProperties:!1}]},create:function(e){function t(e){return"UnaryExpression"===e.type&&"typeof"===e.operator}var n=["symbol","undefined","object","boolean","number","string","function"],r=["==","===","!=","!=="],i=e.options[0]&&e.options[0].requireStringLiterals;return{UnaryExpression:function(o){if(t(o)){var a=e.getAncestors().pop();if("BinaryExpression"===a.type&&r.indexOf(a.operator)!==-1){var s=a.left===o?a.right:a.left;if("Literal"===s.type||"TemplateLiteral"===s.type&&!s.expressions.length){var u="Literal"===s.type?s.value:s.quasis[0].value.cooked;n.indexOf(u)===-1&&e.report({node:s,message:"Invalid typeof comparison value."})}else i&&!t(s)&&e.report({node:s,message:"Typeof comparisons should be to string literals."})}}}}}}},{}],272:[function(e,t,n){"use strict";t.exports={meta:{docs:{description:"require `var` declarations be placed at the top of their containing scope",category:"Best Practices",recommended:!1},schema:[]},create:function(e){function t(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value}function n(e){return"ImportDeclaration"===e.type||"ImportSpecifier"===e.type||"ImportDefaultSpecifier"===e.type||"ImportNamespaceSpecifier"===e.type}function r(e){return"VariableDeclaration"===e.type||"ExportNamedDeclaration"===e.type&&e.declaration&&"VariableDeclaration"===e.declaration.type}function i(e,i){for(var o=i.length,a=0;a|<=|>=)$/.test(e)}function i(e){return/^(==|===)$/.test(e)}function o(e){return["<","<="].indexOf(e)>=0}function a(e){return"UnaryExpression"===e.type&&"-"===e.operator&&e.prefix&&"Literal"===e.argument.type&&"number"==typeof e.argument.value}function s(e,t){return"Literal"===e.type?e:a(e)?{type:"Literal",value:-e.argument.value,raw:"-"+e.argument.value}:t?{type:"Literal",value:t,raw:String(t)}:null}function u(e,t){if(e.type!==t.type)return!1;switch(e.type){case"Identifier":return e.name===t.name;case"Literal":return e.value===t.value;case"MemberExpression":var n=c.getStaticPropertyName(e);return n?u(e.object,t.object)&&n===c.getStaticPropertyName(t):e.computed===t.computed&&u(e.object,t.object)&&u(e.property,t.property);case"ThisExpression":return!0;default:return!1}}var c=e("../ast-utils");t.exports={meta:{docs:{description:'require or disallow "Yoda" conditions',category:"Best Practices",recommended:!1},schema:[{enum:["always","never"]},{type:"object",properties:{exceptRange:{type:"boolean"},onlyEquality:{type:"boolean"}},additionalProperties:!1}],fixable:"code"},create:function(e){function t(e){function t(){var t=void 0,n=void 0;return"&&"===e.operator&&(t=s(i.left))&&(n=s(a.right,Number.POSITIVE_INFINITY))&&t.value<=n.value&&u(i.right,a.left)}function n(){var t=void 0,n=void 0;return"||"===e.operator&&(t=s(i.right,Number.NEGATIVE_INFINITY))&&(n=s(a.left))&&t.value<=n.value&&u(i.left,a.right)}function r(){return c.isParenthesised(d,e)}var i=e.left,a=e.right;return"LogicalExpression"===e.type&&"BinaryExpression"===i.type&&"BinaryExpression"===a.type&&o(i.operator)&&o(a.operator)&&(t()||n())&&r()}function n(e){var t=d.getFirstTokenBetween(e.left,e.right,function(t){return t.value===e.operator}),n=d.getText().slice(d.getTokenBefore(t).range[1],t.range[0]),r=d.getText().slice(t.range[1],d.getTokenAfter(t).range[0]),i=d.getText().slice(e.range[0],d.getTokenBefore(t).range[1]),o=d.getText().slice(d.getTokenAfter(t).range[0],e.range[1]); return o+n+h[t.value]+r+i}var l="always"===e.options[0],p=e.options[1]&&e.options[1].exceptRange,f=e.options[1]&&e.options[1].onlyEquality,d=e.getSourceCode(),h={"===":"===","!==":"!==","==":"==","!=":"!=","<":">",">":"<","<=":">=",">=":"<="};return{BinaryExpression:function(o){var s=l?o.left:o.right,u=l?o.right:o.left;"Literal"!==u.type&&!a(u)||"Literal"===s.type||a(s)||!i(o.operator)&&f||!r(o.operator)||p&&t(e.getAncestors().pop())||e.report({node:o,message:"Expected literal to be on the {{expectedSide}} side of {{operator}}.",data:{operator:o.operator,expectedSide:l?"left":"right"},fix:function(e){return e.replaceText(o,n(o))}})}}}}},{"../ast-utils":22}],277:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;nr)return!0;return!1};return{_getFilteredConfiguration:function(e,t){if(!t)return e;var n=e.eslintConfig||{},r=n.rules||{},i=e.rulesExt,o={info:t.indexOf("info")>=0,i:t.indexOf("info")>=0,warning:t.indexOf("warning")>=0,w:t.indexOf("warning")>=0,error:t.indexOf("error")>=0,e:t.indexOf("error")>=0};for(var a in r){var s=r[a];if(r.hasOwnProperty(a)){var u;i[a]?u=i[a].severity:(u="warning",this.context.service.log.info(this.context.service.jsValidator.getProxyMetadata().getName(),"rule "+a+"missing severity information. severity set to warning.",["user"]).done()),o[u]||("number"==typeof s?r[a]=0:Array.isArray(s)&&(s[0]=0))}}return e},_getRelevantConfig:function(e,t){var n=e;if(t){var r=t.get(".eslintrc");if(r){var i=o(r);n={eslintConfig:i};var a=t.get(".eslintrc.ext");if(a){var s=o(a);if(s&&n){n.rulesExt=s.rulesExt;var u=t.get("filterLevel");u&&(n=this._getFilteredConfiguration(n,u))}}}else{var c=t.get("configFromProject");c&&(n=c)}}return n},disableAllRules:function(t){if(t&&t.eslintConfig&&t.eslintConfig.rules){var n=e.cloneDeep(t);return e.forEach(n.eslintConfig.rules,function(t,r){e.isArray(t)?n.eslintConfig.rules[r][0]=0:n.eslintConfig.rules[r]=0}),n}},getDefaultConfiguration:function(){return n},getIssues:function(e,t,n,r,o){var s={root:{},issues:[]};if(a(e))return s;var u=[];t=this._getRelevantConfig(t,o);var c=t.rulesExt||{},l=t.eslintConfig||{};if(o){var p=o.get("customRulesContentFromEslintrc");p&&(r=p)}r&&(Object.getOwnPropertyNames(r).forEach(function(e){try{var t=new Function(r[e]);r[e]=t()}catch(t){u.push(e)}}),this._defineCustomRulesToLinter(r));var f=i.verify(e,l,n,!1);i.reset();for(var d=0;d0?r._securityScan(e).then(function(e){return r._createCustomRulesStruct(e)}):null})}):(r.context.service.log.warn(r.context.service.jsValidator.getProxyMetadata().getName()," user defined RulesDirectory "+e+" defined under project settings was not found",["user"]).done(),null)}):Q()},_securityScan:function(e){var r=[],i=[];return t.each(e,function(e){e.getEntity().getFullPath();i.push(e.getContent().then(function(t){return{content:t,document:e}}))}),Q.all(i).then(function(e){return t.each(e,function(e){var t=e.content,i=e.document;n.scan(t)&&r.push(i.getTitle().replace(/\.js/,""))}),r})},_createCustomRulesStruct:function(e){var t=this,n=t._getRulesConfigurationTemplate(),r=n.eslintConfig.rules,i=n.rulesExt;return jQuery.each(e,function(e,n){"length"!==n&&(r[n]={},r[n]=t.CUSTOM_RULES_DEFAULTS.enabled,i[n]={},i[n].severity=t.CUSTOM_RULES_DEFAULTS.severity,i[n].category=t.CUSTOM_RULES_DEFAULTS.category)}),n},_getRulesConfigurationTemplate:function(){return{eslintConfig:{rules:{}},rulesExt:{}}},getUpdatedConfiguration:function(e,n){var r=this;return e?r.context.service.filesystem.documentProvider.getDocument(e).then(function(n){return n&&n.getType()===r.FILE_TYPE?n.getContent().then(function(n){var i;try{i=JSON.parse(n)}catch(t){return r.context.service.log.error(r.context.service.jsValidator.getProxyMetadata().getName()," validator configuration file: "+e+" has invalid JSON structure.",["user"]).done(),{}}var o={eslintConfig:{env:i.env,globals:i.globals,rules:i.rules},rulesExt:i.additionalRuleMetadata};return t.forEach(o.rulesExt,function(e){switch(e.severity.toLowerCase()[0]){case"e":e.severity="error";break;case"w":e.severity="warning";break;case"i":e.severity="info"}}),o}):void r.context.service.log.error(r.context.service.jsValidator.getProxyMetadata().getName()," validator configuration file: "+e+" ,defined in project settings was not found",["user"]).done()}):{}}}}),define("sap.watt.toolsets.javascript/service/JSValidatorConfiguration",["sap/watt/lib/lodash/lodash","sap.watt.toolsets.javascript/util/JSValidatorHelper"],function(e,t){"use strict";var n=".eslintrc",r=".eslintrc.ext";return{saveConfiguration:function(e,t){var i=this,o=i._convertConfigurationToEslintFormat(t);return Q.all([i._setToEslintrcFile(e,n,o.ESLINTRC_FILE),i._setToEslintrcFile(e,r,o.ESLINTRC_EXT_FILE)])},getDefaultConfiguration:function(){var e=this;return this._isHCPEnv()?this.context.service.jsrules.fromHcp().then(function(i){if(i&&i[n]&&i[r]){var o=e._parseContent(i[".eslintrc"]),a=e._parseContent(i[".eslintrc.ext"]);return o&&a?(o.rulesExt=a.rulesExt,o=e._convertToDefaultStructure(o),e._wrapEslintConfigForDisplay(o)):e._getDefaultConfig(t)}return e._getDefaultConfig(t)}):this._getDefaultConfig(t)},getConfiguration:function(e){var i=this;return this._getEslintrcFile(e,n).then(function(n){return n?i._getEslintrcRules(n).then(function(n){if(n)return i._getEslintrcFile(e,r).then(function(e){return e?i._getEslintrcExtensions(e).then(function(e){return e?(n.rulesExt=e.rulesExt,n=i._convertToDefaultStructure(n),i._wrapEslintConfigForDisplay(n)):(n=i._mergeEslintrcWithDefaultExtensions(n),i._wrapEslintConfigForDisplay(n))}):(n=i._mergeEslintrcWithDefaultExtensions(n),i._wrapEslintConfigForDisplay(n))});var o=t.getDefaultConfiguration(),a=t.disableAllRules(o);return i._wrapEslintConfigForDisplay(a)}):i.getDefaultConfiguration()}).fail(function(e){throw new Error(e)})},_isHCPEnv:function(){return"hcproxy"===sap.watt.getEnv("server_type")},_getDefaultConfig:function(e){var t=e.getDefaultConfiguration();return this._wrapEslintConfigForDisplay(t)},_convertConfigurationToEslintFormat:function(e){var t=this,n={},r={},i=e||{};$.each(i.rules||{},function(e,i){n[i.ruleId]={},i.additionalProperties?(n[i.ruleId]=[],i.enable===!1?n[i.ruleId][0]=t._convertRuleValFromSeverity():n[i.ruleId][0]=t._convertRuleValFromSeverity(i.severity),n[i.ruleId]=n[i.ruleId].concat(i.additionalProperties)):i.enable===!1?n[i.ruleId]=t._convertRuleValFromSeverity():n[i.ruleId]=t._convertRuleValFromSeverity(i.severity),r[i.ruleId]={},r[i.ruleId].severity=i.severity?i.severity.toLowerCase():"warning",r[i.ruleId].category=i.category,r[i.ruleId].helpUrl=i.helpUrl});var o=i.header||{},a=i.customRulesPath||void 0;return this._buildConfigurationTemplate(n,o.globals,o.env,r,a)},_convertRuleValFromSeverity:function(e){if(!e)return 0;var t=e.toLowerCase()[0];return"w"===t||"i"===t?1:"e"===t?2:0},_buildConfigurationTemplate:function(e,t,n,r,i){var o={ESLINTRC_FILE:{},ESLINTRC_EXT_FILE:{}};return o.ESLINTRC_FILE.rules=e?e:null,o.ESLINTRC_EXT_FILE.rulesExt=r?r:null,o.ESLINTRC_FILE.globals=t?t:null,o.ESLINTRC_FILE.env=n?n:null,o.ESLINTRC_FILE.customRulesPath=i?i:null,o},_getEslintrcFile:function(e,t){var n=e+"/"+t;return this.context.service.document.getDocumentByPath(n)},_setToEslintrcFile:function(t,n,r){var i=this;if(!e.isEmpty(r)){var o=JSON.stringify(r);return this.context.service.beautifierProcessor.beautify(o,"json").then(function(e){return i._getEslintrcFile(t,n).then(function(r){return r?r.setContent(e).then(function(){return r.save()}):i.context.service.document.getDocumentByPath(t).then(function(t){if(t.getEntity().isProject())return t.createFile(n).then(function(t){return t.setContent(e).then(function(){return t.save()})})})})})}},_getEslintrcRules:function(t){return this._getParseContent(t).then(function(t){return t&&t.rules&&!e.isEmpty(t.rules)?t:null})},_getEslintrcExtensions:function(t){return this._getParseContent(t).then(function(t){return t&&t.rulesExt&&!e.isEmpty(t.rulesExt)?t:null})},_getParseContent:function(e){var t=this;return e.getContent().then(function(e){return t._parseContent(e)})},_parseContent:function(e){try{var t=JSON.parse(e);return t}catch(e){return null}},_wrapEslintConfigForDisplay:function(t){var n=this,r={};if(!t.eslintConfig)return r;var i=t.eslintConfig.rules||{},o=t.rulesExt;e.forEach(i,function(e,t){var i={};i.ruleId=t,i.category=o[t]?o[t].category:"",i.helpUrl=o[t]?o[t].helpUrl:"http://eslint.org/docs/rules/"+t,n._extractRuleFromValue(i,o[t],e),r[t]=i});var a={};return a.rules=r,a.header={},t.eslintConfig.globals&&(a.header.globals=t.eslintConfig.globals),t.eslintConfig.env&&(a.header.env=t.eslintConfig.env),a.customRulesPath=t.customRulesPath,a},_extractRuleFromValue:function(t,n,r){var i;"number"==typeof r?i=r:e.isArray(r)&&r.length>0&&(i=r[0],t.additionalProperties=e.cloneDeep(r.slice(1))),t.enable=i>0,2===i?t.severity="error":1===i&&n&&"info"!==n.severity&&"warning"!==n.severity?t.severity="warning":t.severity=n?n.severity:"warning"},_convertToDefaultStructure:function(e){return{eslintConfig:{env:e.env,globals:e.globals,rules:e.rules},customRulesPath:e.customRulesPath,rulesExt:e.rulesExt}},_addRulesExtensions:function(e){var n=t.getDefaultConfiguration();return e.rulesExt=n.rulesExt,$.each(e.rulesExt,function(t){e.rulesExt[t].helpUrl||(e.rulesExt[t].helpUrl="http://eslint.org/docs/rules/"+t)}),e},_mergeEslintrcWithDefaultExtensions:function(e){return e=this._addRulesExtensions(e),e=this._convertToDefaultStructure(e)}}}),define("sap.watt.toolsets.javascript/service/JSDefinitionImpl",["./../util/editorUtil","sap/watt/lib/orion/javascript/esprima/esprimaJsContentAssist","sap/watt/lib/orion/javascript/esprima/esprimaVisitor","sap/watt/lib/orion/javascript/esprima/indexer"],function(e,t,n,r){"use strict";function i(e,n,r,i){if(!e||!n||!r)return this.context.service.log.info("JSDefinitionImpl",i.getText("i18n","message_invalidargument",["JSDefinitionImpl","_findDefinition"]),["user"]).done(),Q();var o=new t.EsprimaJavaScriptContentAssistProvider(r);return o.findDefinition(e,n.buffer,n.offset)}function o(e,t,n,r,i){if(e&&e.range)return(i=i.bind(t))(e);if(!r){var o;o=e&&e.hoverName?n.getText("i18n","message_nodefinitionfoundfor",[e.hoverName]):n.getText("i18n","message_nodefinitionfound"),t.context.service.log.info(h,o,["user"]).done()}return Q()}function a(t,n,r){var i=this;return t?n.filesystem.documentProvider.getDocument(t).then(function(o){return o?n.document.open(o).then(function(){return n.repositorybrowser.setSelection(o,!0).then(function(){return e.getCurrentEditor(n.selection)})}):(i.context.service.log.info("JSDefinitionImpl",r.getText("i18n","message_failtogetdocument",[t]),["user"]).done(),Q())}):(this.context.service.log.info("JSDefinitionImpl",r.getText("i18n","message_invalidargument",["JSDefinitionImpl","_activateEditor"]),["user"]).done(),Q())}function s(t,n,r,i){if(t){if(!n||2!==n.length)return this.context.service.log.info("JSDefinitionImpl",i.getText("i18n","message_invalidargument",["JSDefinitionImpl","_highlightResult"]),["user"]).done(),Q();e.setEditorSelection(t,n[0],n[1],r)}return Q()}function u(t,n){return e.getCurrentEditor(t).then(function(e){return e?e.getContentStatusByPosition(n):Q()})}function c(t,n){if(!v&&n.clientX&&n.clientY){v=!0;var r=t.jsdefinition,i=t.selection;e.getCurrentUI5Editor(i).then(function(t){var o=e.getDocumentPosition(t,n.clientX,n.clientY);u(i,o).then(function(n){r.hoverDefinition(n).then(function(n){n&&n.range&&n.hoverRange&&!g?e.addDefinitionMarker(t,n.hoverRange):e.clearDefinitionMarker(t),v=!1}).done()}).done()}).done()}}function l(e){m.clientX=e.clientX,m.clientY=e.clientY,e.ctrlKey&&e.altKey&&c(this.context.service,m)}function p(e){e.ctrlKey&&(y=!0),e.altKey&&(x=!0),b&&y&&x&&(c(this.context.service,m),b=!1)}function f(e){y=!1,x=!1,b||(this.cancelHoverStyle(),b=!0)}function d(t){if(t.ctrlKey&&t.altKey&&!g){g=!0;var n=this.context.service.jsdefinition,r=this.context.service.selection;e.getCurrentUI5Editor(r).then(function(i){var o=e.getDocumentPosition(i,t.clientX,t.clientY);u(r,o).then(function(t){e.clearDefinitionMarker(i),n.gotoDefinition(t,!0).then(function(){g=!1}).done()}).done()}).done()}}var h="jsdefinition",m={},g=!1,v=!1,y=!1,x=!1,b=!0,_=null;return{configure:function(e){_=e.supportedFileExtensions},isFileExtensionSupported:function(e){return _.indexOf(e)>-1},gotoDefinition:function(e,t){var a=this.context.i18n,s=this.context;if(!e)return this.context.service.log.info("JSDefinitionImpl",a.getText("i18n","message_invalidargument",["JSDefinitionImpl","gotoDefinition"])),Q();var u=n.parse(e.buffer),c=this.context.service.indexmanager,l=this.highlightResult,p=this,f=[c.getDependentIndexes(e.targetFile,u),c.getUI5ProjectInfo(e.targetFile)];return Q.spread(f,function(n,c){var f=new r.OrionIndexer(n,e.targetFile,c);return i(u,e,f,a).then(function(e){return s.event.fireNavigationRequested({sTarget:e.path,oCoordinates:e.range}),o(e,p,a,t,l)})}).fail(function(e){return console.warn(e),Q()})},hoverDefinition:function(e){var t=this.context.i18n;if(!e)return this.context.service.log.info("JSDefinitionImpl",t.getText("i18n","message_invalidargument",["JSDefinitionImpl","hoverDefinition"])),Q();var o=n.parse(e.buffer),a=this.context.service,s=a.indexmanager,u=[s.getDependentIndexes(e.targetFile,o),s.getUI5ProjectInfo(e.targetFile)];return Q.spread(u,function(n,a){var s=new r.OrionIndexer(n,a);return i(o,e,s,t)}).fail(function(e){return console.warn(e),Q()})},highlightResult:function(t){if(!t)return Q();var n=this.context.i18n;if(t.path)return a(t.path,this.context.service).then(function(e){return s(e,t.range,!0,n)});var r=this.context.service.selection;return e.getCurrentEditor(r).then(function(e){return s(e,t.range,!1,n)})},applyHoverStyle:function(t){var n=this.context.service.selection;e.getCurrentUI5Editor(n).then(function(n){e.addDefinitionMarker(n,t)}).done()},cancelHoverStyle:function(){var t=this.context.service.selection;e.getCurrentUI5Editor(t).then(function(t){e.clearDefinitionMarker(t)}).done()},onSelectionChanged:function(t){g=!1,v=!1;var n=t.params.owner;if(n&&n.instanceOf("sap.watt.common.plugin.aceeditor.service.Editor")){var r=n,i=t.params.selection;if(i&&i.length>0){var o=i[0].document;o&&this.isFileExtensionSupported(o.getEntity().getFileExtension())&&(l=l.bind(this),p=p.bind(this),f=f.bind(this),d=d.bind(this),r.getUI5Editor().then(function(t){e.attachEditorEvent(t,"mousemove",l),e.attachEditorEvent(t,"keydown",p),e.attachEditorEvent(t,"keyup",f),e.attachEditorEvent(t,"click",d)}).done())}}}}}),define("sap.watt.toolsets.javascript/service/JSDocGenImpl",[],function(){"use strict";return{configure:function(e){},_generateFunctionCommentString:function(e,t){var n=(e.commentLoc.start.column,""),r=t||"\n",i="/** ";i+=r+n+" * ",i+=this._isConstructorFunction(e.name)?r+n+" * @constructor ":"";for(var o=e.params,a=0;a0&&(i+=r+n+" * @returns"),i+=r+n+" */",i+=r+n},_isConstructorFunction:function(e){if(!e)return!1;var t=e.charAt(0);return t.toUpperCase()===t},_getSpaces:function(e){for(var t="",n=0;ne.range[0]&&t.offsetn.init.range[0]&&t.offsetr.value.range[0]&&t.offsetn&&(n=e.line_indent_level));var r={mode:t,parent:e,last_text:e?e.last_text:"",last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:n,line_indent_level:e?e.line_indent_level:n,start_line_index:W.get_line_number(),ternary_depth:0};return r}function l(e){var t=e.newlines,n=te.keep_array_indentation&&x(K.mode);if(n)for(r=0;r0);else if(te.max_preserve_newlines&&t>te.max_preserve_newlines&&(t=te.max_preserve_newlines),te.preserve_newlines&&e.newlines>1){d();for(var r=1;r=te.wrap_line_length&&d(!1,!0)}}function d(e,t){if(!t&&";"!==K.last_text&&","!==K.last_text&&"="!==K.last_text&&"TK_OPERATOR"!==q)for(;K.mode===c.Statement&&!K.if_block&&!K.do_block;)_();W.add_new_line(e)&&(K.multiline_frame=!0)}function h(){W.just_added_newline()&&(te.keep_array_indentation&&x(K.mode)&&z.wanted_newline?(W.current_line.push(z.whitespace_before),W.space_before_token=!1):W.set_indent(K.indentation_level)&&(K.line_indent_level=K.indentation_level))}function m(e){if(W.raw)return void W.add_raw_token(z);if(te.comma_first&&"TK_COMMA"===q&&W.just_added_newline()&&","===W.previous_line.last()){var t=W.previous_line.pop();W.previous_line.is_empty()&&(W.previous_line.push(t),W.trim(!0),W.current_line.pop(),W.trim()),h(),W.add_token(","),W.space_before_token=!0}e=e||z.text,h(),W.add_token(e)}function g(){K.indentation_level+=1}function v(){K.indentation_level>0&&(!K.parent||K.indentation_level>K.parent.indentation_level)&&(K.indentation_level-=1)}function y(e){K?(Y.push(K),J=K):J=o(null,e),K=o(J,e)}function x(e){return e===c.ArrayLiteral}function b(t){return e(t,[c.Expression,c.ForInitializer,c.Conditional])}function _(){Y.length>0&&(J=K,K=Y.pop(),J.mode===c.Statement&&W.remove_redundant_indentation(J))}function w(){return K.parent.mode===c.ObjectLiteral&&K.mode===c.Statement&&(":"===K.last_text&&0===K.ternary_depth||"TK_RESERVED"===q&&e(K.last_text,["get","set"]))}function E(){return!!("TK_RESERVED"===q&&e(K.last_text,["var","let","const"])&&"TK_WORD"===z.type||"TK_RESERVED"===q&&"do"===K.last_text||"TK_RESERVED"===q&&e(K.last_text,["return","throw"])&&!z.wanted_newline||"TK_RESERVED"===q&&"else"===K.last_text&&("TK_RESERVED"!==z.type||"if"!==z.text)||"TK_END_EXPR"===q&&(J.mode===c.ForInitializer||J.mode===c.Conditional)||"TK_WORD"===q&&K.mode===c.BlockStatement&&!K.in_case&&"--"!==z.text&&"++"!==z.text&&"function"!==$&&"TK_WORD"!==z.type&&"TK_RESERVED"!==z.type||K.mode===c.ObjectLiteral&&(":"===K.last_text&&0===K.ternary_depth||"TK_RESERVED"===q&&e(K.last_text,["get","set"])))&&(y(c.Statement),g(),"TK_RESERVED"===q&&e(K.last_text,["var","let","const"])&&"TK_WORD"===z.type&&(K.declaration_statement=!0),w()||f("TK_RESERVED"===z.type&&e(z.text,["do","for","if","while"])),!0)}function S(e,n){for(var r=0;r=ne.length?null:ne[t]}function A(){E();var t=c.Expression;if("["===z.text){if("TK_WORD"===q||")"===K.last_text)return"TK_RESERVED"===q&&e(K.last_text,H.line_starters)&&(W.space_before_token=!0),y(t),m(),g(),void(te.space_in_paren&&(W.space_before_token=!0));t=c.ArrayLiteral,x(K.mode)&&("["!==K.last_text&&(","!==K.last_text||"]"!==$&&"}"!==$)||te.keep_array_indentation||d())}else"TK_RESERVED"===q&&"for"===K.last_text?t=c.ForInitializer:"TK_RESERVED"===q&&e(K.last_text,["if","while"])&&(t=c.Conditional);";"===K.last_text||"TK_START_BLOCK"===q?d():"TK_END_EXPR"===q||"TK_START_EXPR"===q||"TK_END_BLOCK"===q||"."===K.last_text?f(z.wanted_newline):"TK_RESERVED"===q&&"("===z.text||"TK_WORD"===q||"TK_OPERATOR"===q?"TK_RESERVED"===q&&("function"===K.last_word||"typeof"===K.last_word)||"*"===K.last_text&&"function"===$?te.space_after_anon_function&&(W.space_before_token=!0):"TK_RESERVED"!==q||!e(K.last_text,H.line_starters)&&"catch"!==K.last_text||te.space_before_conditional&&(W.space_before_token=!0):W.space_before_token=!0, "("===z.text&&"TK_RESERVED"===q&&"await"===K.last_word&&(W.space_before_token=!0),"("===z.text&&("TK_EQUALS"!==q&&"TK_OPERATOR"!==q||w()||f()),"("===z.text&&"TK_WORD"!==q&&"TK_RESERVED"!==q&&f(),y(t),m(),te.space_in_paren&&(W.space_before_token=!0),g()}function P(){for(;K.mode===c.Statement;)_();K.multiline_frame&&f("]"===z.text&&x(K.mode)&&!te.keep_array_indentation),te.space_in_paren&&("TK_START_EXPR"!==q||te.space_in_empty_paren?W.space_before_token=!0:(W.trim(),W.space_before_token=!1)),"]"===z.text&&te.keep_array_indentation?(m(),_()):(_(),m()),W.remove_redundant_indentation(J),K.do_while&&J.mode===c.Conditional&&(J.mode=c.Expression,K.do_block=!1,K.do_while=!1)}function k(){var t=D(1),n=D(2);y(n&&(e(n.text,[":",","])&&e(t.type,["TK_STRING","TK_WORD","TK_RESERVED"])||e(t.text,["get","set"])&&e(n.type,["TK_WORD","TK_RESERVED"]))?e($,["class","interface"])?c.BlockStatement:c.ObjectLiteral:"TK_OPERATOR"===q&&"=>"===K.last_text?c.BlockStatement:e(q,["TK_EQUALS","TK_START_EXPR","TK_COMMA","TK_OPERATOR"])||"TK_RESERVED"===q&&e(K.last_text,["return","throw","import"])?c.ObjectLiteral:c.BlockStatement);var r=!t.comments_before.length&&"}"===t.text,i=r&&"function"===K.last_word&&"TK_END_EXPR"===q;if("expand"===te.brace_style||"none"===te.brace_style&&z.wanted_newline)"TK_OPERATOR"!==q&&(i||"TK_EQUALS"===q||"TK_RESERVED"===q&&T(K.last_text)&&"else"!==K.last_text)?W.space_before_token=!0:d(!1,!0);else{if("collapse-preserve-inline"===te.brace_style){var o=0,a=null;K.inline_frame=!0;do if(o+=1,a=D(o),a.wanted_newline){K.inline_frame=!1;break}while("TK_EOF"!==a.type&&("TK_END_BLOCK"!==a.type||a.opened!==z))}!x(J.mode)||"TK_START_EXPR"!==q&&"TK_COMMA"!==q?"TK_OPERATOR"!==q&&"TK_START_EXPR"!==q&&("TK_START_BLOCK"===q?d():W.space_before_token=!0):K.inline_frame?(f(),K.inline_frame=!0,J.multiline_frame=J.multiline_frame||K.multiline_frame,K.multiline_frame=!1):"TK_COMMA"===q&&(W.space_before_token=!0)}m(),g()}function I(){for(;K.mode===c.Statement;)_();var e="TK_START_BLOCK"===q;"expand"===te.brace_style?e||d():e||(K.inline_frame?W.space_before_token=!0:x(K.mode)&&te.keep_array_indentation?(te.keep_array_indentation=!1,d(),te.keep_array_indentation=!0):d()),_(),m()}function F(){if("TK_RESERVED"===z.type)if(e(z.text,["set","get"])&&K.mode!==c.ObjectLiteral)z.type="TK_WORD";else if(e(z.text,["as","from"])&&!K.import_block)z.type="TK_WORD";else if(K.mode===c.ObjectLiteral){var t=D(1);":"==t.text&&(z.type="TK_WORD")}if(E()||!z.wanted_newline||b(K.mode)||"TK_OPERATOR"===q&&"--"!==K.last_text&&"++"!==K.last_text||"TK_EQUALS"===q||!te.preserve_newlines&&"TK_RESERVED"===q&&e(K.last_text,["var","let","const","set","get"])||d(),K.do_block&&!K.do_while){if("TK_RESERVED"===z.type&&"while"===z.text)return W.space_before_token=!0,m(),W.space_before_token=!0,void(K.do_while=!0);d(),K.do_block=!1}if(K.if_block)if(K.else_block||"TK_RESERVED"!==z.type||"else"!==z.text){for(;K.mode===c.Statement;)_();K.if_block=!1,K.else_block=!1}else K.else_block=!0;if("TK_RESERVED"===z.type&&("case"===z.text||"default"===z.text&&K.in_case_statement))return d(),(K.case_body||te.jslint_happy)&&(v(),K.case_body=!1),m(),K.in_case=!0,void(K.in_case_statement=!0);if("TK_RESERVED"===z.type&&"function"===z.text&&((e(K.last_text,["}",";"])||W.just_added_newline()&&!e(K.last_text,["[","{",":","=",","]))&&(W.just_added_blankline()||z.comments_before.length||(d(),d(!0))),"TK_RESERVED"===q||"TK_WORD"===q?"TK_RESERVED"===q&&e(K.last_text,["get","set","new","return","export","async"])?W.space_before_token=!0:"TK_RESERVED"===q&&"default"===K.last_text&&"export"===$?W.space_before_token=!0:d():"TK_OPERATOR"===q||"="===K.last_text?W.space_before_token=!0:(K.multiline_frame||!b(K.mode)&&!x(K.mode))&&d()),"TK_COMMA"!==q&&"TK_START_EXPR"!==q&&"TK_EQUALS"!==q&&"TK_OPERATOR"!==q||w()||f(),"TK_RESERVED"===z.type&&e(z.text,["function","get","set"]))return m(),void(K.last_word=z.text);if(Z="NONE","TK_END_BLOCK"===q?"TK_RESERVED"===z.type&&e(z.text,["else","catch","finally","from"])?"expand"===te.brace_style||"end-expand"===te.brace_style||"none"===te.brace_style&&z.wanted_newline?Z="NEWLINE":(Z="SPACE",W.space_before_token=!0):Z="NEWLINE":"TK_SEMICOLON"===q&&K.mode===c.BlockStatement?Z="NEWLINE":"TK_SEMICOLON"===q&&b(K.mode)?Z="SPACE":"TK_STRING"===q?Z="NEWLINE":"TK_RESERVED"===q||"TK_WORD"===q||"*"===K.last_text&&"function"===$?Z="SPACE":"TK_START_BLOCK"===q?Z=K.inline_frame?"SPACE":"NEWLINE":"TK_END_EXPR"===q&&(W.space_before_token=!0,Z="NEWLINE"),"TK_RESERVED"===z.type&&e(z.text,H.line_starters)&&")"!==K.last_text&&(Z="else"===K.last_text||"export"===K.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===z.type&&e(z.text,["else","catch","finally"]))if("TK_END_BLOCK"!==q||J.mode!==c.BlockStatement||"expand"===te.brace_style||"end-expand"===te.brace_style||"none"===te.brace_style&&z.wanted_newline)d();else{W.trim(!0);var n=W.current_line;"}"!==n.last()&&d(),W.space_before_token=!0}else"NEWLINE"===Z?"TK_RESERVED"===q&&T(K.last_text)?W.space_before_token=!0:"TK_END_EXPR"!==q?"TK_START_EXPR"===q&&"TK_RESERVED"===z.type&&e(z.text,["var","let","const"])||":"===K.last_text||("TK_RESERVED"===z.type&&"if"===z.text&&"else"===K.last_text?W.space_before_token=!0:d()):"TK_RESERVED"===z.type&&e(z.text,H.line_starters)&&")"!==K.last_text&&d():K.multiline_frame&&x(K.mode)&&","===K.last_text&&"}"===$?d():"SPACE"===Z&&(W.space_before_token=!0);m(),K.last_word=z.text,"TK_RESERVED"===z.type&&("do"===z.text?K.do_block=!0:"if"===z.text?K.if_block=!0:"import"===z.text?K.import_block=!0:K.import_block&&"TK_RESERVED"===z.type&&"from"===z.text&&(K.import_block=!1))}function O(){for(E()&&(W.space_before_token=!1);K.mode===c.Statement&&!K.if_block&&!K.do_block;)_();K.import_block&&(K.import_block=!1),m()}function N(){E()?W.space_before_token=!0:"TK_RESERVED"===q||"TK_WORD"===q||K.inline_frame?W.space_before_token=!0:"TK_COMMA"===q||"TK_START_EXPR"===q||"TK_EQUALS"===q||"TK_OPERATOR"===q?w()||f():d(),m()}function j(){E(),K.declaration_statement&&(K.declaration_assignment=!0),W.space_before_token=!0,m(),W.space_before_token=!0}function R(){m(),W.space_before_token=!0,K.declaration_statement?(b(K.parent.mode)&&(K.declaration_assignment=!1),K.declaration_assignment?(K.declaration_assignment=!1,d(!1,!0)):te.comma_first&&f()):K.mode===c.ObjectLiteral||K.mode===c.Statement&&K.parent.mode===c.ObjectLiteral?(K.mode===c.Statement&&_(),K.inline_frame||d()):te.comma_first&&f()}function L(){if(E(),"TK_RESERVED"===q&&T(K.last_text))return W.space_before_token=!0,void m();if("*"===z.text&&"TK_DOT"===q)return void m();if(":"===z.text&&K.in_case)return K.case_body=!0,g(),m(),d(),void(K.in_case=!1);if("::"===z.text)return void m();"TK_OPERATOR"===q&&f();var t=!0,n=!0;e(z.text,["--","++","!","~"])||e(z.text,["-","+"])&&(e(q,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||e(K.last_text,H.line_starters)||","===K.last_text)?(t=!1,n=!1,!z.wanted_newline||"--"!==z.text&&"++"!==z.text||d(!1,!0),";"===K.last_text&&b(K.mode)&&(t=!0),"TK_RESERVED"===q?t=!0:"TK_END_EXPR"===q?t=!("]"===K.last_text&&("--"===z.text||"++"===z.text)):"TK_OPERATOR"===q&&(t=e(z.text,["--","-","++","+"])&&e(K.last_text,["--","-","++","+"]),e(z.text,["+","-"])&&e(K.last_text,["--","++"])&&(n=!0)),(K.mode!==c.BlockStatement||K.inline_frame)&&K.mode!==c.Statement||"{"!==K.last_text&&";"!==K.last_text||d()):":"===z.text?0===K.ternary_depth?t=!1:K.ternary_depth-=1:"?"===z.text?K.ternary_depth+=1:"*"===z.text&&"TK_RESERVED"===q&&"function"===K.last_text&&(t=!1,n=!1),W.space_before_token=W.space_before_token||t,m(),W.space_before_token=n}function M(){if(W.raw)return W.add_raw_token(z),void(z.directives&&"end"===z.directives.preserve&&(te.test_output_raw||(W.raw=!1)));if(z.directives)return d(!1,!0),m(),"start"===z.directives.preserve&&(W.raw=!0),void d(!1,!0);if(!u.newline.test(z.text)&&!z.wanted_newline)return W.space_before_token=!0,m(),void(W.space_before_token=!0);var e,t=p(z.text),r=!1,i=!1,o=z.whitespace_before,a=o.length;for(d(!1,!0),t.length>1&&(S(t.slice(1),"*")?r=!0:C(t.slice(1),o)&&(i=!0)),m(t[0]),e=1;ea?m(t[e].substring(a)):W.add_token(t[e]);d(!1,!0)}function B(){z.wanted_newline?d(!1,!0):W.trim(!0),W.space_before_token=!0,m(),d(!1,!0)}function U(){E(),"TK_RESERVED"===q&&T(K.last_text)?W.space_before_token=!0:f(")"===K.last_text&&te.break_chained_methods),m()}function V(){m(),"\n"===z.text[z.text.length-1]&&d()}function G(){for(;K.mode===c.Statement;)_()}var W,Q,H,z,q,$,X,K,J,Y,Z,ee,te,ne=[],re="";for(ee={TK_START_EXPR:A,TK_END_EXPR:P,TK_START_BLOCK:k,TK_END_BLOCK:I,TK_WORD:F,TK_RESERVED:F,TK_SEMICOLON:O,TK_STRING:N,TK_EQUALS:j,TK_OPERATOR:L,TK_COMMA:R,TK_BLOCK_COMMENT:M,TK_COMMENT:B,TK_DOT:U,TK_UNKNOWN:V,TK_EOF:G},i=i?i:{},te={},void 0!==i.braces_on_own_line&&(te.brace_style=i.braces_on_own_line?"expand":"collapse"),te.brace_style=i.brace_style?i.brace_style:te.brace_style?te.brace_style:"collapse","expand-strict"===te.brace_style&&(te.brace_style="expand"),te.indent_size=i.indent_size?parseInt(i.indent_size,10):4,te.indent_char=i.indent_char?i.indent_char:" ",te.eol=i.eol?i.eol:"auto",te.preserve_newlines=void 0===i.preserve_newlines||i.preserve_newlines,te.break_chained_methods=void 0!==i.break_chained_methods&&i.break_chained_methods,te.max_preserve_newlines=void 0===i.max_preserve_newlines?0:parseInt(i.max_preserve_newlines,10),te.space_in_paren=void 0!==i.space_in_paren&&i.space_in_paren,te.space_in_empty_paren=void 0!==i.space_in_empty_paren&&i.space_in_empty_paren,te.jslint_happy=void 0!==i.jslint_happy&&i.jslint_happy,te.space_after_anon_function=void 0!==i.space_after_anon_function&&i.space_after_anon_function,te.keep_array_indentation=void 0!==i.keep_array_indentation&&i.keep_array_indentation,te.space_before_conditional=void 0===i.space_before_conditional||i.space_before_conditional,te.unescape_strings=void 0!==i.unescape_strings&&i.unescape_strings,te.wrap_line_length=void 0===i.wrap_line_length?0:parseInt(i.wrap_line_length,10),te.e4x=void 0!==i.e4x&&i.e4x,te.end_with_newline=void 0!==i.end_with_newline&&i.end_with_newline,te.comma_first=void 0!==i.comma_first&&i.comma_first,te.test_output_raw=void 0!==i.test_output_raw&&i.test_output_raw,te.jslint_happy&&(te.space_after_anon_function=!0),i.indent_with_tabs&&(te.indent_char="\t",te.indent_size=1),"auto"===te.eol&&(te.eol="\n",r&&u.lineBreak.test(r||"")&&(te.eol=r.match(u.lineBreak)[0])),te.eol=te.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),X="";te.indent_size>0;)X+=te.indent_char,te.indent_size-=1;var ie=0;if(r&&r.length){for(;" "===r.charAt(ie)||"\t"===r.charAt(ie);)re+=r.charAt(ie),ie+=1;r=r.substring(ie)}q="TK_START_BLOCK",$="",W=new a(X,re),W.raw=te.test_output_raw,Y=[],y(c.BlockStatement),this.beautify=function(){var e,t;for(H=new s(r,te,X),ne=H.tokenize(),Q=0;e=D();){for(var n=0;n0&&(n-=1,t-=e.indent_length)},this.trim=function(){for(;" "===this.last();){r.pop();t-=1}i=0===r.length},this.toString=function(){var t="";return this._empty||(n>=0&&(t=e.indent_cache[n]),t+=r.join("")),t}}function a(e,t){t=t||"",this.indent_cache=[t],this.baseIndentLength=t.length,this.indent_length=e.length,this.raw=!1;var n=[];this.baseIndentString=t,this.indent_string=e,this.previous_line=null,this.current_line=null,this.space_before_token=!1,this.add_outputline=function(){this.previous_line=this.current_line,this.current_line=new o(this),n.push(this.current_line)},this.add_outputline(),this.get_line_number=function(){return n.length},this.add_new_line=function(e){return(1!==this.get_line_number()||!this.just_added_newline())&&(!(!e&&this.just_added_newline())&&(this.raw||this.add_outputline(),!0))},this.get_code=function(){var e=n.join("\n").replace(/[\r\n\t ]+$/,"");return e},this.set_indent=function(e){if(n.length>1){for(;e>=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(e),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(e){for(var t=0;t1&&this.current_line.is_empty();)n.pop(),this.current_line=n[n.length-1],this.current_line.trim();this.previous_line=n.length>1?n[n.length-2]:null},this.just_added_newline=function(){return this.current_line.is_empty()},this.just_added_blankline=function(){if(this.just_added_newline()){if(1===n.length)return!0;var e=n[n.length-2];return e.is_empty()}return!1}}function s(n,r,i){function o(e){if(!e.match(C))return null;var t={};T.lastIndex=0;for(var n=T.exec(e);n;)t[n[1]]=n[2],n=T.exec(e);return t}function a(){var i,a=[];if(g=0,v="",b>=_)return["","TK_EOF"];var C;C=x.length?x[x.length-1]:new l("TK_START_BLOCK","{");var T=n.charAt(b);for(b+=1;e(T,c);){if(u.newline.test(T)?"\n"===T&&"\r"===n.charAt(b-2)||(g+=1,a=[]):a.push(T),b>=_)return["","TK_EOF"];T=n.charAt(b),b+=1}if(a.length&&(v=a.join("")),p.test(T)||"."===T&&p.test(n.charAt(b))){var P=!0,k=!0,I=p;for("0"===T&&b<_&&/[XxOoBb]/.test(n.charAt(b))?(P=!1,k=!1,I=/[Bb]/.test(n.charAt(b))?f:/[Oo]/.test(n.charAt(b))?d:h,T+=n.charAt(b),b+=1):"."===T?P=!1:(T="",b-=1);b<_&&I.test(n.charAt(b));)T+=n.charAt(b),b+=1,P&&b<_&&"."===n.charAt(b)?(T+=n.charAt(b),b+=1,P=!1):k&&b<_&&/[Ee]/.test(n.charAt(b))&&(T+=n.charAt(b),b+=1,b<_&&/[+-]/.test(n.charAt(b))&&(T+=n.charAt(b),b+=1),k=!1,P=!1);return[T,"TK_WORD"]}if(u.isIdentifierStart(n.charCodeAt(b-1))){if(b<_)for(;u.isIdentifierChar(n.charCodeAt(b))&&(T+=n.charAt(b),b+=1,b!==_););return"TK_DOT"===C.type||"TK_RESERVED"===C.type&&e(C.text,["set","get"])||!e(T,w)?[T,"TK_WORD"]:"in"===T?[T,"TK_OPERATOR"]:[T,"TK_RESERVED"]}if("("===T||"["===T)return[T,"TK_START_EXPR"];if(")"===T||"]"===T)return[T,"TK_END_EXPR"];if("{"===T)return[T,"TK_START_BLOCK"];if("}"===T)return[T,"TK_END_BLOCK"];if(";"===T)return[T,"TK_SEMICOLON"];if("/"===T){var F="";if("*"===n.charAt(b)){b+=1,E.lastIndex=b;var O=E.exec(n);F="/*"+O[0],b+=O[0].length;var N=o(F);return N&&"start"===N.ignore&&(D.lastIndex=b,O=D.exec(n),F+=O[0],b+=O[0].length),F=F.replace(u.allLineBreaks,"\n"),[F,"TK_BLOCK_COMMENT",N]}if("/"===n.charAt(b)){b+=1,S.lastIndex=b;var O=S.exec(n);return F="//"+O[0],b+=O[0].length,[F,"TK_COMMENT"]}}var j=/^<([-a-zA-Z:0-9_.]+|{.+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{.+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.+?}))*\s*(\/?)\s*>/;if("`"===T||"'"===T||'"'===T||("/"===T||r.e4x&&"<"===T&&n.slice(b-1).match(j))&&("TK_RESERVED"===C.type&&e(C.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===C.type&&")"===C.text&&C.parent&&"TK_RESERVED"===C.parent.type&&e(C.parent.text,["if","while","for"])||e(C.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var R=T,L=!1,M=!1;if(i=T,"/"===R)for(var B=!1;b<_&&(L||B||n.charAt(b)!==R)&&!u.newline.test(n.charAt(b));)i+=n.charAt(b),L?L=!1:(L="\\"===n.charAt(b),"["===n.charAt(b)?B=!0:"]"===n.charAt(b)&&(B=!1)),b+=1;else if(r.e4x&&"<"===R){var U=/<(\/?)([-a-zA-Z:0-9_.]+|{.+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{.+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.+?}))*\s*(\/?)\s*>/g,V=n.slice(b-1),G=U.exec(V);if(G&&0===G.index){for(var W=G[2],Q=0;G;){var H=!!G[1],z=G[2],q=!!G[G.length-1]||"![CDATA["===z.slice(0,8);if(z!==W||q||(H?--Q:++Q),Q<=0)break;G=U.exec(V)}var $=G?G.index+G[0].length:V.length;return V=V.slice(0,$),b+=$-1,V=V.replace(u.allLineBreaks,"\n"),[V,"TK_STRING"]}}else{var X=function(e,t,r){for(var o;b<_&&(o=n.charAt(b),L||o!==e&&(t||!u.newline.test(o)));)(L||t)&&u.newline.test(o)?("\r"===o&&"\n"===n.charAt(b+1)&&(b+=1,o=n.charAt(b)),i+="\n"):i+=o,L?("x"!==o&&"u"!==o||(M=!0),L=!1):L="\\"===o,b+=1,r&&i.indexOf(r,i.length-r.length)!==-1&&("`"===e?X("}",t,"`"):X("`",t,"${"))};"`"===R?X("`",!0,"${"):X(R)}if(M&&r.unescape_strings&&(i=s(i)),b<_&&n.charAt(b)===R&&(i+=R,b+=1,"/"===R))for(;b<_&&u.isIdentifierStart(n.charCodeAt(b));)i+=n.charAt(b),b+=1;return[i,"TK_STRING"]}if("#"===T){if(0===x.length&&"!"===n.charAt(b)){for(i=T;b<_&&"\n"!==T;)T=n.charAt(b),i+=T,b+=1;return[t(i)+"\n","TK_UNKNOWN"]}var K="#";if(b<_&&p.test(n.charAt(b))){do T=n.charAt(b),K+=T,b+=1;while(b<_&&"#"!==T&&"="!==T);return"#"===T||("["===n.charAt(b)&&"]"===n.charAt(b+1)?(K+="[]",b+=2):"{"===n.charAt(b)&&"}"===n.charAt(b+1)&&(K+="{}",b+=2)),[K,"TK_WORD"]}}if("<"===T&&("?"===n.charAt(b)||"%"===n.charAt(b))){A.lastIndex=b-1;var J=A.exec(n);if(J)return T=J[0],b+=T.length-1,T=T.replace(u.allLineBreaks,"\n"),[T,"TK_STRING"]}if("<"===T&&""===n.substring(b-1,b+2))return y=!1,b+=2,["-->","TK_COMMENT"];if("."===T)return[T,"TK_DOT"];if(e(T,m)){for(;b<_&&e(T+n.charAt(b),m)&&(T+=n.charAt(b),b+=1,!(b>=_)););return","===T?[T,"TK_COMMA"]:"="===T?[T,"TK_EQUALS"]:[T,"TK_OPERATOR"]}return[T,"TK_UNKNOWN"]}function s(e){for(var t,n=!1,r="",i=0,o="",a=0;n||i=0&&a<32){r+="x"===t?"\\x"+o:"\\u"+o;continue}if(34===a||39===a||92===a)r+="\\"+String.fromCharCode(a);else{if("x"===t&&a>126&&a<=255)return e;r+=String.fromCharCode(a)}}else"\\"===t?n=!0:r+=t;return r}var c="\n\r\t ".split(""),p=/[0-9]/,f=/[01]/,d=/[01234567]/,h=/[0123456789abcdefABCDEF]/,m="+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: => **".split(" ");this.line_starters="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var g,v,y,x,b,_,w=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await","from","as"]),E=/([\s\S]*?)((?:\*\/)|$)/g,S=/([^\n\r\u2028\u2029]*)/g,C=/\/\* beautify( \w+[:]\w+)+ \*\//g,T=/ (\w+)[:](\w+)/g,D=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,A=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;this.tokenize=function(){_=n.length,b=0,y=!1,x=[];for(var e,t,r,i=null,o=[],s=[];!t||"TK_EOF"!==t.type;){for(r=a(),e=new l(r[1],r[0],g,v);"TK_COMMENT"===e.type||"TK_BLOCK_COMMENT"===e.type||"TK_UNKNOWN"===e.type;)"TK_BLOCK_COMMENT"===e.type&&(e.directives=r[2]),s.push(e),r=a(),e=new l(r[1],r[0],g,v);s.length&&(e.comments_before=s,s=[]),"TK_START_BLOCK"===e.type||"TK_START_EXPR"===e.type?(e.parent=t,o.push(i),i=e):("TK_END_BLOCK"===e.type||"TK_END_EXPR"===e.type)&&i&&("]"===e.text&&"["===i.text||")"===e.text&&"("===i.text||"}"===e.text&&"{"===i.text)&&(e.parent=i.parent,e.opened=i,i=o.pop()),x.push(e),t=e}return x}}var u={};!function(e){var t="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",n="̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_",r=new RegExp("["+t+"]"),i=new RegExp("["+t+n+"]"),o=(e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=/\r\n|[\n\r\u2028\u2029]/);e.allLineBreaks=new RegExp(o.source,"g"),e.isIdentifierStart=function(e){return e<65?36===e||64===e:e<91||(e<97?95===e:e<123||e>=170&&r.test(String.fromCharCode(e)))},e.isIdentifierChar=function(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||e>=170&&i.test(String.fromCharCode(e))))}}(u);var c={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"},l=function(e,t,n,r,i,o){this.type=e,this.text=t,this.comments_before=[],this.newlines=n||0,this.wanted_newline=n>0,this.whitespace_before=r||"",this.parent=null,this.opened=null,this.directives=null};"function"==typeof define&&define.amd?define("sap/watt/lib/beautifiers/js/beautify",[],function(){return{js_beautify:r}}):"undefined"!=typeof exports?exports.js_beautify=r:"undefined"!=typeof window?window.js_beautify=r:"undefined"!=typeof global&&(global.js_beautify=r)}(),define("sap.watt.toolsets.javascript/configurations/beautifyConfig",[],function(){return[{id:"keep_array_indentation",text:"dlg_keep_array_indentation",type:"boolean",value:!1},{id:"break_chained_methods",text:"dlg_break_chained_methods",type:"boolean",value:!1},{id:"space_before_conditional",text:"dlg_space_before_conditional",type:"boolean",value:!0},{id:"unescape_strings",text:"dlg_unescape_strings",type:"boolean",value:!1},{id:"tab_size",type:"array",text:"dlg_tab_size",value:"1",items:[{value:"1",text:"a Tab"},{value:"2",text:"2 Spaces"},{value:"3",text:"3 Spaces"},{value:"4",text:"4 Spaces"},{value:"8",text:"8 Spaces"}]},{id:"max_preserve_newlines",type:"array",text:"dlg_max_preserve_newlines",value:"2",items:[{value:"-1",text:"No New Lines"},{value:"1",text:"1 New Line"},{value:"2",text:"2 New Lines"},{value:"5",text:"5 New Lines"},{value:"10",text:"10 New Lines"},{value:"0",text:"Unlimited New Lines"}]},{id:"wrap_line_length",type:"array",text:"dlg_wrap_line_length",value:"140",items:[{value:"0",text:"Do not wrap lines"},{value:"40",text:"near 40 characters"},{value:"70",text:"near 70 characters"},{value:"80",text:"near 80 characters"},{value:"110",text:"near 110 characters"},{value:"120",text:"near 120 characters"},{value:"140",text:"near 140 characters"}]},{id:"brace_style",type:"array",text:"dlg_brace_style",value:"collapse",items:[{value:"collapse",text:"Braces with control statement"},{value:"expand",text:"Braces on own line"},{value:"end-expand",text:"End braces on own line"}]}]}),define("sap.watt.toolsets.javascript/service/JSBeautifierImpl",["sap/watt/lib/beautifiers/js/beautify","sap.watt.toolsets.javascript/configurations/beautifyConfig"],function(e,t){"use strict";var n=function(){};return n.prototype._oOptions={indent_size:1,indent_char:"\t",indent_level:0,indent_with_tabs:!0,preserve_newlines:!0,max_preserve_newlines:2,jslint_happy:!1,brace_style:"collapse",keep_array_indentation:!1,keep_function_indentation:!0,space_before_conditional:!0,break_chained_methods:!1,eval_code:!1,unescape_strings:!1,wrap_line_length:140},n.prototype.configure=function(e){this.context.service.resource.includeStyles([{uri:"sap.watt.toolsets.javascript/css/beautifierSettings.css"}]).done(),this._oSettings=t,this._oOriginalSettings=this._cloneSetting(this._oSettings)},n.prototype.beautify=function(t,n,r){return this.upacker&&(t=this.unpacker_filter(t)),this.getOptions().then(function(n){var r=e.js_beautify(t,n);return r})},n.prototype.beautifyJS=function(){return this.beautify.apply(this,arguments)},n.prototype.getOptions=function(){var e=this.context.service.setting.project,t=this;return t.hasError=!1,e.get(this.context.service.beautifier).then(function(e){return e?t._updateOptionBySetting(e):t._oOptions}).fail(function(e){return t.hasError=!0,t._oOptions})},n.prototype.getSettings=function(){var e=this.context.service.setting.project,t=this;return t.hasError=!1,e.get(this.context.service.beautifier).then(function(e){if(e){for(var n in e)if(e.hasOwnProperty(n))for(var r=0;r-1},_findExternalReferencesStart:function(e,a){var s=this,u=this.context.i18n,c=this.context.service.filesystem.documentProvider,l=t.parse(e.buffer),p=this.context.service.indexmanager;return p.getDependentModules(e.targetFile).then(function(t){var f=[p.getDependentIndexes(e.targetFile,l),p.getUI5ProjectInfo(e.targetFile)];return Q.spread(f,function(p,f){var d=new n.OrionIndexer(p,e.targetFile,f);return o(e.buffer,e.targetFile,d,e.offset,l).then(function(o){function p(t){var a=v?i(l,e.targetFile,o.localIdentifier):r(c,t,new n.OrionIndexer(d,t,f),h,u);return v&&(m.context.nEnd-=1,v=!1),a.then(function(e){return e.iMatches>0&&(m.aFileEntries.push(e),m.numFound+=e.iMatches,g-=1),m.context.nEnd+=1,y.length>0&&g>0?p(y.shift()):Q(m)}).catch(function(e){return s.context.service.log.error("JSFindReferencesImpl","Failed to find "+e.message,["user"]).done(),y.shift(),y.length>0&&g>0?p(y.shift()):Q(m)})}var d={module:{},global:{}};"AMD"===o.kind?d.module[e.targetFile]={provided:o.provided,types:o.types}:d.global[e.targetFile]={provided:o.provided,types:o.types,module:o.module};var h={refModule:e.targetFile,refModuleId:o.module, refProperty:o.selectedProperty},m={numFound:0,aFileEntries:[]};if(m.context={targetFile:e.targetFile,content:e.buffer,offset:e.offset,depModules:t,nStart:0,nEnd:0,nRows:a,depJson:d,findRef:h,projectInfo:f,providerType:e.providerType},!o.selectedProperty&&!o.localIdentifier)return m;var g=a,v=!1,y=t.slice();return o.localIdentifier&&(y.unshift(e.targetFile),h.localIdentifier=o.localIdentifier,v=!0),p(y.shift())})}).fail(function(e){return console.warn(e),Q()})})},_findExternalReferencesNext:function(e){function t(p){var f=r(s,p,new n.OrionIndexer(e.depJson,p,e.projectInfo),a,o);return f.then(function(n){return n.iMatches>0&&(u.aFileEntries.push(n),u.numFound+=n.iMatches,c-=1),e.nEnd+=1,l.length>0&&c>0?t(l.shift()):Q(u)}).catch(function(e){return i.context.service.log.error("JSFindReferencesImpl",e,["user"]).done(),l.shift(),l.length>0&&c>0?t(l.shift()):Q(u)})}var i=this,o=this.context.i18n,a=e.findRef,s=this.context.service.filesystem.documentProvider,u={numFound:0,aFileEntries:[]},c=e.nRows,l=e.depModules.slice(e.nEnd);return t(l.shift())},_findExternalReferencesRefresh:function(e){var a=this,s=this.context.i18n,u=this.context.service.filesystem.documentProvider,c=this.context.service.indexmanager,l=t.parse(e.content);return c.getDependentModules(e.targetFile).then(function(t){return c.getDependentIndexes(e.targetFile,l).then(function(c){var p=new n.OrionIndexer(c,e.targetFile,e.projectInfo);return o(e.content,e.targetFile,p,e.offset,l).then(function(o){function c(t){var v=m?i(l,e.targetFile,o.localIdentifier):r(u,t,new n.OrionIndexer(p,t,e.projectInfo),f,s);return m&&(e.nEnd-=1,m=!1),v.then(function(t){return t.iMatches>0&&(d.aFileEntries.push(t),d.numFound+=t.iMatches,h-=1),e.nEnd+=1,g.length>0&&h>0?c(g.shift()):Q(d)}).catch(function(e){return a.context.service.log.error("JSFindReferencesImpl","Infer Error "+e,["user"]).done(),g.shift(),g.length>0&&h>0?c(g.shift()):Q(d)})}var p={module:{},global:{}};"AMD"===o.kind?p.module[e.targetFile]={provided:o.provided,types:o.types}:p.global[e.targetFile]={provided:o.provided,types:o.types,module:o.module},e.depModules=t;var f=e.findRef={refModule:e.targetFile,refModuleId:o.module,refProperty:o.selectedProperty},d={numFound:0,aFileEntries:[]};if(!o.selectedProperty&&!o.localIdentifier)return d;var h=e.nRows,m=!1,g=e.depModules.slice();return o.localIdentifier&&(g.unshift(e.targetFile),f.localIdentifier=o.localIdentifier,m=!0),c(g.shift())})})})},findByContext:function(e,t){var n=this.context.i18n,r=this.context.service.filesystem.documentProvider;if(!e&&!t)return this.context.service.log.info("JSFindReferencesImpl",n.getText("i18n","message_invalidargument",["JSFindReferencesImpl","findExternalReferences"]),["user"]).done(),Q();var i;if(e&&0===t.nStart&&!t.findRef)i=this._findExternalReferencesStart(e,t.nRows);else if(e||0!==t.nStart||t.findRef){if(e)return Q();i=this._findExternalReferencesNext(t)}else i=this._findExternalReferencesRefresh(t);return i.then(function(e){for(var t=[],n=0;n1)for(var n=1;n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(t)?r.showHidden=t:t&&n._extend(r,t),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,t,r){if(e.customInspect&&t&&T(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return x(i)||(i=u(e,i,r)),i}var o=c(e,t);if(o)return o;var a=Object.keys(t),m=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),C(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(t);if(0===a.length){if(T(t)){var g=t.name?": "+t.name:"";return e.stylize("[Function"+g+"]","special")}if(w(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(S(t))return e.stylize(Date.prototype.toString.call(t),"date");if(C(t))return l(t)}var v="",y=!1,b=["{","}"];if(h(t)&&(y=!0,b=["[","]"]),T(t)){var _=t.name?": "+t.name:"";v=" [Function"+_+"]"}if(w(t)&&(v=" "+RegExp.prototype.toString.call(t)),S(t)&&(v=" "+Date.prototype.toUTCString.call(t)),C(t)&&(v=" "+l(t)),0===a.length&&(!y||0==t.length))return b[0]+v+b[1];if(r<0)return w(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var E;return E=y?p(e,t,r,m,a):a.map(function(n){return f(e,t,r,m,n,y)}),e.seen.pop(),d(E,v,b)}function c(e,t){if(_(t))return e.stylize("undefined","undefined");if(x(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i){for(var o=[],a=0,s=t.length;a-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),_(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function h(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function v(e){return null==e}function y(e){return"number"==typeof e}function x(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function _(e){return void 0===e}function w(e){return E(e)&&"[object RegExp]"===A(e)}function E(e){return"object"==typeof e&&null!==e}function S(e){return E(e)&&"[object Date]"===A(e)}function C(e){return E(e)&&("[object Error]"===A(e)||e instanceof Error)}function T(e){return"function"==typeof e}function D(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function A(e){return Object.prototype.toString.call(e)}function P(e){return e<10?"0"+e.toString(10):e.toString(10)}function k(){var e=new Date,t=[P(e.getHours()),P(e.getMinutes()),P(e.getSeconds())].join(":");return[e.getDate(),j[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var F=/%[sdj%]/g;n.format=function(e){if(!x(e)){for(var t=[],n=0;n=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n 9007199254740992 || "+e+" < -9007199254740992)"},l.string=function(e){return"typeof "+e+' === "string"'};var p=function(e){for(var t=[],n=0;n1){var i=(0|e)!==e?Math.pow(10,e.toString().split(".").pop().length):1;n=i>r||Math.round(r*e)%(r*t)}else n=e%t;return!n},d=function(e,t,n,o,h){var m=h?a(s,h.formats):s,g={unique:p,formats:m,isMultipleOf:f},v=!!h&&!!h.verbose,y=!(!h||void 0===h.greedy)&&h.greedy,x={},b=function(e){return e+(x[e]=(x[e]||0)+1)},_={},w=function(e){if(_[e])return _[e];var t=b("pattern");return g[t]=new RegExp(e),_[e]=t,t},E=["i","j","k","l","m","n","o","p","q","r","s","t","u","v","x","y","z"],S=function(){var e=E.shift();return E.push(e+e[0]),e},C=function(e,i,o,a){var p=i.properties,f=i.type,x=!1;Array.isArray(i.items)&&(p={},i.items.forEach(function(e,t){p[t]=e}),f="array",x=!0);var _=0,E=function(t,n,r){T("errors++"),o===!0&&(T("if (validate.errors === null) validate.errors = []"),v?T("validate.errors.push({field:%s,message:%s,value:%s,type:%s})",c(n||e),JSON.stringify(t),r||e,JSON.stringify(f)):T("validate.errors.push({field:%s,message:%s})",c(n||e),JSON.stringify(t)))};i.required===!0?(_++,T("if (%s === undefined) {",e),E("is required"),T("} else {")):(_++,T("if (%s !== undefined) {",e));var D=[].concat(f).map(function(t){return l[t||"any"](e)}).join(" || ")||"true";if("true"!==D&&(_++,T("if (!(%s)) {",D),E("is the wrong type"),T("} else {")),x)if(i.additionalItems===!1)T("if (%s.length > %d) {",e,i.items.length),E("has additional items"),T("}");else if(i.additionalItems){var A=S();T("for (var %s = %d; %s < %s.length; %s++) {",A,i.items.length,A,e,A),C(e+"["+A+"]",i.additionalItems,o,a),T("}")}if(i.format&&m[i.format]){"string"!==f&&s[i.format]&&T("if (%s) {",l.string(e));var P=b("format");g[P]=m[i.format],"function"==typeof g[P]?T("if (!%s(%s)) {",P,e):T("if (!%s.test(%s)) {",P,e),E("must be "+i.format+" format"),T("}"),"string"!==f&&s[i.format]&&T("}")}if(Array.isArray(i.required)){var k=function(t){var n=r(e,t);T("if (%s === undefined) {",n),E("is required",n),T("missing++"),T("}")};T("if ((%s)) {","object"!==f?l.object(e):"true"),T("var missing = 0"),i.required.map(k),T("}"),y||(T("if (missing === 0) {"),_++)}if(i.uniqueItems&&("array"!==f&&T("if (%s) {",l.array(e)),T("if (!(unique(%s))) {",e),E("must be unique"),T("}"),"array"!==f&&T("}")),i.enum){var I=i.enum.some(function(e){return"object"==typeof e}),F=I?function(t){return"JSON.stringify("+e+") !== JSON.stringify("+JSON.stringify(t)+")"}:function(t){return e+" !== "+JSON.stringify(t)};T("if (%s) {",i.enum.map(F).join(" && ")||"false"),E("must be an enum value"),T("}")}if(i.dependencies&&("object"!==f&&T("if (%s) {",l.object(e)),Object.keys(i.dependencies).forEach(function(t){var n=i.dependencies[t];"string"==typeof n&&(n=[n]);var s=function(t){return r(e,t)+" !== undefined"};Array.isArray(n)&&(T("if (%s !== undefined && !(%s)) {",r(e,t),n.map(s).join(" && ")||"true"),E("dependencies not set"),T("}")),"object"==typeof n&&(T("if (%s !== undefined) {",r(e,t)),C(e,n,o,a),T("}"))}),"object"!==f&&T("}")),i.additionalProperties||i.additionalProperties===!1){"object"!==f&&T("if (%s) {",l.object(e));var A=S(),O=b("keys"),N=function(e){return O+"["+A+"] !== "+JSON.stringify(e)},j=function(e){return"!"+w(e)+".test("+O+"["+A+"])"},R=Object.keys(p||{}).map(N).concat(Object.keys(i.patternProperties||{}).map(j)).join(" && ")||"true";T("var %s = Object.keys(%s)",O,e)("for (var %s = 0; %s < %s.length; %s++) {",A,A,O,A)("if (%s) {",R),i.additionalProperties===!1?(a&&T("delete %s",e+"["+O+"["+A+"]]"),E("has additional properties",null,JSON.stringify(e+".")+" + "+O+"["+A+"]")):C(e+"["+O+"["+A+"]]",i.additionalProperties,o,a),T("}")("}"),"object"!==f&&T("}")}if(i.$ref){var L=u(n,h&&h.schemas||{},i.$ref);if(L){var M=t[i.$ref];M||(t[i.$ref]=function(e){return M(e)},M=d(L,t,n,!1,h));var P=b("ref");g[P]=M,T("if (!(%s(%s))) {",P,e),E("referenced schema does not match"),T("}")}}if(i.not){var B=b("prev");T("var %s = errors",B),C(e,i.not,!1,a),T("if (%s === errors) {",B),E("negative schema matches"),T("} else {")("errors = %s",B)("}")}if(i.items&&!x){"array"!==f&&T("if (%s) {",l.array(e));var A=S();T("for (var %s = 0; %s < %s.length; %s++) {",A,A,e,A),C(e+"["+A+"]",i.items,o,a),T("}"),"array"!==f&&T("}")}if(i.patternProperties){"object"!==f&&T("if (%s) {",l.object(e));var O=b("keys"),A=S();T("var %s = Object.keys(%s)",O,e)("for (var %s = 0; %s < %s.length; %s++) {",A,A,O,A),Object.keys(i.patternProperties).forEach(function(t){var n=w(t);T("if (%s.test(%s)) {",n,O+"["+A+"]"),C(e+"["+O+"["+A+"]]",i.patternProperties[t],o,a),T("}")}),T("}"),"object"!==f&&T("}")}if(i.pattern){var U=w(i.pattern);"string"!==f&&T("if (%s) {",l.string(e)),T("if (!(%s.test(%s))) {",U,e),E("pattern mismatch"),T("}"),"string"!==f&&T("}")}if(i.allOf&&i.allOf.forEach(function(t){C(e,t,o,a)}),i.anyOf&&i.anyOf.length){var B=b("prev");i.anyOf.forEach(function(t,n){0===n?T("var %s = errors",B):T("if (errors !== %s) {",B)("errors = %s",B),C(e,t,!1,!1)}),i.anyOf.forEach(function(e,t){t&&T("}")}),T("if (%s !== errors) {",B),E("no schemas match"),T("}")}if(i.oneOf&&i.oneOf.length){var B=b("prev"),V=b("passes");T("var %s = errors",B)("var %s = 0",V),i.oneOf.forEach(function(t,n){C(e,t,!1,!1),T("if (%s === errors) {",B)("%s++",V)("} else {")("errors = %s",B)("}")}),T("if (%s !== 1) {",V),E("no (or more than one) schemas match"),T("}")}for(void 0!==i.multipleOf&&("number"!==f&&"integer"!==f&&T("if (%s) {",l.number(e)),T("if (!isMultipleOf(%s, %d)) {",e,i.multipleOf),E("has a remainder"),T("}"),"number"!==f&&"integer"!==f&&T("}")),void 0!==i.maxProperties&&("object"!==f&&T("if (%s) {",l.object(e)),T("if (Object.keys(%s).length > %d) {",e,i.maxProperties),E("has more properties than allowed"),T("}"),"object"!==f&&T("}")),void 0!==i.minProperties&&("object"!==f&&T("if (%s) {",l.object(e)),T("if (Object.keys(%s).length < %d) {",e,i.minProperties),E("has less properties than allowed"),T("}"),"object"!==f&&T("}")),void 0!==i.maxItems&&("array"!==f&&T("if (%s) {",l.array(e)),T("if (%s.length > %d) {",e,i.maxItems),E("has more items than allowed"),T("}"),"array"!==f&&T("}")),void 0!==i.minItems&&("array"!==f&&T("if (%s) {",l.array(e)),T("if (%s.length < %d) {",e,i.minItems),E("has less items than allowed"),T("}"),"array"!==f&&T("}")),void 0!==i.maxLength&&("string"!==f&&T("if (%s) {",l.string(e)),T("if (%s.length > %d) {",e,i.maxLength),E("has longer length than allowed"),T("}"),"string"!==f&&T("}")),void 0!==i.minLength&&("string"!==f&&T("if (%s) {",l.string(e)),T("if (%s.length < %d) {",e,i.minLength),E("has less length than allowed"),T("}"),"string"!==f&&T("}")),void 0!==i.minimum&&("number"!==f&&"integer"!==f&&T("if (%s) {",l.number(e)),T("if (%s %s %d) {",e,i.exclusiveMinimum?"<=":"<",i.minimum),E("is less than minimum"),T("}"),"number"!==f&&"integer"!==f&&T("}")),void 0!==i.maximum&&("number"!==f&&"integer"!==f&&T("if (%s) {",l.number(e)),T("if (%s %s %d) {",e,i.exclusiveMaximum?">=":">",i.maximum),E("is more than maximum"),T("}"),"number"!==f&&"integer"!==f&&T("}")),p&&Object.keys(p).forEach(function(t){Array.isArray(f)&&f.indexOf("null")!==-1&&T("if (%s !== null) {",e),C(r(e,t),p[t],o,a),Array.isArray(f)&&f.indexOf("null")!==-1&&T("}")});_--;)T("}")},T=i("function validate(data) {")("if (data === undefined) data = null")("validate.errors = null")("var errors = 0");return C("data",e,o,h&&h.filter),T("return errors === 0")("}"),T=T.toFunction(g),T.errors=null,Object.defineProperty&&Object.defineProperty(T,"error",{get:function(){return T.errors?T.errors.map(function(e){return e.field+" "+e.message}).join("\n"):""}}),T.toJSON=function(){return e},T};t.exports=function(e,t){return"string"==typeof e&&(e=JSON.parse(e)),d(e,{},e,!0,t)},t.exports.filter=function(e,n){var r=t.exports(e,a(n,{filter:!0}));return function(e){return r(e),e}}},{"./formats":5,"generate-function":7,"generate-object-property":8,jsonpointer:10,xtend:11}],7:[function(e,t,n){var r=e("util"),i=/[\{\[]/,o=/[\}\]]/;t.exports=function(){var e=[],t=0,n=function(n){for(var r="";r.length<2*t;)r+=" ";e.push(r+n)},a=function(e){return e?o.test(e.trim()[0])&&i.test(e[e.length-1])?(t--,n(r.format.apply(r,arguments)),t++,a):i.test(e[e.length-1])?(n(r.format.apply(r,arguments)),t++,a):o.test(e.trim()[0])?(t--,n(r.format.apply(r,arguments)),a):(n(r.format.apply(r,arguments)),a):a};return a.toString=function(){return e.join("\n")},a.toFunction=function(e){var t="return ("+a.toString()+")",n=Object.keys(e||{}).map(function(e){return e}),r=n.map(function(t){return e[t]});return Function.apply(null,n.concat(t)).apply(null,r)},arguments.length&&a.apply(null,arguments),a}},{util:4}],8:[function(e,t,n){var r=e("is-property"),i=function(e,t){return r(t)?e+"."+t:e+"["+JSON.stringify(t)+"]"};i.valid=r,i.property=function(e){return r(e)?e:JSON.stringify(e)},t.exports=i},{"is-property":9}],9:[function(e,t,n){"use strict";function r(e){return/^[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/.test(e); }t.exports=r},{}],10:[function(e,t,n){function r(e){switch(e){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+e)}function i(e){return l.test(e)?e.replace(p,r):e}function o(e,t,n){for(var r,o,a=1,s=t.length;aa,"undefined"==typeof e[r]&&(Array.isArray(e)&&"-"===r&&(r=e.length),o&&(""!==t[a]&&t[a]<1/0||"-"===t[a]?e[r]=[]:e[r]={})),o);)e=e[r];var u=e[r];return void 0===n?delete e[r]:e[r]=n,u}function a(e){if("string"==typeof e){if(e=e.split("/"),""===e[0])return e;throw new Error("Invalid JSON pointer.")}if(Array.isArray(e))return e;throw new Error("Invalid JSON pointer.")}function s(e,t){if("object"!=typeof e)throw new Error("Invalid input object.");t=a(t);var n=t.length;if(1===n)return e;for(var r=1;rr){var o=t.lastIndexOf("[");t=t.substring(0,o-1)}else t=t.substring(0,r)}return n.fullPath!==t&&(n.fullPath=t,n.lastField=this._getSourceForInlineLinting(t)),n},_convert:function(e,t,n,r){var i=this,a="",s=o;return r.schema.getHelpURL?r.schema.getHelpURL().then(function(o){a=o;var u=r.displayName;return u?(s=u+" "+s,i._prepareReturnedIssues(e,t,n,s,a)):i._prepareReturnedIssues(e,t,n,s,a)}):this._prepareReturnedIssues(e,t,n,s,a)},_prepareReturnedIssues:function(e,t,n,r,i){for(var o,a,s,u={root:{},issues:[]},c=0;c="0"&&r<="9";)t+=r,f();if("."===r)for(t+=".";f()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,f(),"-"!==r&&"+"!==r||(t+=r,f());r>="0"&&r<="9";)t+=r,f();return e=+t,isNaN(e)?void p("Bad number"):e},h=function(){var e,t,n,i="";if('"'===r)for(;f();){if('"'===r)return f(),i;if("\\"===r)if(f(),"u"===r){for(n=0,t=0;t<4&&(e=parseInt(f(),16),isFinite(e));t+=1)n=16*n+e;i+=String.fromCharCode(n)}else{if("string"!=typeof a[r])break;i+=a[r]}else i+=r}p("Bad string")},m=function(){for(;r&&r<=" ";)f()},g=function(){switch(r){case"t":return f("t"),f("r"),f("u"),f("e"),!0;case"f":return f("f"),f("a"),f("l"),f("s"),f("e"),!1;case"n":return f("n"),f("u"),f("l"),f("l"),null}p("Unexpected '"+r+"'")},v=function(e,t,n){return{at:e,line:t,column:n}},y=function(e,t){var n=t;return"string"==typeof n&&t.indexOf(".")>-1&&(n='"'+n+'"'),e!==u?e+"."+n:n},x=function(i){var a=[];if("["===r){if(f("["),m(),"]"===r)return f("]"),a;for(;r;){if(a.push(o(y(i,a.length),v(e,t,n))),m(),"]"===r)return f("]"),a;f(","),m()}}p("Bad array")},b=function(i){var a,s={};if("{"===r){if(f("{"),m(),"}"===r)return f("}"),s;for(;r;){var u=v(e,t,n);if(a=h(),m(),f(":"),Object.hasOwnProperty.call(s,a)&&p('Duplicate key "'+a+'"'),s[a]=o(y(i,a),u),m(),"}"===r)return f("}"),s;f(","),m()}}p("Bad object")};return o=function(e,t){switch(e!==u&&(s[e]={at:t.at,line:t.line,column:t.column}),m(),r){case"{":return b(e);case"[":return x(e);case'"':return h();case"-":return d();default:return r>="0"&&r<="9"?d():g()}},function(a,c,f){var d;return i=a,l(i),e=0,t=1,n=0,r=" ",s={},m(),d=o(u,v(e,t,n)),m(),r&&p("Syntax error"),c&&c(a,d,s),"function"==typeof f?function e(t,n){var r,i,o=t[n];if(o&&"object"==typeof o)for(r in o)Object.hasOwnProperty.call(o,r)&&(i=e(o,r),void 0!==i?o[r]=i:delete o[r]);return f.call(t,n,o)}({"":d},""):d}}),define("sap.watt.toolsets.json/service/jsonValidator",["sap/watt/lib/lodash/lodash","sap.watt.toolsets.json/adopters/isMyJsonValidAdopter","sap.watt.toolsets.json/utils/json_parse"],function(e,t,n){"use strict";var r,i=5e3,o=function(e){for(var t=e.split("\n"),n=0;ni)return!0;return!1};return{_projectTypesConf:{},configure:function(e){if(r=e,e.jsonValidatorSchema&&0!==e.jsonValidatorSchema.length){e.jsonValidatorSchema.forEach(function(e){if(e){if(!e.projectType)return void this._writeToLog("project type was not supplied");if(!e.fileNames||0===e.fileNames.length)return void this._writeToLog("file names were not supplied for "+e.projectType+" project Type");if(!e.schema)return void this._writeToLog("schema was not supplied for "+e.projectType+" project Type");this._projectTypesConf[e.projectType]=this._projectTypesConf[e.projectType]||{};for(var t=0;t1){for(var n=this,r=e.length,i=0;i"3"&&(t=e._version)}return t},_getRootSchema:function(t){var r=this._getVersionHint(t);if(i[r])return Q(i[r]);var o=this,a=o._buildSchemaUrl(r,"schema.json");return n._getRemoteResource(a).then(function(t){var n=[];return t=e.cloneDeep(t),o._getRefs(t,n,r),Q.all(n).then(function(){return i[r]=t,t})})},_getPropertyVersionFromUserInput:function(e,t){if(e&&e[t])return e[t]._version},getFlatSchema:function(n){var r=this;return this._getRootSchema(n).then(function(i){var o=e.cloneDeep(i),a=o.properties;return e.each(a,function(e,i){var o=r._getPropertyVersionFromUserInput(n,i);t.getSubSchemasByVersion(e,o,i)}),o})},_getRefs:function(t,r,i){var a=this;e.each(t,function(t,s,u){if(e.isObject(t))a._getRefs(t,r,i);else if("$ref"===s){var c=a._buildSchemaUrl(i,t);o.hasOwnProperty(c)||(o[c]=n._getRemoteResource(c)),r.push(o[c].then($.proxy(function(t,n){delete t.$ref,e.merge(t,n)},this,u)))}})}}}),define("sap.watt.toolsets.json/neoApp/neoAppValidator",["sap/watt/toolsets/plugin/json/utils/getSchema"],function(e){var t=null;return{baseSchemaUrl:"sap.watt.toolsets.json/neoApp/schema/",getSchema:function(){if(t)return Q(t);var n=this.baseSchemaUrl+"neoAppSchema.json";return e._getRemoteResource(n).then(function(e){return t=e,e})},getHelpURL:function(){return"https://help.hana.ondemand.com/help/frameset.htm?aed1ffa3f3e741b3a4573c9e475aa2a4.html"}}}),define("sap.watt.toolsets.tmplintellisence/service/TmplCodeCompletionImpl",{sProjectName:"projectName",sComponentPath:"componentPath",sConnectionData:"connectionData",sConnectionDataUrl:"connectionData.url",sConnectionDataMDContent:"connectionData.metadataContent",sConnectionDataRuntimeUrl:"connectionData.runtimeUrl",sConnectionDataDest:"connectionData.destination",sConnectionDataDestPath:"connectionData.destination.path",sConnectionDataDestUrl:"connectionData.destination.url",sValue:"value",sDatasource:"datasource",sResources:"resources",sModelJson:"model.json",sHelpUrl:"",sHelpTarget:"sap.ui",init:function(){this._oFileService=this.context.service.filesystem.documentProvider,this._oJSCodeCompletionService=this.context.service.jscodecompletion,this._oXMLCodeCompletionService=this.context.service.xmlcodecompletion,this._oLogger=this.context.service.log;var e=this;this.context.service.help.getHelpUrl().then(function(t){e.sHelpUrl=t}).done()},getWordSuggestions:function(e){if(e){var t=[],n=this;n.oContentStatus=e;var r=n.oContentStatus.buffer,i=n.oContentStatus.offset,o="",a=r.substring(0,i).lastIndexOf("{{");if(a!==-1&&r.substring(a,i).lastIndexOf("\n")===-1&&r.substring(a,i).lastIndexOf(" ")===-1){var s=e.targetFile.substring(0,e.targetFile.lastIndexOf(n.sResources))+n.sModelJson;return void 0!==n.oModelJsonAsHash&&n.sPreviousModelPath===s?(n.sPreviousModelPath=s,n._extractProposalsFromModel(o,r,a,i,t)):(n.sPreviousModelPath=s,n._oFileService.getDocument(s).then(function(e){return null===e?n._handleNoModel(o,r,a,i,t):e.getContent().then(function(e){var s=JSON.parse(e);return n.oModelJsonAsHash=n._convertModelJsonObjectToHash(s),n._extractProposalsFromModel(o,r,a,i,t)})}))}if("js"===n._templateBaseType(n.oContentStatus.targetFile))return n._oJSCodeCompletionService.getWordSuggestions(n.oContentStatus);if("xml"===n._templateBaseType(n.oContentStatus.targetFile))return n._oXMLCodeCompletionService.getWordSuggestions(n.oContentStatus);var u={proposals:t};return u}},getCalculatedPrefix:function(e){var t="";e.token&&e.token.value&&(t=e.token.value.substr(0,e.cursorPosition.column-e.token.start));var n=/[^a-zA-Z_0-9\$\u00A2-\uFFFF]+/;return t.split(n).slice(-1)[0]},_onAfterDocumentChanged:function(e){var t=e.params.document.getEntity()._sParentPath+"/"+e.params.document.getEntity()._sName;this.sPreviousModelPath===t&&(this.sPreviousModelPath="",this.oModelJsonAsHash=void 0)},_handleNoModel:function(e,t,n,r,i){return this._oLogger.error("Template Code Completion","model.json file was not found",["user"]).done(),this.oModelJsonAsHash=void 0,this._extractProposalsFromModel(e,t,n,r,i)},_extractProposalsFromModel:function(e,t,n,r,i){e=t.substring(n+2,r),this._addSuggestionsFromSteps(i,e);for(var o in this.oModelJsonAsHash)if(0===o.indexOf(e)&&(o.indexOf("parameters.")!==-1||0===o.indexOf(this.sDatasource))){var a=o;if(o.indexOf("parameters")!==-1){var s=o.indexOf(".parameters."),u=o.indexOf(".",s+12);a=o.substring(0,u),a+=".value"}var c=this.oModelJsonAsHash[a.substring(0,a.length-6)+".wizard.title"],l=this.oModelJsonAsHash[a.substring(0,a.length-6)+".wizard.tooltip"],p=this.context.i18n.getText("i18n","tmplAutoComplete_model_parameter");void 0!==c&&(p+='The parameter title is "'+c+'".'),void 0!==l&&(p+='The parameter tooltip is "'+l+'".');var f=this._getSingleWordProposal(a,e);this._addSuggestion(i,f,!0,f,p,this.sHelpTarget,"1")}i.sort(function(e,t){var n=e.proposal.toLowerCase(),r=t.proposal.toLowerCase();return nr?1:0});var d={proposals:i};return d},_templateBaseType:function(e){var t=e.lastIndexOf("."),n=e.substring(0,t),r=n.substring(n.lastIndexOf(".")+1);return r},_addSuggestionsFromSteps:function(e,t){var n=[];this._addSuggestion(n,this.sComponentPath,!0,this.sComponentPath,this.context.i18n.getText("i18n","tmplAutoComplete_component_path_help_description"),this.sHelpTarget,"1"),this._addSuggestion(n,this.sConnectionData,!0,this.sConnectionData,this.context.i18n.getText("i18n","tmplAutoComplete_connection_data_help_description"),this.sHelpTarget,"1"),this._addSuggestion(n,this.sConnectionDataDest,!0,this.sConnectionDataDest,this.context.i18n.getText("i18n","tmplAutoComplete_connection_data_help_description"),this.sHelpTarget,"1"),this._addSuggestion(n,this.sConnectionDataDestPath,!0,this.sConnectionDataDestPath,this.context.i18n.getText("i18n","tmplAutoComplete_connection_data_help_description"),this.sHelpTarget,"1"),this._addSuggestion(n,this.sConnectionDataDestUrl,!0,this.sConnectionDataDestUrl,this.context.i18n.getText("i18n","tmplAutoComplete_connection_data_help_description"),this.sHelpTarget,"1"),this._addSuggestion(n,this.sConnectionDataMDContent,!0,this.sConnectionDataMDContent,this.context.i18n.getText("i18n","tmplAutoComplete_connection_data_help_description"),this.sHelpTarget,"1"),this._addSuggestion(n,this.sConnectionDataRuntimeUrl,!0,this.sConnectionDataRuntimeUrl,this.context.i18n.getText("i18n","tmplAutoComplete_connection_data_help_description"),this.sHelpTarget,"1"),this._addSuggestion(n,this.sConnectionDataUrl,!0,this.sConnectionDataUrl,this.context.i18n.getText("i18n","tmplAutoComplete_connection_data_help_description"),this.sHelpTarget,"1"),this._addSuggestion(n,this.sProjectName,!0,this.sProjectName,this.context.i18n.getText("i18n","tmplAutoComplete_project_name_help_description"),this.sHelpTarget,"1");for(var r=0;r=0&&(n=e[t],"\n"!==n&&"\r"!==n)&&/\s/.test(n);)t--;return n}function n(){}return n.prototype=new e.TemplateContentAssist,n.prototype.isValid=function(e,n,r,i){var o=t(n,r-e.length-1);return!o||"\n"===o||"\r"===o},{I18nTemplateContentAssistProvider:n}}),define("sap.watt.toolsets.i18n/service/I18nCodeCompletion",["../codecompletion/I18nTemplateContentAssist"],function(e){"use strict";return{_oTemplateContentAssistProvider:null,init:function(){return this._oTemplateContentAssistProvider=new e.I18nTemplateContentAssistProvider,this._loadTemplates()},getWordSuggestions:function(e){var t=[];return!e.isAutoHint&&this._isFileNameSupported(e)&&(t=this._oTemplateContentAssistProvider.computeTemplateProposals(e.buffer,e.offset,e)),{proposals:t}},_isFileNameSupported:function(e){var t=e.targetFile,n=t.substring(t.lastIndexOf("/")+1).toLowerCase();return"i18n.properties"===n||"messagebundle.properties"===n},_loadTemplates:function(){var e=this,t=this.context.i18n.getText("i18n","i18n_enterComment"),n=this.context.i18n.getText("i18n","i18n_enterKey"),r=this.context.i18n.getText("i18n","i18n_enterValue"),i=": ${"+t+"}\n${"+n+"} = ${"+r+"}\n\n";return this.context.service.translation.getTemplateTextTypes().then(function(t){for(var n=t.templates,r=0;r0?t.mark&&t.mark.line?n:(this._writeToLog("no error line supplied by yaml parser"),t.mark={line:1},n):(this._writeToLog("no error cause supplied by yaml parser"),!n):(this._writeToLog("failed to execute the YAML parser"),!n):(this._writeToLog("empty error object from yaml parser"),!n)},t.prototype._getParser=function(){return e},t.prototype._writeToLog=function(e){this.context.service.log.error(this.context.service.yamlValidator.getProxyMetadata().getName(),e,["user"]).done()},t.prototype.getDefaultConfiguration=function(){return{}},t.prototype.getPathToImplementationModule=function(){return""},t.prototype.getCustomRulesContent=function(){return null},t.prototype.getConfiguration=function(){return{}},t}),define("sap.watt.toolsets.java/service/LSPIntellisenseConverterJAVAImpl",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{MODULE_KIND:9,configure:function(){},convertToIntellisenseFormat:function(t,n){var r=t.items,i="."===n.prefix?"":n.prefix;i=this._calculateFilterPrefixForLSPKind(i,n,r[0]),r=r.filter(function(t){return t.insertText=t.insertText?t.insertText:t.label.indexOf(" ")>-1?t.label.substring(t.label.indexOf(i),t.label.indexOf(" ")):t.label.substring(t.label.indexOf(i),t.label.length),e.startsWith(t.insertText.toLowerCase(),i.toLowerCase())});var o=e.sortBy(r,"sortText").map(function(e){return{description:e.label+(e.detail?" : "+e.detail:""),proposal:e.insertText,category:"LSP_"+e.kind,overwrite:!0}});return{prefix:"."===n.prefix?"":n.prefix,proposals:o}},_calculateFilterPrefixForLSPKind:function(t,n,r){var i=null;if(r&&r.kind===this.MODULE_KIND&&(i=e.findIndex(n.aRowTokens,n.token),i=""===t?i:i-1,i>0&&i<=n.aRowTokens.length-1))for(var o=i;o>=0&&" "!=n.aRowTokens[o].value;o--)t=n.aRowTokens[o].value+t;return t}}}),define("sap.watt.saptoolsets.fiori.common.welcomescreenimpl/command/ImportFromWelcomePage",[],function(){"use strict";return{execute:function(){this.context.service.import.getImportDialog().then(function(e){e.open()}).done()}}}),define("sap/watt/ideplatform/plugin/welcomescreen/ui/controls/BasicWelcomeContainer",[],function(){"use strict";sap.ui.commons.Panel.extend("sap.watt.ideplatform.plugin.welcomescreen.ui.controls.BasicWelcomeContainer",{renderer:{}})}),define("sap.watt.saptoolsets.fiori.common.welcomescreenimpl/ui/WelcomeContainer",["sap/watt/ideplatform/plugin/welcomescreen/ui/controls/BasicWelcomeContainer"],function(){"use strict";var e=function(){var e=this,t=new sap.watt.ideplatform.plugin.welcomescreen.ui.controls.BasicWelcomeContainer("welcomeContainer",{borderDesign:sap.ui.commons.enums.BorderDesign.None,showCollapseIcon:!1,title:new sap.ui.core.Title({text:"",level:sap.ui.core.TitleLevel.H3})});t.setLayoutData(new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}));var n=new sap.ui.commons.Label({wrapping:!0,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0})}).addStyleClass("welcomeContentLabel");t.addContent(n);var r=new sap.ui.commons.Link({text:e.context.i18n.getText("i18n","welcomeContainer_newVersionLink"),href:"https://help.sap.com/viewer/825270ffffe74d9f988a0f0066ad59f0/CF/en-US",target:"_blank",press:function(){e.context.service.usagemonitoring.report("welcome_screen","welcomeContainer_newVersi").done()}}).addStyleClass("welcomeContentWhatsNewLink");t.addContent(r);var i=new sap.m.Text("welcomeTextId",{text:e.context.i18n.getText("i18n","welcomeContainer_containerText"),textAlign:"Left"});t.addContent(i);var o=new sap.m.Button("OpenMyWorkspaceButton",{text:e.context.i18n.getText("i18n","welcomeContainer_openMyWorkspaceButton"),icon:require.toUrl("sap.watt.saptoolsets.fiori.common.welcomescreenimpl/images/editor_button.png"),styled:!1,lite:!0,press:function(){e.context.service.usagemonitoring.report("welcome_screen","open_my_workspace").done(),e.context.service.perspective.renderPerspective("development").done()}}).addStyleClass("welcomeContentOpenMyWorkspaceButton");t.addContent(o);var a=sap.watt.getEnv("server_type");if("java"!==a&&"local_hcproxy"!==a){var s=new sap.m.Button("OpenLearningCenterButton",{text:e.context.i18n.getText("i18n","welcomeContainer_openLearningCenterButton"),icon:require.toUrl("sap.watt.saptoolsets.fiori.common.welcomescreenimpl/images/Learning_center_icon.png"),styled:!1,lite:!0,press:function(){e.context.service.perspective.renderPerspective("learning_center").done()}}).addStyleClass("welcomeContentLearningCenterButton");t.addContent(s)}return this.context.service.system.getSystemInfo().then(function(n){var r=n.sFirstName?n.sFirstName:n.sUsername;e.context.service.WelcomeScreenPersistency.getPerspectiveSettings().then(function(n){n&&n.bIsVersionUpdate===!0&&(n.bIsVersionUpdate=!1,e.context.service.WelcomeScreenPersistency.setPerspectiveSettings(n).done()),t.getTitle().setText(e.context.i18n.getText("i18n","welcomeContainer_containerTitle",[r]))}).done()}).done(),t};return{getContainer:e}}),define("sap/watt/ideplatform/plugin/welcomescreen/ui/controls/BasicWelcomeTile",[],function(){"use strict";sap.watt.includeCSS(require.toUrl("sap.watt.ideplatform.welcomescreen/ui/css/welcomescreen.css")),sap.ui.commons.Button.extend("sap.watt.ideplatform.plugin.welcomescreen.ui.controls.BasicWelcomeTile",{metadata:{properties:{title:{type:"string",multiple:!1},icon:{type:"string",multiple:!1}},aggregations:{textView:{type:"sap.ui.commons.Label",multiple:!1},iconControl:{type:"sap.ui.core.Icon",multiple:!1}}},init:function(){this.setAggregation("iconControl",new sap.ui.core.Icon({src:""})),this.setAggregation("textView",new sap.ui.commons.Label({text:"",wrapping:!0}))},setTitle:function(e){this.setAggregation("textView",new sap.ui.commons.Label({text:e,wrapping:!0,textAlign:"Center"}))},attachPress:function(e,t,n){"function"==typeof e&&void 0===n&&(n=t,t=e,e=void 0);var r=this,i=function(e){r.getEnabled()===!0&&(r.setEnabled(!1),t(e),setTimeout(function(){r.setEnabled(!0)},500))};return this.attachEvent("press",e,i,n),this},ondblclick:function(e){return e.stopImmediatePropagation(),e.preventDefault(),e.cancelBubble=!0,!1},getTitle:function(){return this.getTextView().getText()},setIcon:function(e){this.setAggregation("iconControl",new sap.ui.core.Icon({src:e,height:"100%",width:"100%",useIconTooltip:!1}))},getIcon:function(){return this.getIconControl().getSrc()},renderer:function(e,t){e.write(""),e.write(""),e.renderControl(t.getIconControl()),e.write("
"),e.write(""),e.renderControl(t.getTextView()),e.write("
")}})}),define("sap.watt.saptoolsets.fiori.common.welcomescreenimpl/ui/VideoContainer",["sap/watt/ideplatform/plugin/welcomescreen/ui/controls/BasicWelcomeContainer","sap/watt/ideplatform/plugin/welcomescreen/ui/controls/BasicWelcomeTile"],function(){"use strict";var e=function(){var e=this,t=new sap.watt.ideplatform.plugin.welcomescreen.ui.controls.BasicWelcomeContainer("videoContainer",{borderDesign:sap.ui.commons.enums.BorderDesign.None,showCollapseIcon:!1,title:new sap.ui.core.Title({text:e.context.i18n.getText("i18n","videoContainer_containerTitle"),level:sap.ui.core.TitleLevel.H3})});t.setLayoutData(new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0})),this.context.service.WelcomeScreenPersistency.getPerspectiveSettings().then(function(n){if(n&&n.oVersionUpdate){var r=n.oVersionUpdate.from,i=n.oVersionUpdate.to,o=new sap.ui.commons.Label({text:e.context.i18n.getText("i18n","videoContainer_newVersionLabel"),wrapping:!0,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0})}).addStyleClass("welcomeContentNewUpdate");r&&""!==r?e.context.service.Version.compareVersions(i,r).then(function(e){e>0&&t.addContent(o)}).done():t.addContent(o)}}).done();var n=jQuery.sap.getModulePath("sap.watt.saptoolsets.fiori.common.plugin.welcomescreenimpl.WhatsNewVideo",".html"),r=new sap.ui.core.HTML("embeddedVideoHTML",{content:''});return t.addContent(r),t};return{getContainer:e}}),define("sap/watt/ideplatform/plugin/welcomescreen/ui/controls/BasicWelcomeActionContainer",["./BasicWelcomeContainer"],function(){"use strict";sap.watt.ideplatform.plugin.welcomescreen.ui.controls.BasicWelcomeContainer.extend("sap.watt.ideplatform.plugin.welcomescreen.ui.controls.BasicWelcomeActionContainer",{addButton:function(e){this.addContent(e)},renderer:{}})}),define("sap.watt.saptoolsets.fiori.common.welcomescreenimpl/ui/ImportContainer",["sap/watt/ideplatform/plugin/welcomescreen/ui/controls/BasicWelcomeActionContainer","sap/watt/ideplatform/plugin/welcomescreen/ui/controls/BasicWelcomeTile"],function(){"use strict";var e=function(){var e=this,t=new sap.watt.ideplatform.plugin.welcomescreen.ui.controls.BasicWelcomeActionContainer("importContainer",{borderDesign:sap.ui.commons.enums.BorderDesign.None,showCollapseIcon:!1,title:new sap.ui.core.Title({text:e.context.i18n.getText("i18n","importContainer_containerTitle"),level:sap.ui.core.TitleLevel.H3})});t.setLayoutData(new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}));var n=new sap.watt.ideplatform.plugin.welcomescreen.ui.controls.BasicWelcomeTile("importArchiveTile",{title:e.context.i18n.getText("i18n","importContainer_archiveTile"),icon:"sap-icon://attachment-zip-file",press:function(){e.context.service.usagemonitoring.report("welcome_screen","import_archive").done(),e.context.service.import.openImportUI().then(function(t){if("ExecuteImport"===t)return e.context.service.perspective.renderPerspective("development"); }).done()}});t.addButton(n);var r=new sap.watt.ideplatform.plugin.welcomescreen.ui.controls.BasicWelcomeTile("importABAPTile",{title:e.context.i18n.getText("i18n","importContainer_abapTile"),icon:"sap-icon://sap-logo-shape",press:function(){e.context.service.usagemonitoring.report("welcome_screen","import_ABAP").done(),e.context.service.command.getCommand("repositorybrowser.importFromBSP").then(function(e){return e.execute()}).done()}});t.addButton(r);var i=new sap.watt.ideplatform.plugin.welcomescreen.ui.controls.BasicWelcomeTile("importHCPTile",{title:e.context.i18n.getText("i18n","importContainer_hcpTile"),icon:"sap-icon://world",press:function(){e.context.service.usagemonitoring.report("welcome_screen","import_HCP").done(),e.context.service.command.getCommand("repositorybrowser.importFromHelium").then(function(e){return e.execute()}).done()}}),o=sap.watt.getEnv("server_type");"java"!==o&&"local_hcproxy"!==o||(i.setEnabled(!1),i.addStyleClass("disabledWelcomeTileDiv")),t.addButton(i);var a=new sap.watt.ideplatform.plugin.welcomescreen.ui.controls.BasicWelcomeTile("cloneGitTile",{title:e.context.i18n.getText("i18n","importContainer_gitTile"),icon:"sap-icon://watt/git",press:function(){e.context.service.usagemonitoring.report("welcome_screen","import_clone_GIT").done(),e.context.service.command.getCommand("gitclient.clone").then(function(t){return t.execute().then(function(t){if(t)return e.context.service.perspective.renderPerspective("development")})}).done()}});return t.addButton(a),t};return{getContainer:e}}),define("sap/watt/ideplatform/plugin/welcomescreen/ui/controls/BasicWelcomeLinksContainer",["./BasicWelcomeContainer"],function(){"use strict";sap.watt.ideplatform.plugin.welcomescreen.ui.controls.BasicWelcomeContainer.extend("sap.watt.ideplatform.plugin.welcomescreen.ui.controls.BasicWelcomeLinksContainer",{metadata:{properties:{i18nSource:"object",showDescription:{type:"boolean",defaultValue:"false"},linksModel:"object"}},setLinksModel:function(e,t){this.setProperty("linksModel",e);var n=this.getI18nSource(),r=this.getShowDescription(),i=new sap.ui.commons.RowRepeater({design:"BareShell",numberOfRows:e.data.length}),o=new sap.ui.commons.FormattedTextView,a=new sap.ui.model.json.JSONModel;a.setData(e),i.setModel(a);var s=new sap.ui.commons.Link({target:"_blank",press:function(){var e=this.getBindingContext().getObject().linkClickEvent;t(e)}});s.bindProperty("href","href"),s.bindProperty("text","linkDesc",function(e){return n.getText("i18n",e)});var u='
';if(o.setHtmlText(u),o.addControl(s),r===!0){var c=new sap.ui.commons.Link;c.bindProperty("text","text",function(e){return n.getText("i18n",e)}),c.setEnabled(!1),c.addStyleClass("welcomeLinkLabel"),o.addControl(c)}i.bindRows("/data",o),this.removeContent(),this.addContent(i)},renderer:{}})}),define("sap.watt.saptoolsets.fiori.common.welcomescreenimpl/ui/ToolsContainer",["sap/watt/ideplatform/plugin/welcomescreen/ui/controls/BasicWelcomeLinksContainer"],function(){"use strict";var e=function(){var e=this,t=jQuery.sap.getModulePath("sap.watt.saptoolsets.fiori.common.plugin.welcomescreenimpl.helpfullinks",".json");return Q.sap.ajax({url:t,dataType:"json"}).then(function(t){var n=t[0],r=[];return r.push(e.context.service.hcpconnectivity.getLinkToCockPit()),r.push(e.context.service.hcpconnectivity.getLinkToUIThemeDesigner()),Q.spread(r,function(t,r){t&&""!==t&&n.data.push({href:t,linkDesc:"toolsContainer_cockpitLink",linkClickEvent:"toolsContainer_cockpitLin"});var i=new sap.watt.ideplatform.plugin.welcomescreen.ui.controls.BasicWelcomeLinksContainer("toolsContainer",{borderDesign:sap.ui.commons.enums.BorderDesign.None,showCollapseIcon:!1,title:new sap.ui.core.Title({text:e.context.i18n.getText("i18n","toolsContainer_containerTitle"),level:sap.ui.core.TitleLevel.H3}),layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),i18nSource:e.context.i18n});return i.setLinksModel(n,function(t){e.context.service.usagemonitoring.report("welcome_screen",t).done()}),i})})};return{getContainer:e}}),define("sap.watt.saptoolsets.fiori.common.welcomescreenimpl/ui/NewProjectContainer",["sap/watt/ideplatform/plugin/welcomescreen/ui/controls/BasicWelcomeActionContainer","sap/watt/ideplatform/plugin/welcomescreen/ui/controls/BasicWelcomeTile"],function(){"use strict";var e=[],t={iotProjectTile:!0},n={iotProjectTile:!0},r=function(){var r;r=sap.watt.getEnv("internal")===!0?t:n;for(var i,o=0;o>|[!<>]=|(?![0-9-])[\w-]+:\*|\s+|./g);if(n){for(var r=0,i=0,o=n.length;i0)}function i(){this.dataTypes={},this.documents={},this.functions={},this.collations={},this.collections={}}function o(e,t,n){Hn[e]=n,zn[e]=t}function a(e,t){qn[e]=t}function s(n,r){var i=new t(n),o=p(i,r);if(!i.eof())throw new e("XPST0003","Unexpected token beyond end of query");if(!o)throw new e("XPST0003","Expected expression");this.internalExpression=o}function u(){}function c(){}function l(){this.items=[]}function p(t,n){var r;if(!t.eof()&&(r=f(t,n))){var i=new l;for(i.items.push(r);","==t.peek();){if(t.next(),t.eof()||!(r=f(t,n)))throw new e("XPST0003","Expected expression");i.items.push(r)}return i}}function f(e,t){if(!e.eof())return y(e,t)||h(e,t)||b(e,t)||R(e,t)}function d(){this.bindings=[],this.returnExpr=null}function h(t,n){if("for"==t.peek()&&"$"==t.peek(1).substr(0,1)){t.next();var r,i=new d;do i.bindings.push(g(t,n));while(","==t.peek()&&t.next());if("return"!=t.peek())throw new e("XPST0003","Expected 'return' token in for expression");if(t.next(),t.eof()||!(r=f(t,n)))throw new e("XPST0003","Expected return statement operand in for expression");return i.returnExpr=r,i}}function m(e,t,n,r){this.prefix=e,this.localName=t,this.namespaceURI=n,this.inExpr=r}function g(t,n){var r=t.peek().substr(1).match(ir);if(!r)throw new e("XPST0003","Expected binding in for expression");if("*"==r[1]||"*"==r[2])throw new e("XPST0003","Illegal use of wildcard in for expression binding variable name");if(t.next(),"in"!=t.peek())throw new e("XPST0003","Expected 'in' token in for expression binding");t.next();var i;if(t.eof()||!(i=f(t,n)))throw new e("XPST0003","Expected in statement operand in for expression binding");return new m(r[1]||null,r[2],r[1]?n.getURIForPrefix(r[1]):null,i)}function v(e,t,n){this.condExpr=e,this.thenExpr=t,this.elseExpr=n}function y(t,n){var r,i,o;if("if"==t.peek()&&"("==t.peek(1)){if(t.next(2),t.eof()||!(r=p(t,n)))throw new e("XPST0003","Expected if statement operand in conditional expression");if(")"!=t.peek())throw new e("XPST0003","Expected ')' token in for expression");if(t.next(),"then"!=t.peek())throw new e("XPST0003","Expected 'then' token in conditional if expression");if(t.next(),t.eof()||!(i=f(t,n)))throw new e("XPST0003","Expected then statement operand in condional expression");if("else"!=t.peek())throw new e("XPST0003","Expected 'else' token in conditional if expression");if(t.next(),t.eof()||!(o=f(t,n)))throw new e("XPST0003","Expected else statement operand in condional expression");return new v(r,i,o)}}function x(e){this.quantifier=e,this.bindings=[],this.satisfiesExpr=null}function b(t,n){var r=t.peek();if(("some"==r||"every"==r)&&"$"==t.peek(1).substr(0,1)){t.next();var i,o=new x(r);do o.bindings.push(w(t,n));while(","==t.peek()&&t.next());if("satisfies"!=t.peek())throw new e("XPST0003","Expected 'satisfies' token in quantified expression");if(t.next(),t.eof()||!(i=f(t,n)))throw new e("XPST0003","Expected satisfies statement operand in quantified expression");return o.satisfiesExpr=i,o}}function _(e,t,n,r){this.prefix=e,this.localName=t,this.namespaceURI=n,this.inExpr=r}function w(t,n){var r=t.peek().substr(1).match(ir);if(!r)throw new e("XPST0003","Expected binding in quantified expression");if("*"==r[1]||"*"==r[2])throw new e("XPST0003","Illegal use of wildcard in quantified expression binding variable name");if(t.next(),"in"!=t.peek())throw new e("XPST0003","Expected 'in' token in quantified expression binding");t.next();var i;if(t.eof()||!(i=f(t,n)))throw new e("XPST0003","Expected in statement operand in quantified expression binding");return new _(r[1]||null,r[2],r[1]?n.getURIForPrefix(r[1]):null,i)}function E(e,t,n){this.left=e,this.right=t,this.operator=n}function S(t,n){var r,i;if(!t.eof()&&(r=Se(t,n))){if(!(t.peek()in Yn))return r;var o=t.peek();if(t.next(),t.eof()||!(i=Se(t,n)))throw new e("XPST0003","Expected second operand in comparison expression");return new E(r,i,o)}}function C(e,t){var n=bn(e.left.evaluate(t),t);if(!n.length)return new Xe(!1);var r=bn(e.right.evaluate(t),t);if(!r.length)return new Xe(!1);for(var i,o,a=!1,s=0,u=n.length;sc)throw new e("XPST0017","Function "+t+"() must have "+(c?" no more than ":"")+c+" argument"+(c>1||!c?"s":""));if(u1?"s":""));for(var p=0;p1)throw new e("XPTY0004","Required cardinality of "+i+" is one or zero")}else if("+"==r){if(o<1)throw new e("XPTY0004","Required cardinality of "+i+" is one or more")}else if("*"!=r&&1!=o)throw new e("XPTY0004","Required cardinality of "+i+" is exactly one")}function _e(e){this.left=e,this.items=[]}function we(t,n){var r,i;if(!t.eof()&&(r=Ae(t,n))){if("intersect"!=(i=t.peek())&&"except"!=i)return r;for(var o=new _e(r);"intersect"==(i=t.peek())||"except"==i;){if(t.next(),t.eof()||!(r=Ae(t,n)))throw new e("XPST0003","Expected second operand in "+i+" expression");o.items.push([i,r])}return o}}function Ee(e,t){this.left=e,this.right=t}function Se(t,n){var r,i;if(!t.eof()&&(r=P(t,n))){if("to"!=t.peek())return r;if(t.next(),t.eof()||!(i=P(t,n)))throw new e("XPST0003","Expected second operand in range expression");return new Ee(r,i)}}function Ce(e){this.left=e,this.items=[]}function Te(t,n){var r,i;if(!t.eof()&&(r=we(t,n))){if("|"!=(i=t.peek())&&"union"!=i)return r;for(var o=new Ce(r);"|"==(i=t.peek())||"union"==i;){if(t.next(),t.eof()||!(r=we(t,n)))throw new e("XPST0003","Expected second operand in union expression");o.items.push(r)}return o}}function De(e,t){this.expression=e,this.type=t}function Ae(t,n){var r,i;if(!t.eof()&&(r=ke(t,n))){if("instance"!=t.peek()||"of"!=t.peek(1))return r;if(t.next(2),t.eof()||!(i=Ue(t,n)))throw new e("XPST0003","Expected second operand in instance of expression");return new De(r,i)}}function Pe(e,t){this.expression=e,this.type=t}function ke(t,n){var r,i;if(!t.eof()&&(r=Fe(t,n))){if("treat"!=t.peek()||"as"!=t.peek(1))return r;if(t.next(2),t.eof()||!(i=Ue(t,n)))throw new e("XPST0003","Expected second operand in treat expression");return new Pe(r,i)}}function Ie(e,t){this.expression=e,this.type=t}function Fe(t,n){var r,i;if(!t.eof()&&(r=Ne(t,n))){if("castable"!=t.peek()||"as"!=t.peek(1))return r;if(t.next(2),t.eof()||!(i=Ge(t,n)))throw new e("XPST0003","Expected second operand in castable expression");return new Ie(r,i)}}function Oe(e,t){this.expression=e,this.type=t}function Ne(t,n){var r,i;if(!t.eof()&&(r=O(t,n))){if("cast"!=t.peek()||"as"!=t.peek(1))return r;if(t.next(2),t.eof()||!(i=Ge(t,n)))throw new e("XPST0003","Expected second operand in cast expression");return new Oe(r,i)}}function je(e,t,n){this.prefix=e,this.localName=t,this.namespaceURI=n}function Re(t,n){var r=t.peek().match(ir);if(r){if("*"==r[1]||"*"==r[2])throw new e("XPST0003","Illegal use of wildcard in type name");return t.next(),new je(r[1]||null,r[2],r[1]?n.getURIForPrefix(r[1]):null)}}function Le(e){this.test=e}function Me(t,n){if(!t.eof()){var r;if("item"==t.peek()&&"("==t.peek(1)){if(t.next(2),")"!=t.peek())throw new e("XPST0003","Expected ')' token in item type expression");return t.next(),new Le}return(r=J(t,n))?new Le(r):(r=Re(t,n))?new Le(r):void 0}}function Be(e,t){this.itemType=e||null,this.occurence=t||null}function Ue(t,n){if(!t.eof()){if("empty-sequence"==t.peek()&&"("==t.peek(1)){if(t.next(2),")"!=t.peek())throw new e("XPST0003","Expected ')' token in sequence type");return t.next(),new Be}var r,i;return!t.eof()&&(r=Me(t,n))?(i=t.peek(),"?"==i||"*"==i||"+"==i?t.next():i=null,new Be(r,i)):void 0}}function Ve(e,t){this.itemType=e||null,this.occurence=t||null}function Ge(e,t){var n,r;if(!e.eof()&&(n=Re(e,t)))return r=e.peek(),"?"==r?e.next():r=null,new Ve(n,r)}function We(){}function Qe(){}function He(){}function ze(e){return e instanceof pt||e instanceof at||e instanceof ot}function qe(e,t,n,r,i){this.scheme=e,this.authority=t,this.path=n,this.query=r,this.fragment=i}function $e(e){this.value=e}function Xe(e){this.value=e}function Ke(e,t,n,r,i){this.year=e,this.month=t,this.day=n,this.timezone=r,this.negative=i}function Je(e,t){return 2==t&&(e%400==0||e%100!=0&&e%4==0)?29:fr[t-1]}function Ye(e,t){if(!t){var n=Je(e.year,e.month);if(e.day>n)for(;e.day>n;)e.month+=1,e.month>12&&(e.year+=1,0==e.year&&(e.year=1),e.month=1),e.day-=n,n=Je(e.year,e.month);else if(e.day<1)for(;e.day<1;)e.month-=1,e.month<1&&(e.year-=1,0==e.year&&(e.year=-1),e.month=12),n=Je(e.year,e.month),e.day+=n}return e.month>12?(e.year+=~~(e.month/12),0==e.year&&(e.year=1),e.month=e.month%12):e.month<1&&(e.year+=~~(e.month/12)-1,0==e.year&&(e.year=-1),e.month=e.month%12+12),e}function Ze(e,t,n,r,i,o,a,s){this.year=e,this.month=t,this.day=n,this.hours=r,this.minutes=i,this.seconds=o,this.timezone=a,this.negative=s}function et(e,t){return sValue=Cn(e),arguments.length<2&&(t=2),(sValue.length0?"+":"-")+et(In.abs(~~(t/60)))+":"+et(In.abs(t%60)):"Z"}function nt(e){return(e.negative?"-":"")+et(e.year,4)+"-"+et(e.month)+"-"+et(e.day)}function rt(e){var t=Cn(e.seconds).split(".");return et(e.hours)+":"+et(e.minutes)+":"+et(t[0])+(t.length>1?"."+t[1]:"")}function it(e){return Ye(wt(e))}function ot(e){this.value=e}function at(e){this.value=e}function st(e,t,n,r,i,o,a){this.year=e,this.month=t,this.day=n,this.hours=r,this.minutes=i,this.seconds=o,this.negative=a}function ut(e){return(e.year?e.year+"Y":"")+(e.month?e.month+"M":"")}function ct(e){return(e.day?e.day+"D":"")+(e.hours||e.minutes||e.seconds?"T"+(e.hours?e.hours+"H":"")+(e.minutes?e.minutes+"M":"")+(e.seconds?e.seconds+"S":""):"")}function lt(e){return Ct(Dt(e))}function pt(e){this.value=e}function ft(e,t){this.day=e,this.timezone=t}function dt(e,t){this.month=e,this.timezone=t}function ht(e,t,n){this.month=e,this.day=t,this.timezone=n}function mt(e,t){this.year=e,this.timezone=t}function gt(e,t,n){this.year=e,this.month=t,this.timezone=n}function vt(e){this.value=e}function yt(){}function xt(e,t,n){this.prefix=e,this.localName=t,this.namespaceURI=n}function bt(e){this.value=e}function _t(e,t,n,r){this.hours=e,this.minutes=t,this.seconds=n,this.timezone=r}function wt(e){return(e.seconds>=60||e.seconds<0)&&(e.minutes+=~~(e.seconds/60)-(e.seconds<0&&e.seconds%60?1:0),e.seconds=e.seconds%60+(e.seconds<0&&e.seconds%60?60:0)),(e.minutes>=60||e.minutes<0)&&(e.hours+=~~(e.minutes/60)-(e.minutes<0&&e.minutes%60?1:0),e.minutes=e.minutes%60+(e.minutes<0&&e.minutes%60?60:0)),(e.hours>=24||e.hours<0)&&(e instanceof Ze&&(e.day+=~~(e.hours/24)-(e.hours<0&&e.hours%24?1:0)),e.hours=e.hours%24+(e.hours<0&&e.hours%24?24:0)),e}function Et(e){this.value=e}function St(e,t,n){st.call(this,e,t,0,0,0,0,n)}function Ct(e){return e.month>=12&&(e.year+=~~(e.month/12),e.month%=12),e}function Tt(e,t,n,r,i){st.call(this,0,0,e,t,n,r,i)}function Dt(e){return e.seconds>=60&&(e.minutes+=~~(e.seconds/60),e.seconds%=60),e.minutes>=60&&(e.hours+=~~(e.minutes/60),e.minutes%=60),e.hours>=24&&(e.day+=~~(e.hours/24),e.hours%=24),e}function At(e){this.value=e}function Pt(e){this.value=e}function kt(e){this.value=e}function It(e){this.value=e}function Ft(e){this.value=e}function Ot(e){this.value=e}function Nt(e){this.value=e}function jt(e){this.value=e}function Rt(e){this.value=e}function Lt(e){this.value=e}function Mt(e){this.value=e}function Bt(e){this.value=e}function Ut(e){this.value=e}function Vt(e){this.value=e}function Gt(e){this.value=e}function Wt(e){this.value=e}function Qt(e){this.value=e}function Ht(e){this.value=e}function zt(e){this.value=e}function qt(e){this.value=e}function $t(e){this.value=e}function Xt(){}function Kt(){}function Jt(){}function Yt(){}function Zt(){}function en(){}function tn(){}function nn(){}function rn(e,t,n){var r=dn(e),i=dn(t);return new Xe("lt"==n?ri:r==i)}function on(e,t,n){return an(Ze.cast(e),Ze.cast(t),n)}function an(e,t,n){var r=new Tt(0,0,0,0),i=yn(e,r).toString(),o=yn(t,r).toString();return new Xe("lt"==n?io:i==o)}function sn(e,t,n){var r;e instanceof Ke?r=new Ke(e.year,e.month,e.day,e.timezone,e.negative):e instanceof Ze&&(r=new Ze(e.year,e.month,e.day,e.hours,e.minutes,e.seconds,e.timezone,e.negative)),r.year=r.year+t.year*("-"==n?-1:1),r.month=r.month+t.month*("-"==n?-1:1),Ye(r,!0);var i=Je(r.year,r.month);return r.day>i&&(r.day=i),r}function un(e,t,n){var r;return e instanceof Ke?(r=new Ke(e.year,e.month,e.day,e.timezone,e.negative),r.day=r.day+t.day*("-"==n?-1:1),Ye(r)):e instanceof Ze&&(r=new Ze(e.year,e.month,e.day,e.hours,e.minutes,e.seconds,e.timezone,e.negative),r.seconds=r.seconds+t.seconds*("-"==n?-1:1),r.minutes=r.minutes+t.minutes*("-"==n?-1:1),r.hours=r.hours+t.hours*("-"==n?-1:1),r.day=r.day+t.day*("-"==n?-1:1),it(r)),r}function cn(e){return(60*(60*(24*e.day+e.hours)+e.minutes)+e.seconds)*(e.negative?-1:1)}function ln(e){var t=(e=In.round(e))<0,n=~~((e=In.abs(e))/86400),r=~~((e-=3600*n*24)/3600),i=~~((e-=3600*r)/60),o=e-=60*i;return new Tt(n,r,i,o,t)}function pn(e){return(12*e.year+e.month)*(e.negative?-1:1)}function fn(e){var t=(e=In.round(e))<0,n=~~((e=In.abs(e))/12),r=e-=12*n;return new St(n,r,t)}function dn(e){return e.seconds+60*(e.minutes-(null!=e.timezone?e.timezone%60:0)+60*(e.hours-(null!=e.timezone?~~(e.timezone/60):0)))}function hn(e,t){if(On(e)||In.abs(e)==Rn||On(t)||In.abs(t)==Rn)return 0;var n=Cn(e).match(or),r=Cn(t).match(or),i=In.max(1,(n[2]||n[3]||"").length+(n[5]||0)*("+"==n[4]?-1:1),(r[2]||r[3]||"").length+(r[5]||0)*("+"==r[4]?-1:1));return i+(i%2?0:1)}function mn(e,t,n){return new(e instanceof At&&t instanceof At&&n==In.round(n)?At:ot)(n)}function gn(e,t){if(null==e)return null;var n=e[t]*(e.negative?-1:1);return"seconds"==t?new ot(n):new At(n)}function vn(e,t){if(null==e)return null;if("timezone"==t){var n=e.timezone;return null==n?null:new Tt(0,In.abs(~~(n/60)),In.abs(n%60),0,n<0)}var r=e[t];return e instanceof Ke||"hours"==t&&24==r&&(r=0),e instanceof _t||(r*=e.negative?-1:1),"seconds"==t?new ot(r):new At(r)}function yn(e,t){if(null==e)return null;var n;if(n=e instanceof Ke?new Ke(e.year,e.month,e.day,e.timezone,e.negative):e instanceof _t?new _t(e.hours,e.minutes,e.seconds,e.timezone,e.negative):new Ze(e.year,e.month,e.day,e.hours,e.minutes,e.seconds,e.timezone,e.negative),null==t)n.timezone=null;else{var r=cn(t)/60;if(null!=e.timezone){var i=r-e.timezone;e instanceof Ke?i<0&&n.day--:(n.minutes+=i%60,n.hours+=~~(i/60)),it(n)}n.timezone=r}return n}function xn(t,n){if(!t.length)return!1;var r=t[0];if(n.DOMAdapter.isNode(r))return!0;if(1==t.length){if(r instanceof Xe)return r.value.valueOf();if(r instanceof bt)return!!r.valueOf().length;if(ze(r))return!(On(r.valueOf())||0==r.valueOf());throw new e("FORG0006","Effective boolean value is defined only for sequences containing booleans, strings, numbers, URIs, or nodes"); }throw new e("FORG0006","Effective boolean value is not defined for a sequence of two or more items")}function bn(e,t){for(var n,r,i=[],o=0,a=e.length;o=0,c=n.indexOf("x")>=0;if(u||c){n=n.replace(/[sx]/g,"");for(var l,p=[],f=/\s/,d=0,h=t.length,m=!1,g="";d0},t.prototype.eof=function(){return this.index>=this.length},n.prototype.isNode=function(e){return e&&!!e.nodeType},n.prototype.getProperty=function(e,t){return e[t]},n.prototype.isSameNode=function(e,t){return e==t},n.prototype.compareDocumentPosition=function(e,t){return e.compareDocumentPosition(t)},n.prototype.lookupNamespaceURI=function(e,t){return e.lookupNamespaceURI(t)},n.prototype.getElementById=function(e,t){return e.getElementById(t)},n.prototype.getElementsByTagNameNS=function(e,t,n){return e.getElementsByTagNameNS(t,n)},r.prototype.item=null,r.prototype.position=0,r.prototype.size=0,r.prototype.scope=null,r.prototype.stack=null,r.prototype.dateTime=null,r.prototype.timezone=null,r.prototype.staticContext=null,r.prototype.pushVariable=function(e,t){this.stack.hasOwnProperty(e)||(this.stack[e]=[]),this.stack[e].push(this.scope[e]),this.scope[e]=t},r.prototype.popVariable=function(e){this.stack.hasOwnProperty(e)&&(this.scope[e]=this.stack[e].pop(),this.stack[e].length||(delete this.stack[e],"undefined"==typeof this.scope[e]&&delete this.scope[e]))},i.prototype.baseURI=null,i.prototype.dataTypes=null,i.prototype.documents=null,i.prototype.functions=null,i.prototype.defaultFunctionNamespace=null,i.prototype.collations=null,i.prototype.defaultCollationName=Un+"/collation/codepoint",i.prototype.collections=null,i.prototype.namespaceResolver=null,i.prototype.defaultElementNamespace=null;var Qn=/^(?:\{([^\}]+)\})?(.+)$/;i.prototype.setDataType=function(e,t){var n=e.match(Qn);n&&n[1]!=Bn&&(this.dataTypes[e]=t)},i.prototype.getDataType=function(e){var t=e.match(Qn);if(t)return t[1]==Bn?qn[An.$2]:this.dataTypes[e]},i.prototype.setDocument=function(e,t){this.documents[e]=t},i.prototype.setFunction=function(e,t){var n=e.match(Qn);n&&n[1]!=Un&&(this.functions[e]=t)},i.prototype.getFunction=function(e){var t=e.match(Qn);if(t)return t[1]==Un?Hn[An.$2]:this.functions[e]},i.prototype.setCollation=function(e,t){this.collations[e]=t},i.prototype.getCollation=function(e){return this.collations[e]},i.prototype.setCollection=function(e,t){this.collections[e]=t},i.prototype.getURIForPrefix=function(t){var n,r=this.namespaceResolver,i=r&&r.lookupNamespaceURI?r.lookupNamespaceURI:r;if(i instanceof kn&&(n=i.call(r,t)))return n;if("fn"==t)return Un;if("xs"==t)return Bn;if("xml"==t)return Gn;if("xmlns"==t)return Vn;throw new e("XPST0081","Prefix '"+t+"' has not been declared")},i.js2xs=function(e){return e="boolean"==typeof e?new Xe(e):"number"==typeof e?On(e)||!Nn(e)?new at(e):ce(Cn(e)):new bt(Cn(e))},i.xs2js=function(e){return e=e instanceof Xe?e.valueOf():ze(e)?e.valueOf():e.toString()};var Hn={},zn={},qn={},$n={};s.prototype.internalExpression=null,s.prototype.evaluate=function(e){return this.internalExpression.evaluate(e)},u.prototype.equals=function(e,t){throw"Not implemented"},u.prototype.compare=function(e,t){throw"Not implemented"},c.ANYSIMPLETYPE_DT=1,c.STRING_DT=2,c.BOOLEAN_DT=3,c.DECIMAL_DT=4,c.FLOAT_DT=5,c.DOUBLE_DT=6,c.DURATION_DT=7,c.DATETIME_DT=8,c.TIME_DT=9,c.DATE_DT=10,c.GYEARMONTH_DT=11,c.GYEAR_DT=12,c.GMONTHDAY_DT=13,c.GDAY_DT=14,c.GMONTH_DT=15,c.HEXBINARY_DT=16,c.BASE64BINARY_DT=17,c.ANYURI_DT=18,c.QNAME_DT=19,c.NOTATION_DT=20,c.NORMALIZEDSTRING_DT=21,c.TOKEN_DT=22,c.LANGUAGE_DT=23,c.NMTOKEN_DT=24,c.NAME_DT=25,c.NCNAME_DT=26,c.ID_DT=27,c.IDREF_DT=28,c.ENTITY_DT=29,c.INTEGER_DT=30,c.NONPOSITIVEINTEGER_DT=31,c.NEGATIVEINTEGER_DT=32,c.LONG_DT=33,c.INT_DT=34,c.SHORT_DT=35,c.BYTE_DT=36,c.NONNEGATIVEINTEGER_DT=37,c.UNSIGNEDLONG_DT=38,c.UNSIGNEDINT_DT=39,c.UNSIGNEDSHORT_DT=40,c.UNSIGNEDBYTE_DT=41,c.POSITIVEINTEGER_DT=42,c.LISTOFUNION_DT=43,c.LIST_DT=44,c.UNAVAILABLE_DT=45,c.DATETIMESTAMP_DT=46,c.DAYMONTHDURATION_DT=47,c.DAYTIMEDURATION_DT=48,c.PRECISIONDECIMAL_DT=49,c.ANYATOMICTYPE_DT=50,c.ANYTYPE_DT=51,c.XT_YEARMONTHDURATION_DT=-1,c.XT_UNTYPEDATOMIC_DT=-2,l.prototype.items=null,l.prototype.evaluate=function(e){for(var t=[],n=0,r=this.items.length;n":"gt","<":"lt",">=":"ge","<=":"le"},Kn={};Kn.eq=function(t,n,r){var i="";if(ze(t))ze(n)&&(i="numeric-equal");else if(t instanceof Xe)n instanceof Xe&&(i="boolean-equal");else if(t instanceof bt){if(n instanceof bt)return $n["numeric-equal"].call(r,Hn.compare.call(r,t,n),new At(0))}else t instanceof Ke?n instanceof Ke&&(i="date-equal"):t instanceof _t?n instanceof _t&&(i="time-equal"):t instanceof Ze?n instanceof Ze&&(i="dateTime-equal"):t instanceof st?n instanceof st&&(i="duration-equal"):t instanceof gt?n instanceof gt&&(i="gYearMonth-equal"):t instanceof mt?n instanceof mt&&(i="gYear-equal"):t instanceof ht?n instanceof ht&&(i="gMonthDay-equal"):t instanceof dt?n instanceof dt&&(i="gMonth-equal"):t instanceof ft?n instanceof ft&&(i="gDay-equal"):t instanceof xt?n instanceof xt&&(i="QName-equal"):t instanceof vt?n instanceof vt&&(i="hexBinary-equal"):t instanceof $e&&n instanceof $e&&(i="base64Binary-equal");if(i)return $n[i].call(r,t,n);throw new e("XPTY0004","Cannot compare values of given types")},Kn.ne=function(e,t,n){return new Xe(!Kn.eq(e,t,n).valueOf())},Kn.gt=function(t,n,r){var i="";if(ze(t))ze(n)&&(i="numeric-greater-than");else if(t instanceof Xe)n instanceof Xe&&(i="boolean-greater-than");else if(t instanceof bt){if(n instanceof bt)return $n["numeric-greater-than"].call(r,Hn.compare.call(r,t,n),new At(0))}else t instanceof Ke?n instanceof Ke&&(i="date-greater-than"):t instanceof _t?n instanceof _t&&(i="time-greater-than"):t instanceof Ze?n instanceof Ze&&(i="dateTime-greater-than"):t instanceof St?n instanceof St&&(i="yearMonthDuration-greater-than"):t instanceof Tt&&n instanceof Tt&&(i="dayTimeDuration-greater-than");if(i)return $n[i].call(r,t,n);throw new e("XPTY0004","Cannot compare values of given types")},Kn.lt=function(t,n,r){var i="";if(ze(t))ze(n)&&(i="numeric-less-than");else if(t instanceof Xe)n instanceof Xe&&(i="boolean-less-than");else if(t instanceof bt){if(n instanceof bt)return $n["numeric-less-than"].call(r,Hn.compare.call(r,t,n),new At(0))}else t instanceof Ke?n instanceof Ke&&(i="date-less-than"):t instanceof _t?n instanceof _t&&(i="time-less-than"):t instanceof Ze?n instanceof Ze&&(i="dateTime-less-than"):t instanceof St?n instanceof St&&(i="yearMonthDuration-less-than"):t instanceof Tt&&n instanceof Tt&&(i="dayTimeDuration-less-than");if(i)return $n[i].call(r,t,n);throw new e("XPTY0004","Cannot compare values of given types")},Kn.ge=function(t,n,r){var i="";if(ze(t)){if(ze(n))return $n["numeric-greater-than"].call(r,t,n)||$n["numeric-equal"].call(r,t,n)}else if(t instanceof Xe)n instanceof Xe&&(i="boolean-less-than");else if(t instanceof bt){if(n instanceof bt)return $n["numeric-greater-than"].call(r,Hn.compare.call(r,t,n),new At(-1))}else t instanceof Ke?n instanceof Ke&&(i="date-less-than"):t instanceof _t?n instanceof _t&&(i="time-less-than"):t instanceof Ze?n instanceof Ze&&(i="dateTime-less-than"):t instanceof St?n instanceof St&&(i="yearMonthDuration-less-than"):t instanceof Tt&&n instanceof Tt&&(i="dayTimeDuration-less-than");if(i)return new Xe(!$n[i].call(r,t,n).valueOf());throw new e("XPTY0004","Cannot compare values of given types")},Kn.le=function(t,n,r){var i="";if(ze(t)){if(ze(n))return $n["numeric-less-than"].call(r,t,n)||$n["numeric-equal"].call(r,t,n)}else if(t instanceof Xe)n instanceof Xe&&(i="boolean-greater-than");else if(t instanceof bt){if(n instanceof bt)return $n["numeric-less-than"].call(r,Hn.compare.call(r,t,n),new At(1))}else t instanceof Ke?n instanceof Ke&&(i="date-greater-than"):t instanceof _t?n instanceof _t&&(i="time-greater-than"):t instanceof Ze?n instanceof Ze&&(i="dateTime-greater-than"):t instanceof St?n instanceof St&&(i="yearMonthDuration-greater-than"):t instanceof Tt&&n instanceof Tt&&(i="dayTimeDuration-greater-than");if(i)return new Xe(!$n[i].call(r,t,n).valueOf());throw new e("XPTY0004","Cannot compare values of given types")};var Jn={};Jn.is=function(e,t,n){return $n["is-same-node"].call(n,e,t)},Jn[">>"]=function(e,t,n){return $n["node-after"].call(n,e,t)},Jn["<<"]=function(e,t,n){return $n["node-before"].call(n,e,t)};var Yn={"=":C,"!=":C,"<":C,"<=":C,">":C,">=":C,eq:T,ne:T,lt:T,le:T,gt:T,ge:T,is:D,">>":D,"<<":D};A.prototype.left=null,A.prototype.items=null;var Zn={};Zn["+"]=function(t,n,r){var i="",o=!1;if(ze(t)?ze(n)&&(i="numeric-add"):t instanceof Ke?n instanceof St?i="add-yearMonthDuration-to-date":n instanceof Tt&&(i="add-dayTimeDuration-to-date"):t instanceof St?n instanceof Ke?(i="add-yearMonthDuration-to-date",o=!0):n instanceof Ze?(i="add-yearMonthDuration-to-dateTime",o=!0):n instanceof St&&(i="add-yearMonthDurations"):t instanceof Tt?n instanceof Ke?(i="add-dayTimeDuration-to-date",o=!0):n instanceof _t?(i="add-dayTimeDuration-to-time",o=!0):n instanceof Ze?(i="add-dayTimeDuration-to-dateTime",o=!0):n instanceof Tt&&(i="add-dayTimeDurations"):t instanceof _t?n instanceof Tt&&(i="add-dayTimeDuration-to-time"):t instanceof Ze&&(n instanceof St?i="add-yearMonthDuration-to-dateTime":n instanceof Tt&&(i="add-dayTimeDuration-to-dateTime")),i)return $n[i].call(r,o?n:t,o?t:n);throw new e("XPTY0004","Arithmetic operator is not defined for provided arguments")},Zn["-"]=function(t,n,r){var i="";if(ze(t)?ze(n)&&(i="numeric-subtract"):t instanceof Ke?n instanceof Ke?i="subtract-dates":n instanceof St?i="subtract-yearMonthDuration-from-date":n instanceof Tt&&(i="subtract-dayTimeDuration-from-date"):t instanceof _t?n instanceof _t?i="subtract-times":n instanceof Tt&&(i="subtract-dayTimeDuration-from-time"):t instanceof Ze?n instanceof Ze?i="subtract-dateTimes":n instanceof St?i="subtract-yearMonthDuration-from-dateTime":n instanceof Tt&&(i="subtract-dayTimeDuration-from-dateTime"):t instanceof St?n instanceof St&&(i="subtract-yearMonthDurations"):t instanceof Tt&&n instanceof Tt&&(i="subtract-dayTimeDurations"),i)return $n[i].call(r,t,n);throw new e("XPTY0004","Arithmetic operator is not defined for provided arguments")},A.prototype.evaluate=function(e){var t=bn(this.left.evaluate(e),e);if(!t.length)return[];be(e,t,"?","first operand of '"+this.items[0][0]+"'");var n=t[0];n instanceof Et&&(n=at.cast(n));for(var r,i,o=0,a=this.items.length;o1)return[new Xe(!1)];if(!n.length)return[new Xe("?"==i)];try{r.cast(bn(n,t)[0])}catch(t){if("XPST0051"==t.code)throw t;if("XPST0017"==t.code)throw new e("XPST0080","No value is castable to "+(r.prefix?r.prefix+":":"")+r.localName);return[new Xe(!1)]}return[new Xe(!0)]},Oe.prototype.expression=null,Oe.prototype.type=null,Oe.prototype.evaluate=function(e){var t=this.expression.evaluate(e);return be(e,t,this.type.occurence,"'cast as' expression operand"),t.length?[this.type.itemType.cast(bn(t,e)[0],e)]:[]},je.prototype.prefix=null,je.prototype.localName=null,je.prototype.namespaceURI=null,je.prototype.test=function(t,n){var r=(this.namespaceURI?"{"+this.namespaceURI+"}":"")+this.localName,i=this.namespaceURI==Bn?qn[this.localName]:n.staticContext.getDataType(r);if(i)return t instanceof i;throw new e("XPST0051","Unknown simple type "+(this.prefix?this.prefix+":":"")+this.localName)},je.prototype.cast=function(t,n){var r=(this.namespaceURI?"{"+this.namespaceURI+"}":"")+this.localName,i=this.namespaceURI==Bn?qn[this.localName]:n.staticContext.getDataType(r);if(i)return i.cast(t);throw new e("XPST0051","Unknown atomic type "+(this.prefix?this.prefix+":":"")+this.localName)},Le.prototype.test=null,Be.prototype.itemType=null,Be.prototype.occurence=null,Ve.prototype.itemType=null,Ve.prototype.occurence=null,Qe.prototype.builtInKind=c.ANYTYPE_DT,Qe.prototype=new We,Qe.prototype.builtInKind=c.ANYSIMPLETYPE_DT,Qe.prototype.primitiveKind=null,Qe.PRIMITIVE_ANYURI="anyURI",Qe.PRIMITIVE_BASE64BINARY="base64Binary",Qe.PRIMITIVE_BOOLEAN="boolean",Qe.PRIMITIVE_DATE="date",Qe.PRIMITIVE_DATETIME="dateTime",Qe.PRIMITIVE_DECIMAL="decimal",Qe.PRIMITIVE_DOUBLE="double",Qe.PRIMITIVE_DURATION="duration",Qe.PRIMITIVE_FLOAT="float",Qe.PRIMITIVE_GDAY="gDay",Qe.PRIMITIVE_GMONTH="gMonth",Qe.PRIMITIVE_GMONTHDAY="gMonthDay",Qe.PRIMITIVE_GYEAR="gYear",Qe.PRIMITIVE_GYEARMONTH="gYearMonth",Qe.PRIMITIVE_HEXBINARY="hexBinary",Qe.PRIMITIVE_NOTATION="NOTATION",Qe.PRIMITIVE_QNAME="QName",Qe.PRIMITIVE_STRING="string",Qe.PRIMITIVE_TIME="time",He.prototype=new Qe,He.prototype.builtInKind=c.ANYATOMICTYPE_DT,He.cast=function(t){throw new e("XPST0017","Abstract type used in constructor function xs:anyAtomicType")},a("anyAtomicType",He),qe.prototype=new He,qe.prototype.builtInKind=c.ANYURI_DT,qe.prototype.primitiveKind=Qe.PRIMITIVE_ANYURI,qe.prototype.scheme=null,qe.prototype.authority=null,qe.prototype.path=null,qe.prototype.query=null,qe.prototype.fragment=null,qe.prototype.toString=function(){return(this.scheme?this.scheme+":":"")+(this.authority?"//"+this.authority:"")+(this.path?this.path:"")+(this.query?"?"+this.query:"")+(this.fragment?"#"+this.fragment:"")};var ur=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;qe.cast=function(t){if(t instanceof qe)return t;if(t instanceof bt||t instanceof Et){var n;if(n=Ln(t).match(ur))return new qe(n[2],n[4],n[5],n[7],n[9]);throw new e("FORG0001")}throw new e("XPTY0004","Casting value '"+t+"' to xs:anyURI can never succeed")},a("anyURI",qe),$e.prototype=new He,$e.prototype.builtInKind=c.BASE64BINARY_DT,$e.prototype.primitiveKind=Qe.PRIMITIVE_BASE64BINARY,$e.prototype.value=null,$e.prototype.valueOf=function(){return this.value},$e.prototype.toString=function(){return this.value};var cr=/^((([A-Za-z0-9+\/]\s*){4})*(([A-Za-z0-9+\/]\s*){3}[A-Za-z0-9+\/]|([A-Za-z0-9+\/]\s*){2}[AEIMQUYcgkosw048]\s*=|[A-Za-z0-9+\/]\s*[AQgw]\s*=\s*=))?$/;$e.cast=function(t){if(t instanceof $e)return t;if(t instanceof bt||t instanceof Et){var n=Ln(t).match(cr);if(n)return new $e(n[0]);throw new e("FORG0001")}if(t instanceof vt)throw"Casting from 'xs:hexBinary' to 'xs:base64Binary' not implemented";throw new e("XPTY0004","Casting value '"+t+"' to xs:hexBinary can never succeed")},a("base64Binary",$e),Xe.prototype=new He,Xe.prototype.builtInKind=c.BOOLEAN_DT,Xe.prototype.primitiveKind=Qe.PRIMITIVE_BOOLEAN,Xe.prototype.value=null,Xe.prototype.valueOf=function(){return this.value},Xe.prototype.toString=function(){return Cn(this.value)};var lr=/^(0|1|true|false)$/;Xe.cast=function(t){if(t instanceof Xe)return t;if(t instanceof bt||t instanceof Et){var n;if(n=Ln(t).match(lr))return new Xe("1"==n[1]||"true"==n[1]);throw new e("FORG0001")}if(ze(t))return new Xe(0!=t);throw new e("XPTY0004","Casting value '"+t+"' to xs:boolean can never succeed")},a("boolean",Xe),Ke.prototype=new He,Ke.prototype.builtInKind=c.DATE_DT,Ke.prototype.primitiveKind=Qe.PRIMITIVE_DATE,Ke.prototype.year=null,Ke.prototype.month=null,Ke.prototype.day=null,Ke.prototype.timezone=null,Ke.prototype.negative=null,Ke.prototype.toString=function(){return nt(this)+tt(this)};var pr=/^(-?)([1-9]\d\d\d+|0\d\d\d)-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])(Z|([+\-])(0\d|1[0-4]):([0-5]\d))?$/;Ke.cast=function(t){if(t instanceof Ke)return t;if(t instanceof bt||t instanceof Et){var n=Ln(t).match(pr);if(n){var r=+n[2],i=+n[3],o=+n[4];if(o-1t.valueOf())},$n["yearMonthDuration-less-than"]=function(e,t){return new Xe(pn(e)pn(t))},$n["dayTimeDuration-less-than"]=function(e,t){return new Xe(cn(e)cn(t))},$n["duration-equal"]=function(e,t){return new Xe(e.negative==t.negative&&pn(e)==pn(t)&&cn(e)==cn(t))},$n["dateTime-equal"]=function(e,t){return an(e,t,"eq")},$n["dateTime-less-than"]=function(e,t){return an(e,t,"lt")},$n["dateTime-greater-than"]=function(e,t){return an(e,t,"gt")},$n["date-equal"]=function(e,t){return on(e,t,"eq")},$n["date-less-than"]=function(e,t){return on(e,t,"lt")},$n["date-greater-than"]=function(e,t){return on(e,t,"gt")},$n["time-equal"]=function(e,t){return rn(e,t,"eq")},$n["time-less-than"]=function(e,t){return rn(e,t,"lt")},$n["time-greater-than"]=function(e,t){return rn(e,t,"gt")},$n["gYearMonth-equal"]=function(e,t){return an(new Ze(e.year,e.month,Je(e.year,e.month),0,0,0,null==e.timezone?this.timezone:e.timezone),new Ze(t.year,t.month,Je(t.year,t.month),0,0,0,null==t.timezone?this.timezone:t.timezone),"eq")},$n["gYear-equal"]=function(e,t){return an(new Ze(e.year,1,1,0,0,0,null==e.timezone?this.timezone:e.timezone),new Ze(t.year,1,1,0,0,0,null==t.timezone?this.timezone:t.timezone),"eq")},$n["gMonthDay-equal"]=function(e,t){return an(new Ze(1972,e.month,e.day,0,0,0,null==e.timezone?this.timezone:e.timezone),new Ze(1972,t.month,t.day,0,0,0,null==t.timezone?this.timezone:t.timezone),"eq")},$n["gMonth-equal"]=function(e,t){return an(new Ze(1972,e.month,Je(1972,t.month),0,0,0,null==e.timezone?this.timezone:e.timezone),new Ze(1972,t.month,Je(1972,t.month),0,0,0,null==t.timezone?this.timezone:t.timezone),"eq")},$n["gDay-equal"]=function(e,t){return an(new Ze(1972,12,e.day,0,0,0,null==e.timezone?this.timezone:e.timezone),new Ze(1972,12,t.day,0,0,0,null==t.timezone?this.timezone:t.timezone),"eq")},$n["add-yearMonthDurations"]=function(e,t){return fn(pn(e)+pn(t))},$n["subtract-yearMonthDurations"]=function(e,t){return fn(pn(e)-pn(t))},$n["multiply-yearMonthDuration"]=function(e,t){return fn(pn(e)*t)},$n["divide-yearMonthDuration"]=function(e,t){return fn(pn(e)/t)},$n["divide-yearMonthDuration-by-yearMonthDuration"]=function(e,t){return new ot(pn(e)/pn(t))},$n["add-dayTimeDurations"]=function(e,t){return ln(cn(e)+cn(t))},$n["subtract-dayTimeDurations"]=function(e,t){return ln(cn(e)-cn(t))},$n["multiply-dayTimeDuration"]=function(e,t){return ln(cn(e)*t)},$n["divide-dayTimeDuration"]=function(e,t){return ln(cn(e)/t)},$n["divide-dayTimeDuration-by-dayTimeDuration"]=function(e,t){return new ot(cn(e)/cn(t))},$n["subtract-dateTimes"]=function(e,t){throw"Operator function 'subtract-dateTimes' not implemented"},$n["subtract-dates"]=function(e,t){throw"Operator function 'subtract-dates' not implemented"},$n["subtract-times"]=function(e,t){return ln(dn(e)-dn(t))},$n["add-yearMonthDuration-to-dateTime"]=function(e,t){return sn(e,t,"+")},$n["add-dayTimeDuration-to-dateTime"]=function(e,t){return un(e,t,"+")},$n["subtract-yearMonthDuration-from-dateTime"]=function(e,t){return sn(e,t,"-")},$n["subtract-dayTimeDuration-from-dateTime"]=function(e,t){return un(e,t,"-")},$n["add-yearMonthDuration-to-date"]=function(e,t){return sn(e,t,"+")},$n["add-dayTimeDuration-to-date"]=function(e,t){return un(e,t,"+")},$n["subtract-yearMonthDuration-from-date"]=function(e,t){return sn(e,t,"-")},$n["subtract-dayTimeDuration-from-date"]=function(e,t){return un(e,t,"-")},$n["add-dayTimeDuration-to-time"]=function(e,t){var n=new _t(e.hours,e.minutes,e.seconds,e.timezone);return n.hours+=t.hours,n.minutes+=t.minutes,n.seconds+=t.seconds,wt(n)},$n["subtract-dayTimeDuration-from-time"]=function(e,t){var n=new _t(e.hours,e.minutes,e.seconds,e.timezone);return n.hours-=t.hours,n.minutes-=t.minutes,n.seconds-=t.seconds,wt(n)},$n["is-same-node"]=function(e,t){return new Xe(this.DOMAdapter.isSameNode(e,t))},$n["node-before"]=function(e,t){return new Xe(!!(4&this.DOMAdapter.compareDocumentPosition(e,t)))},$n["node-after"]=function(e,t){return new Xe(!!(2&this.DOMAdapter.compareDocumentPosition(e,t)))},$n["numeric-add"]=function(e,t){var n=e.valueOf(),r=t.valueOf(),i=In.pow(10,hn(n,r));return mn(e,t,(n*i+r*i)/i)},$n["numeric-subtract"]=function(e,t){var n=e.valueOf(),r=t.valueOf(),i=In.pow(10,hn(n,r));return mn(e,t,(n*i-r*i)/i)},$n["numeric-multiply"]=function(e,t){var n=e.valueOf(),r=t.valueOf(),i=In.pow(10,hn(n,r));return mn(e,t,n*i*(r*i)/(i*i))},$n["numeric-divide"]=function(e,t){var n=e.valueOf(),r=t.valueOf(),i=In.pow(10,hn(n,r));return mn(e,t,e*i/(t*i))},$n["numeric-integer-divide"]=function(e,t){return new At(~~(e/t))},$n["numeric-mod"]=function(e,t){var n=e.valueOf(),r=t.valueOf(),i=In.pow(10,hn(n,r));return mn(e,t,n*i%(r*i)/i)},$n["numeric-unary-plus"]=function(e){return e},$n["numeric-unary-minus"]=function(e){return e.value*=-1,e},$n["numeric-equal"]=function(e,t){return new Xe(e.valueOf()==t.valueOf())},$n["numeric-less-than"]=function(e,t){return new Xe(e.valueOf()t.valueOf())},$n["QName-equal"]=function(e,t){return new Xe(e.localName==t.localName&&e.namespaceURI==t.namespaceURI)},$n.concatenate=function(e,t){return e.concat(t)},$n.union=function(t,n){for(var r,i=[],o=0,a=t.length;os?a.pop():(a.push(o[u]),s++):"."!=o[u]&&a.push(o[u]);".."!=o[--u]&&"."!=o[u]||a.push(""),r.path=a.join("/")}return r}),o("true",[],function(){return new Xe(!0)}),o("false",[],function(){return new Xe(!1)}),o("not",[[Xt,"*"]],function(e){return new Xe(!xn(e,this))}),o("position",[],function(){return new At(this.position)}),o("last",[],function(){return new At(this.size)}),o("current-dateTime",[],function(){return this.dateTime}),o("current-date",[],function(){return Ke.cast(this.dateTime)}),o("current-time",[],function(){return _t.cast(this.dateTime)}),o("implicit-timezone",[],function(){return this.timezone}),o("default-collation",[],function(){return new bt(this.staticContext.defaultCollationName)}),o("static-base-uri",[],function(){return qe.cast(new bt(this.staticContext.baseURI||""))}),o("years-from-duration",[[st,"?"]],function(e){return gn(e,"year")}),o("months-from-duration",[[st,"?"]],function(e){return gn(e,"month")}),o("days-from-duration",[[st,"?"]],function(e){return gn(e,"day")}),o("hours-from-duration",[[st,"?"]],function(e){return gn(e,"hours")}),o("minutes-from-duration",[[st,"?"]],function(e){return gn(e,"minutes")}),o("seconds-from-duration",[[st,"?"]],function(e){return gn(e,"seconds")}),o("year-from-dateTime",[[Ze,"?"]],function(e){return vn(e,"year")}),o("month-from-dateTime",[[Ze,"?"]],function(e){return vn(e,"month")}),o("day-from-dateTime",[[Ze,"?"]],function(e){return vn(e,"day")}),o("hours-from-dateTime",[[Ze,"?"]],function(e){return vn(e,"hours")}),o("minutes-from-dateTime",[[Ze,"?"]],function(e){return vn(e,"minutes")}),o("seconds-from-dateTime",[[Ze,"?"]],function(e){return vn(e,"seconds")}),o("timezone-from-dateTime",[[Ze,"?"]],function(e){return vn(e,"timezone")}),o("year-from-date",[[Ke,"?"]],function(e){return vn(e,"year")}),o("month-from-date",[[Ke,"?"]],function(e){return vn(e,"month")}),o("day-from-date",[[Ke,"?"]],function(e){return vn(e,"day")}),o("timezone-from-date",[[Ke,"?"]],function(e){return vn(e,"timezone")}),o("hours-from-time",[[_t,"?"]],function(e){return vn(e,"hours")}),o("minutes-from-time",[[_t,"?"]],function(e){return vn(e,"minutes")}),o("seconds-from-time",[[_t,"?"]],function(e){return vn(e,"seconds")}),o("timezone-from-time",[[_t,"?"]],function(e){return vn(e,"timezone")}),o("adjust-dateTime-to-timezone",[[Ze,"?"],[Tt,"?",!0]],function(e,t){return yn(e,arguments.length>1&&null!=t?arguments.length>1?t:this.timezone:null)}),o("adjust-date-to-timezone",[[Ke,"?"],[Tt,"?",!0]],function(e,t){return yn(e,arguments.length>1&&null!=t?arguments.length>1?t:this.timezone:null)}),o("adjust-time-to-timezone",[[_t,"?"],[Tt,"?",!0]],function(e,t){return yn(e,arguments.length>1&&null!=t?arguments.length>1?t:this.timezone:null)}),o("name",[[Kt,"?",!0]],function(t){if(arguments.length){if(null==t)return new bt("")}else{if(!this.DOMAdapter.isNode(this.item))throw new e("XPTY0004","name() function called when the context item is not a node");t=this.item}var n=Hn["node-name"].call(this,t);return new bt(null==n?"":n.toString())}),o("local-name",[[Kt,"?",!0]],function(t){if(arguments.length){if(null==t)return new bt("")}else{if(!this.DOMAdapter.isNode(this.item))throw new e("XPTY0004","local-name() function called when the context item is not a node");t=this.item}return new bt(this.DOMAdapter.getProperty(t,"localName")||"")});o("namespace-uri",[[Kt,"?",!0]],function(t){if(arguments.length){if(null==t)return qe.cast(new bt(""))}else{if(!this.DOMAdapter.isNode(this.item))throw new e("XPTY0004","namespace-uri() function called when the context item is not a node");t=this.item}return qe.cast(new bt(this.DOMAdapter.getProperty(t,"namespaceURI")||""))});o("number",[[He,"?",!0]],function(t){if(!arguments.length){if(!this.item)throw new e("XPDY0002");t=bn([this.item],this)[0]}var n=new at(jn);if(null!=t)try{n=at.cast(t)}catch(e){}return n}),o("lang",[[bt,"?"],[Kt,"",!0]],function(t,n){if(arguments.length<2){if(!this.DOMAdapter.isNode(this.item))throw new e("XPTY0004","lang() function called when the context item is not a node");n=this.item}var r=this.DOMAdapter.getProperty;2==r(n,"nodeType")&&(n=r(n,"ownerElement"));for(var i;n;n=r(n,"parentNode"))if(i=r(n,"attributes"))for(var o=0,a=i.length;o1?t.valueOf():0;if(n<0){var r=new At(In.pow(10,-n)),i=In.round($n["numeric-divide"].call(this,e,r)),o=new At(i);return nDecimal=In.abs($n["numeric-subtract"].call(this,o,$n["numeric-divide"].call(this,e,r))),$n["numeric-multiply"].call(this,$n["numeric-add"].call(this,o,new ot(.5==nDecimal&&i%2?-1:0)),r)}var r=new At(In.pow(10,n)),i=In.round($n["numeric-multiply"].call(this,e,r)),o=new At(i);return nDecimal=In.abs($n["numeric-subtract"].call(this,o,$n["numeric-multiply"].call(this,e,r))),$n["numeric-divide"].call(this,$n["numeric-add"].call(this,o,new ot(.5==nDecimal&&i%2?-1:0)),r)}),o("resolve-QName",[[bt,"?"],[en]],function(t,n){if(null==t)return null;var r=t.valueOf(),i=r.match(Sr);if(!i)throw new e("FOCA0002","Invalid QName '"+r+"'");var o=i[1]||null,a=i[2],s=this.DOMAdapter.lookupNamespaceURI(n,o);if(null!=o&&!s)throw new e("FONS0004","Namespace prefix '"+o+"' has not been declared");return new xt(o,a,s||null)}),o("QName",[[bt,"?"],[bt]],function(t,n){var r=n.valueOf(),i=r.match(Sr);if(!i)throw new e("FOCA0002","Invalid QName '"+r+"'");return new xt(i[1]||null,i[2]||null,null==t?"":t.valueOf())}),o("prefix-from-QName",[[xt,"?"]],function(e){return null!=e&&e.prefix?new Qt(e.prefix):null}),o("local-name-from-QName",[[xt,"?"]],function(e){return null==e?null:new Qt(e.localName)}),o("namespace-uri-from-QName",[[xt,"?"]],function(e){return null==e?null:qe.cast(new bt(e.namespaceURI||""))}),o("namespace-uri-for-prefix",[[bt,"?"],[en]],function(e,t){var n=null==e?"":e.valueOf(),r=this.DOMAdapter.lookupNamespaceURI(t,n||null);return null==r?null:qe.cast(new bt(r))}),o("in-scope-prefixes",[[en]],function(e){throw"Function 'in-scope-prefixes' not implemented"}),o("boolean",[[Xt,"*"]],function(e){return new Xe(xn(e,this))}),o("index-of",[[He,"*"],[He],[bt,"",!0]],function(e,t,n){if(!e.length||null==t)return[];var r=t;r instanceof Et&&(r=bt.cast(r));for(var i,o=[],a=0,s=e.length;ar&&(i=r+1);for(var o=[],a=0;an)return e;for(var i=[],o=0;o2?In.round(n):e.length-r+1;return e.slice(r-1,r-1+i)}),o("unordered",[[Xt,"*"]],function(e){return e}),o("zero-or-one",[[Xt,"*"]],function(t){if(t.length>1)throw new e("FORG0003");return t}),o("one-or-more",[[Xt,"*"]],function(t){if(!t.length)throw new e("FORG0004");return t}),o("exactly-one",[[Xt,"*"]],function(t){if(1!=t.length)throw new e("FORG0005");return t}),o("deep-equal",[[Xt,"*"],[Xt,"*"],[bt,"",!0]],function(e,t,n){ throw"Function 'deep-equal' not implemented"}),o("count",[[Xt,"*"]],function(e){return new At(e.length)}),o("avg",[[He,"*"]],function(t){if(!t.length)return null;try{var n=t[0];n instanceof Et&&(n=at.cast(n));for(var r,i=1,o=t.length;i1?n:new at(0);try{var r=t[0];r instanceof Et&&(r=at.cast(r));for(var i,o=1,a=t.length;o2&&(o=r.valueOf()),i=o==Un+"/collation/codepoint"?Pr:this.staticContext.getCollation(o),!i)throw new e("FOCH0002","Unknown collation {"+o+"}");return new At(i.compare(t.valueOf(),n.valueOf()))}),o("codepoint-equal",[[bt,"?"],[bt,"?"]],function(e,t){return null==e||null==t?null:new Xe(e.valueOf()==t.valueOf())}),o("concat",null,function(){if(arguments.length<2)throw new e("XPST0017","Function concat() must have at least 2 arguments");for(var t,n=[],r=0,i=arguments.length;r2?i+In.round(n):r.length;return new bt(o>i?r.substring(i,o):"")}),o("string-length",[[bt,"?",!0]],function(t){if(!arguments.length){if(!this.item)throw new e("XPDY0002");t=bt.cast(bn([this.item],this)[0])}return new At(null==t?0:t.valueOf().length)}),o("normalize-space",[[bt,"?",!0]],function(t){if(!arguments.length){if(!this.item)throw new e("XPDY0002");t=bt.cast(bn([this.item],this)[0])}return new bt(null==t?"":Ln(t).replace(/\s\s+/g," "))}),o("normalize-unicode",[[bt,"?"],[bt,"",!0]],function(e,t){throw"Function 'normalize-unicode' not implemented"}),o("upper-case",[[bt,"?"]],function(e){return new bt(null==e?"":e.valueOf().toUpperCase())}),o("lower-case",[[bt,"?"]],function(e){return new bt(null==e?"":e.valueOf().toLowerCase())}),o("translate",[[bt,"?"],[bt],[bt]],function(e,t,n){if(null==e)return new bt("");for(var r,i=e.valueOf().split(""),o=t.valueOf().split(""),a=n.valueOf().split(""),s=a.length,u=[],c=0,l=i.length;c126)&&(n[r]=window.encodeURIComponent(n[r]));return new bt(n.join(""))}),o("contains",[[bt,"?"],[bt,"?"],[bt,"",!0]],function(e,t,n){return new Xe((null==e?"":e.valueOf()).indexOf(null==t?"":t.valueOf())>=0)}),o("starts-with",[[bt,"?"],[bt,"?"],[bt,"",!0]],function(e,t,n){return new Xe(0==(null==e?"":e.valueOf()).indexOf(null==t?"":t.valueOf()))}),o("ends-with",[[bt,"?"],[bt,"?"],[bt,"",!0]],function(e,t,n){var r=null==e?"":e.valueOf(),i=null==t?"":t.valueOf();return new Xe(r.indexOf(i)==r.length-i.length)}),o("substring-before",[[bt,"?"],[bt,"?"],[bt,"",!0]],function(e,t,n){var r,i=null==e?"":e.valueOf(),o=null==t?"":t.valueOf();return new bt((r=i.indexOf(o))>=0?i.substring(0,r):"")}),o("substring-after",[[bt,"?"],[bt,"?"],[bt,"",!0]],function(e,t,n){var r,i=null==e?"":e.valueOf(),o=null==t?"":t.valueOf();return new bt((r=i.indexOf(o))>=0?i.substring(r+o.length):"")}),o("matches",[[bt,"?"],[bt],[bt,"",!0]],function(e,t,n){var r=null==e?"":e.valueOf(),i=wn(t.valueOf(),arguments.length>2?n.valueOf():"");return new Xe(i.test(r))}),o("replace",[[bt,"?"],[bt],[bt],[bt,"",!0]],function(e,t,n,r){var i=null==e?"":e.valueOf(),o=wn(t.valueOf(),arguments.length>3?r.valueOf():"");return new Xe(i.replace(o,n.valueOf()))}),o("tokenize",[[bt,"?"],[bt],[bt,"",!0]],function(e,t,n){for(var r=null==e?"":e.valueOf(),i=wn(t.valueOf(),arguments.length>2?n.valueOf():""),o=[],a=0,s=r.split(i),u=s.length;at?1:-1};var kr=function(){};kr.prototype.nodeType=2,kr.prototype.nodeName=kr.prototype.nodeValue=kr.prototype.ownerDocument=kr.prototype.localName=kr.prototype.namespaceURI=kr.prototype.prefix=kr.prototype.attributes=kr.prototype.childNodes=kr.prototype.firstChild=kr.prototype.lastChild=kr.prototype.previousSibling=kr.prototype.nextSibling=kr.prototype.parentNode=kr.prototype.name=kr.prototype.specified=kr.prototype.value=kr.prototype.ownerElement=null,En.prototype=new n;var Ir=new i;En.prototype.getProperty=function(e,t){if(t in e)return e[t];if("baseURI"==t){for(var n,r="",i=Ir.getFunction("{http://www.w3.org/2005/xpath-functions}resolve-uri"),o=Ir.getDataType("{http://www.w3.org/2001/XMLSchema}string"),a=e;a;a=a.parentNode)1==a.nodeType&&(n=a.getAttribute("xml:base"))&&(r=i(new o(n),new o(r)).toString());return r}if("textContent"==t){var s=[];return function(e){for(var t,n=0;t=e.childNodes[n];n++)3==t.nodeType||4==t.nodeType?s.push(t.data):1==t.nodeType&&t.firstChild&&arguments.callee(t)}(e),s.join("")}},En.prototype.compareDocumentPosition=function(e,t){if("compareDocumentPosition"in e)return e.compareDocumentPosition(t);if(t==e)return 0;var n,r,i,o,a,s=null,u=null;if(2==e.nodeType&&(s=e,e=this.getProperty(s,"ownerElement")),2==t.nodeType&&(u=t,t=this.getProperty(u,"ownerElement")),s&&u&&e&&e==t)for(o=0,n=this.getProperty(e,"attributes"),a=n.length;o([\s\S]*?)\0)var a=o[0].textContent;if(!a){var s=t.firstElementChild(i),u=t.getChildByTagName(s,"artifactId");if(!u){var c=e+" - "+n.context.i18n.getText("i18n","LibraryDiscovery_WSP_NoLibraryNamespace");return new Error(c)}a=u.textContent}return"/"+a.split(".").join("/")}):i})})},isLibraryProject:function(e){var t=this;return t.context.service.document.getDocumentByPath(e).then(function(e){return t.context.service.projectType.getProjectTypes(e).then(function(e){for(var t=0;t0?i._filterHCPLibraries(u,o,e,t):[]})})},getLibraryFromHCP:function(e,t){for(var n=0;n-1&&"2.0"===t})})}),this.context.service.selection.isOwner(this.context.service.repositorybrowser)]).spread(function(e,t){return e&&t})}}),define("sap.watt.toolsets.mockdatamodeler/service/MockDataModeler",["sap/watt/platform/plugin/platform/service/ui/AbstractPart"],function(e){"use strict";var t=e.extend("sap.watt.common.plugin.mockdatamodeler.service.MockDataModeler",{_oMainDialogfragment:null,_oComplexTypefragment:null,_oMetadata:null,_oDocument:null,getFocusElement:function(){return this.getContent()},configure:function(e){this._aStyles=e.styles,this._aStyles&&this.context.service.resource.includeStyles(this._aStyles).done()},init:function(e){this._oMainDialogfragment=sap.ui.jsfragment("sap.watt.saptoolsets.fiori.common.plugin.mockdatamodeler.ui.MockDataModeler",this),this._oComplexTypefragment=sap.ui.jsfragment("sap.watt.saptoolsets.fiori.common.plugin.mockdatamodeler.ui.ComplexTypeMockData",this);var t={entitySets:[],mockData:[],selectedEntitySet:"",isInputValid:!0,inputViolations:0,validationText:"",isDeleteEnabled:!1,isDirty:!1,skip:"",isUseAsMockDataSource:!0};this._oMainDialogfragment.setModel(new sap.ui.model.json.JSONModel(t)),t={complexMockData:[],selectedBindingContext:null,selectedComplexName:null,isInputValid:!0,inputViolations:0,validationText:""},this._oComplexTypefragment.setModel(new sap.ui.model.json.JSONModel(t)),this.context.i18n.applyTo([this._oMainDialogfragment,this._oComplexTypefragment]),jQuery.sap.require("sap.ui.core.format.DateFormat");var n=sap.ui.getCore().getConfiguration().getLocale(),r=sap.ui.core.format.DateFormat.getDateInstance(n),i=!1;jQuery.sap.require("sap.ui.model.type.DateTime"),sap.ui.model.type.DateTime.extend("my.model.types.JsonDateTime",{formatValue:function(e){var t;if(e){if(!/\/Date\([0-9]+\)\//.test(e))throw new sap.ui.model.FormatException;return t=new Date(parseInt(e.substr(6),10)),r.format(t,i)}},parseValue:function(e){if(!e)return"";var t=new Date(e);if(isNaN(t.getTime()))throw new sap.ui.model.ValidateException;return"/Date("+t.getTime()+")/"},validateValue:function(e){if(!e)return!0;if(!/\/Date\([0-9]+\)\//.test(e))throw new sap.ui.model.ValidateException}})},getContent:function(){return this._oMainDialogfragment},close:function(){var e=this,t=this._oMainDialogfragment.getModel(),n=t.getProperty("/isDirty");n?this.context.service.usernotification.confirm(e.context.i18n.getText("i18n","CONFIRM_CANCEL")).then(function(t){t.bResult&&e._oMainDialogfragment.close()}).done():e._oMainDialogfragment.close()},open:function(e){var t=this;this._oMainDialogfragment.getModel().setProperty("/mockData",[]),this._oMainDialogfragment.getModel().setProperty("/isDirty",!1),this._oMainDialogfragment.getModel().setProperty("/isUseAsMockDataSource",!0),this._oMainDialogfragment.getModel().setProperty("/isInputValid",!0),this._oMainDialogfragment.getModel().setProperty("/validationText",""),this._oMainDialogfragment.getModel().setProperty("/inputViolations",0),this._oDocument=e;var n=t._checkAppType(t._oDocument.getEntity().getParentPath());return this.context.service.usagemonitoring.report("mockDataEditor","opened").done(),this.context.service.odataProvider.getMetadataFromWorkspace(e).then(function(e){return t._oMetadata=e,t._oMainDialogfragment.getModel().setProperty("/appType",n),t.context.service.odataProvider.getEntitySets(t._oMetadata).then(function(e){return 0===e.length?void t.context.service.usernotification.alert(t.context.i18n.getText("i18n","ERROR_MSG_PROP")).done():(t._oMainDialogfragment.getModel().setProperty("/entitySets",e),void t._oMainDialogfragment.open())})}).fail(function(e){e.message.indexOf("This page contains the following errors:")!==-1?t.context.service.usernotification.alert(t.context.i18n.getText("i18n","ERROR_MSG_METAFILE")).done():t.context.service.usernotification.alert(t.context.i18n.getText("i18n","ERROR_MSG_META")).done()}).done()},onEntitySetSelection:function(e){var t=this,n=e.getParameter("rowIndex"),r=t._oMainDialogfragment.getModel(),i=r.getProperty("/entitySets")[n],o=r.getProperty("/appType");r.setProperty("/selectedEntitySet",i),r.setProperty("/skip",0),r.setProperty("/validationText",""),r.setProperty("/isInputValid",!0);var a=sap.ui.getCore().byId("mockdataTable");return this.context.service.odataProvider.getProperties(this._oMetadata,i,!1).then(function(e){t.setMockDataColumns(e,sap.ui.getCore().byId("mockdataTable"));var n=o?"/mockdata/":"/",s=t._oDocument.getEntity().getParentPath()+n+i.name+".json",u=r.getProperty("/mockData/"+i.name);return u&&0===u.length&&r.setProperty("/mockData/"+i.name,null),Q(r.getProperty("/mockData")[i.name]?null:t.context.service.filesystem.documentProvider.getDocument(s).then(function(e){if(e)return e.getContent().then(function(e){try{var n=JSON.parse(e)}catch(e){throw r.setProperty("/validationText",t.context.i18n.getText("i18n","JSON_PARSE_ERROR")),r.setProperty("/isInputValid",!1),e}n.d?n.d.results&&r.setProperty("/mockData/"+i.name,n.d.results):r.setProperty("/mockData/"+i.name,n)});var n=i.entityType;return s=t._oDocument.getEntity().getParentPath()+"/"+n.substring(n.lastIndexOf(".")+1)+".json",t.context.service.filesystem.documentProvider.getDocument(s).then(function(e){return e?e.getContent().then(function(e){try{var n=JSON.parse(e)}catch(e){throw r.setProperty("/validationText",t.context.i18n.getText("i18n","JSON_PARSE_ERROR")),r.setProperty("/isInputValid",!1),e}n.d?n.d.results&&r.setProperty("/mockData/"+i.name,n.d.results):r.setProperty("/mockData/"+i.name,n)}):void r.setProperty("/mockData/"+i.name,[])})})).then(function(){}).fail(function(e){r.setProperty("/mockData/"+i.name,[])}).fin(function(){a.bindRows("/mockData/"+i.name),a.clearSelection()}).done()}).fail(function(e){t.context.service.usernotification.alert(t.context.i18n.getText("i18n","ERROR_MSG_PROP")).done(),t._oMainDialogfragment.close()}).done()},setMockDataColumns:function(e,t){var n,r=this;t.destroyColumns();for(var i=0;iCELL_PLACEHOLDER}", change:function(){r._oMainDialogfragment.getModel().setProperty("/isDirty",!0)}}),0!==u.indexOf("Edm."))n=new sap.ui.commons.Link({text:"{i18n>COMPLEX_LINK_TEXT}",press:[this.onEditComplexMockData,this]}),n.data("complex",{name:a,properties:e[i].properties});else{switch(u){case"Edm.Int16":case"Edm.Int32":case"Edm.Int64":n.bindProperty("value",{path:a,type:new sap.ui.model.type.Integer}),n.attachChange(function(e){var n=e.getParameter("newValue"),i=t.getModel().getProperty("/inputViolations");isNaN(n)?(e.getSource().setValueState("Error"),i++):(e.getSource().setValueState(sap.ui.core.ValueState.None),0!==i&&i--),0===i?t.getModel().setProperty("/validationText",""):t.getModel().setProperty("/validationText",r.context.i18n.getText("i18n","INVALID_VALUE_FORMAT")),t.getModel().setProperty("/inputViolations",i),t.getModel().setProperty("/isInputValid",0===i)});break;case"Edm.Decimal":case"Edm.Single":n.bindProperty("value",{path:a,type:new sap.ui.model.type.Float}),n.attachChange(function(e){var n=e.getParameter("newValue");n=n.replace(/,/g,""),n=n.replace(/\./g,"");var i=t.getModel().getProperty("/inputViolations");isNaN(n)?(e.getSource().setValueState("Error"),i++):(e.getSource().setValueState(sap.ui.core.ValueState.None),0!==i&&i--),0===i?t.getModel().setProperty("/validationText",""):t.getModel().setProperty("/validationText",r.context.i18n.getText("i18n","INVALID_VALUE_FORMAT")),t.getModel().setProperty("/inputViolations",i),t.getModel().setProperty("/isInputValid",0===i)}),n.attachFormatError(function(e){r.onFormatError(e,t)});break;case"Edm.DateTime":case"Edm.Date":n=(new sap.ui.commons.DatePicker).addStyleClass("mockdataDatePicker"),n.attachChange(function(e){var n=t.getModel().getProperty("/inputViolations");e.getParameter("invalidValue")?(e.oSource.setValueState(sap.ui.core.ValueState.Error),n++):(e.oSource.setValueState(sap.ui.core.ValueState.None),0!==n&&n--),0===n?t.getModel().setProperty("/validationText",""):t.getModel().setProperty("/validationText",r.context.i18n.getText("i18n","INVALID_VALUE_FORMAT")),t.getModel().setProperty("/isInputValid",0===n),t.getModel().setProperty("/inputViolations",n),r._oMainDialogfragment.getModel().setProperty("/isDirty",!0)}).bindProperty("value",{path:a,type:new my.model.types.JsonDateTime}),n.attachFormatError(function(e){r.onFormatError(e,t)});break;case"Edm.Boolean":n=new sap.ui.commons.ToggleButton({pressed:{path:a,type:new sap.ui.model.type.Boolean},text:{path:a},tooltip:{path:a,formatter:function(e){return e?e.toString():e}}}).addStyleClass("riverSwitch"),n.attachPress(function(e){this.rerender(),r._oMainDialogfragment.getModel().setProperty("/isDirty",!0)});break;default:n.bindProperty("value",a)}u=/^Edm\.(.*)/.exec(u)[1]}t.addColumn(new sap.ui.table.Column({label:new sap.ui.commons.Label({text:a+" ("+u+")",tooltip:r.context.i18n.getText("i18n","COLUMN_TOOLTIP",[a,u])}),template:n,width:"170px"}))}},onAddMockData:function(e){var t=this._oMainDialogfragment.getModel(),n=t.getProperty("/mockData/"+t.getProperty("/selectedEntitySet").name);n.push({}),t.setProperty("/mockData/"+t.getProperty("/selectedEntitySet").name,n);var r=sap.ui.getCore().byId("mockdataTable");n.length-10;o--)i.splice(r[o-1],1);t.setProperty("/mockData/"+t.getProperty("/selectedEntitySet").name,i),t.setProperty("/isDirty",!0),n.clearSelection()},onRowSelection:function(e){var t=e.getSource(),n=t.getModel();n.setProperty("/isDeleteEnabled",t.getSelectedIndex()!==-1)},onGenerateMockData:function(e){var t=this._oMainDialogfragment.getModel(),n=t.getProperty("/selectedEntitySet").name,r=parseInt(t.getProperty("/skip"),10);jQuery.sap.require("sap.ui.core.util.MockServer");var i=new sap.ui.core.util.MockServer({rootUri:""});this._oDocument.getContent().then(function(e){sap.ui.core.util.MockServer.prototype._loadMetadata=function(e){return i._oMetadata=jQuery.sap.parseXML(e),i._oMetadata},i.simulate(e),i.start(),t.setProperty("/skip",r+10);var o=jQuery.sap.sjax({url:n+"?$top=10&$skip="+r,dataType:"json"}),a=t.getProperty("/mockData/"+n);a=a?a:[],o.success&&(a=a.concat(o.data.d.results),t.setProperty("/isDirty",!0)),t.setProperty("/mockData/"+n,a),sap.ui.core.util.MockServer.destroyAll()}).done()},onSaveMockData:function(e){var t=this,n=this._oMainDialogfragment.getModel(),r=n.getProperty("/appType"),i="";t._oMainDialogfragment.close();var o=this._oDocument.getEntity().getParentPath();return this.context.service.usagemonitoring.report("mockDataEditor","saved").done(),this.context.service.filesystem.documentProvider.getDocument(o).then(function(e){var o=[],a=Object.keys(n.getProperty("/mockData"));return Q(n.getProperty("/isDirty")&&r?t._createMockFolder(e):null).then(function(){i=n.getProperty("/mockdataobject");for(var r=0;r1){for(var s=0;s0?e.versions[0].version:e.version,controlName:e.controls&&e.controls.length>0?e.controls[0].name:null,isManifest:e.isManifest}},u=function(e){var t=this;return t.context.service.filesystem.documentProvider.getDocument(e).then(function(e){return t.context.service.setting.project.getProjectSettings("appparams",e).then(function(n){var r={paramName:"sap-ui-xx-lesssupport",paramValue:"true",paramActive:!0};if(n){var i;for(i=0;i0)return e[0]}).fail(function(e){r.context.service.log.error(e.message)})},onAfterGeneration:function(e){var t=e.params.model,n=e.params.selectedTemplate;if(!t.isSmartExtensionProject&&"ui5template.smarttemplate"===n.getId()){var r=this.context.service,i=e.params.targetDocument,o={layer:this.VENDOR};return r.setting.project.setProjectSettings(this.UIADAPTATION,o,i)}},writeToI18n:function(t,n,r){var i=[];if(e.isEmpty(n))return null;r||(r="XTIT");for(var o=0;o-1){if(!o){var p=s.context.i18n.getText("i18n","smartTemplateHelper_FacetIdIsNull");return this.context.service.log.error("SmartTemplateHelper",p,["user"]).done(),null}a=n+"|"+r+"|"+o,l.content[a]=i}return u.addExtension(e,l.extensionType,l.view,l.content,!0).fail(function(e){s._handleOverwriteException(e)})},_handleOverwriteException:function(e){if("ExtensionExistInHandler"===e.name){var t=this.context.i18n.getText("i18n","overwrite_message");throw new Error(t)}throw e},createNewControllerExtensionEntry:function(e,t,n){var r=this,i=this.context.service.ui5projecthandler;return i.getAllExtensions(e).then(function(o){if(o){var a=r._getExtensionObject(o[r.CONTROLLEREXTENSIONTYPE]),s=r._getExtensionObject(a[t]);return s.controllerName=n,i.addExtension(e,r.CONTROLLEREXTENSIONTYPE,t,s,!0).fail(function(e){r._handleOverwriteException(e)})}})},getFacetsPerEntitySet:function(e,t){return this._getExtensionPerEntitySetByType(e,t,this.FACET)},getSmartTableIDPerEntitySet:function(e,t){return this._getExtensionPerEntitySetByType(e,t,this.SMARTTABLEID)},_getExtensionPerEntitySetByType:function(t,n,r){var i=this;return e.isEmpty(n)||e.isEmpty(t)?[]:this.context.service.annotation.getMetaModelByDocument(t).then(function(o){return e.isEmpty(o)?[]:i._getArrayOfEntitysetsWithFacets(t,o,n,r)}).fail(function(e){var t=i.context.i18n.getText("i18n","smartTemplateHelper_FailedGetFacetsMsg");return e&&e.message&&(t=e.message),i.context.service.log.error("SmartTemplateHelper",t,["user"]).done(),[]})},_getI18nDocument:function(e,t){var n=this;return e.getCurrentMetadata(!0).then(function(e){for(var r=0;r-1&&i===this.FACET)p=this._createExtensionPointObject(i,c[l].ID.String,o),a.push(p);else if(c[l].RecordType.indexOf("ReferenceFacet")>-1){if(c[l].ID&&c[l].ID.String)p=this._createExtensionPointObject(i,c[l].ID.String,o);else if(!e.isEmpty(c[l].Target)&&!e.isEmpty(c[l].Target.AnnotationPath)){var f=c[l].Target.AnnotationPath;(i===this.FACET||i===this.SMARTTABLEID&&f.indexOf("LineItem")>-1)&&(f=f.replace("@","").replace("/","::").replace("#","::"),p=this._createExtensionPointObject(i,f,o))}a.push(p)}}return a},_createExtensionPointObject:function(e,t,n){return e===this.FACET?{facetId:t,label:n}:e===this.SMARTTABLEID?{smartTableID:t,label:n}:void 0},_getFacetLabel:function(e,t){var n="i18n>",r=e.indexOf(n);if(r>-1){var i=e.indexOf("}");e=e.substr(r+n.length,i-r-n.length),e=this.context.i18n.getText(t,e)}return e},_isPagesObject:function(e){return!Array.isArray(e)},validateOnSelection:function(e,t){var n=this;return this.context.service.ui5projecthandler.getAttribute(e,"sap.ui.generic.app").then(function(e){if(e){var r=e.pages[Object.keys(e.pages)[0]];return r&&n._isPagesObject(e.pages)?n._searchTemplateInPagesAsObject(r,t):n._searchTemplateInPages(e.pages,t)}var i=new Error;throw i.name="TemplateDoesNotExist",i})},_searchTemplateInPagesAsObject:function(e,t){if(e){if(e.component&&e.component.name===t)return!0;var n=e.pages?Object.keys(e.pages):[];if(n.length&&n.length>0)return this._searchTemplateInPagesAsObject(e.pages[Object.keys(e.pages)[0]],t)}var r=new Error;throw r.name="TemplateDoesNotExist",r},_searchTemplateInPages:function(e,t){if(e)for(var n=0;n-1){var o={name:t.entitySet};r.push(o)}t.pages&&(this._isPagesObject(t.pages)?this._getEntitySetsFromPage(t.pages[Object.keys(t.pages)[0]],n,r):this._getEntitySetsFromPage(e.head(t.pages),n,r))}},getAllExtensionPoints:function(t){var n,r=this;return t&&(t.toLowerCase().indexOf("objectpage")>-1?n="/smartTemplateGeneration/ObjectPage/view/Details.view.xml":t.toLowerCase().indexOf("listreport")>-1&&(n="/smartTemplateGeneration/ListReport/view/ListReport.view.xml")),this._callAjax(n,"GET","text").then(function(t){var n=[],i=(new DOMParser).parseFromString(t,"text/xml");try{var o=jQuery(i).xpath("//*:ExtensionPoint")}catch(e){r.context.service.log.error("SmartTemplateHelper",e.message,["user"]).done()}if(!e.isEmpty(o))for(var a=0;a-1&&(u=u.substring(0,c)),n.push({name:u})}return n})},_getExtensionObject:function(e){return e||(e={}),e},_createNewActionName:function(e,t,n){var r=!1,i=1,o=this.ACTION+t;for(n&&(o+=n);!r;){var a=e[o+i];a?i++:r=!0}return o+i},_createNewAction:function(e,t){var n="onClick",r="button",i="{@i18n>"+t+"}";return e[t]={id:t+r,text:i,press:n+t},e},_getEntityViewInControllerExtensions:function(e,t,n,r){var i=this,o=this.context.service.ui5projecthandler;return o.getAllExtensions(e).then(function(e){var o=i._getExtensionObject(e[i.CONTROLLEREXTENSIONTYPE]),a=i._getExtensionObject(o[t]);return a.controllerName=r,a[i.GENERICAPP]=i._getExtensionObject(a[i.GENERICAPP]),a[i.GENERICAPP][n]=i._getExtensionObject(a[i.GENERICAPP][n]),a[i.GENERICAPP][n].EntitySet=n,a})},addAction:function(e,t,n,r,i,o){var a=this;if(!n){var s=new Error("No entity set name");throw s.name="missingParamForaddAction",s}if(!r){var s=new Error("No controller name");throw s.name="missingParamForaddAction",s}return this._getEntityViewInControllerExtensions(e,t,n,r).then(function(r){var s,u,c=a.context.service.ui5projecthandler,l=r[a.GENERICAPP][n];return i?(i=i.toLowerCase(),i===a.HEADERACTIONPOSITION.toLowerCase()?(l[a.HEADERACTIONPOSITION]=a._getExtensionObject(l[a.HEADERACTIONPOSITION]),s=l[a.HEADERACTIONPOSITION].Actions,s=a._getExtensionObject(s),u=a._createNewActionName(s,n,a.HEADERACTIONPOSITION),r[a.GENERICAPP][n][a.HEADERACTIONPOSITION].Actions=a._createNewAction(s,u)):i===a.SECTIONSACTIONPOSITION.toLowerCase()&&o&&(l[a.SECTIONSACTIONPOSITION]=a._getExtensionObject(l[a.SECTIONSACTIONPOSITION]),l[a.SECTIONSACTIONPOSITION][o]=a._getExtensionObject(l[a.SECTIONSACTIONPOSITION][o]),l[a.SECTIONSACTIONPOSITION][o].id=o,s=l[a.SECTIONSACTIONPOSITION][o].Actions,s=a._getExtensionObject(s),u=a._createNewActionName(s,n,a.SECTIONSACTIONPOSITION),r[a.GENERICAPP][n][a.SECTIONSACTIONPOSITION][o].Actions=a._createNewAction(s,u))):(s=r[a.GENERICAPP][n].Actions,s=a._getExtensionObject(s),u=a._createNewActionName(s,n),r[a.GENERICAPP][n].Actions=a._createNewAction(s,u)),c.addExtension(e,a.CONTROLLEREXTENSIONTYPE,t,r,!0).then(function(){return u}).fail(function(e){a._handleOverwriteException(e)})})}}}),define("sap.watt.saptoolsets.fiori.project.ui5template/service/SmartExtension",{onAfterGeneration:function(e){var t=this;if(("ui5template.objectpageextension"===e.params.selectedTemplate.getId()||"ui5template.listreportextension"===e.params.selectedTemplate.getId())&&e.params.model.sViewFile)return this.context.service.filesystem.documentProvider.getDocument(e.params.model.sViewFile).then(function(e){return t.context.service.repositorybrowser.setSelection(e,!0)})}}),define("sap.watt.saptoolsets.fiori.project.ui5template/smartExtensions/service/SmartExtensionStep",{getContent:function(){jQuery.sap.require("sap.watt.saptoolsets.fiori.project.ui5template.smartExtensions.ui.wizard.SmartExtensionStep");var e=new sap.watt.saptoolsets.fiori.project.ui5template.smartExtensions.ui.wizard.SmartExtensionStep({context:this.context}),t=this.context.i18n.getText("objectPageExtensionStep_title");return this.context.service.wizard.createWizardStep(e,t,"")}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/manager/ComponentManager",[],function(){var e=function(e){var t=this;this.customizationFileName="ComponentCustomizing.json",this.customizingJson=null;var n=function(e){if(e.fiori.extensionCommon.extensionFilePath){var t=e.fiori.extensionCommon.extensionFilePath.replace(e.extensionResourceLocationPath,"");return t=e.extensionProjectNamespace+"."+t,t=t.replace(/\//gm,".")}return""};this.getResourceOutputPath=function(e,t){var n=null,r=e.fiori.extensionCommon.resourceLocationPath,i=e.fiori.extensionCommon.resourceName;if(!i)return r+t;var o=e.fiori.extensionCommon.resourceSuffix;return n=o?e.fiori.extensionCommon.extensionFilePath+o:e.fiori.extensionCommon.extensionFilePath},this.onBeforeTemplateGenerate=function(r,i){return e.service.extensionproject.getExtensionRevision(i).then(function(){return i.fiori.extensionCommon.extensionResourceId=n(i),e.service.filesystem.documentProvider.getDocument(i.extensionProjectPath).then(function(n){return e.service.ui5projecthandler.getHandlerDocument(n).then(function(o){return i.extensionHandlerPath=o.getEntity().getFullPath(),e.service.ui5projecthandler.getAllExtensions(n).then(function(e){return t.customizingJson=e,[r,i]})})})})},this.getFileContentFromZip=function(e){var n="{}",r=e.files[t.customizationFileName];return r&&(n=r.asText()),n},this.onAfterGenerateCommon=function(e,t){t.extensionShouldOpenFiles=!0,r(e,t)},this.onAfterGenerateUpdates=function(e,n){var r=t.getFileContentFromZip(e),i=JSON.parse(r),o=Object.keys(i)[0];if(t.customizingJson[o])if(n.fiori.extensionCommon.resourceId){var a=Object.keys(i[o])[0];if(t.customizingJson[o][a]){if("string"!=typeof i[o][a]){var s=Object.keys(i[o][a])[0];s&&(t.customizingJson[o][a][s]=i[o][a][s])}}else t.customizingJson[o][a]=i[o][a]}else t.customizingJson[o]=i[o];else t.customizingJson[o]=i[o];return t.onAfterGenerateCommon(e,n),o},this.onAfterGenerate=function(n,r){var i=this.onAfterGenerateUpdates(n,r);return e.service.filesystem.documentProvider.getDocument(r.extensionProjectPath).then(function(o){i||(i=r.fiori.extensionCommon.customizationId); var a=r.fiori.extensionCommon.resourceId,s=t.customizingJson[i];return e.service.ui5projecthandler.addExtension(o,i,a,s[a],!0).then(function(){return[n,r]})})};var r=function(e,n){e.remove(t.customizationFileName);for(var r in e.files){var i=t.getResourceOutputPath(n,r);e.file(i,e.files[r].asBinary()),e.remove(e.files[r].name)}}};return e.generatedEventHandler=function(e,t,n){var r=e.params.model;return r.extensionShouldOpenFiles?t.isExtensibilityOpen().then(function(e){if(!e)return n.openDocument(r.extensionProjectPath,r.fiori.extensionCommon,r.fiori.extensionCommon.resourceId,r.fiori.extensionCommon.extensionId,r.extensionResourceLocationPath)}).fail(function(){return Q()}):Q()},e.prototype.initializeComponentModel=function(e,t){e.fiori||(e.fiori={}),e.fiori.extensionCommon||(e.fiori.extensionCommon={});var n=Object.keys(t),r=n[0],i=Object.keys(t[r]);if(i.forEach(function(n){e.fiori[r][n]=t[r][n]}),n.length>1){var o=n[1];e.fiori[o]=t[o]}},e}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/constants/ComponentConstants",{constants:{components:{initModel:{Common:{fiori:{extensionCommon:{}}},ExtendController:{extensionCommon:{customizationId:"sap.ui.controllerExtensions",resourceSuffix:".controller.js",resourceTypeName:"controllerName"},extendController:{parentMethodHeaders:{},resourceSuffix:{},parentControllerContent:{}}},ExtendView:{extensionCommon:{customizationId:"sap.ui.viewExtensions",resourceSuffix:".fragment.xml",resourceTypeName:"fragmentName"},extendView:{}},HideControl:{extensionCommon:{customizationId:"sap.ui.viewModifications"}},ReplaceView:{extensionCommon:{customizationId:"sap.ui.viewReplacements",resourceSuffix:".view.xml",resourceTypeName:"viewName"},replaceView:{parentAttributesPrefix:{},parentAttributesSuffix:{},parentViewContent:{}}}}}}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/steps/WizardStepContentHelper",[],function(){var e=function(e,t,r,i,o,a,s){var u=e.service.parentproject,c=[];t.resources=[],c.push(u.getResources(t,r)),s&&c.push(u.getResources(t,s)),Q.all(c).spread(function(){var e=arguments[0];arguments.length>1&&$.merge(e,arguments[1]),t.resources.length>0&&(t.resources=[]);for(var r=0;r0&&t.removeAllItems();var r,i=0;e.forEach(function(e){var n=e;void 0!==e.name&&(n=e.name);var o=new sap.ui.core.ListItem({text:n,key:i++,data:e});r=new sap.ui.model.json.JSONModel,r.setData(e),o.setModel(r),t.addItem(o)});var o={isValid:!1,message:n};return t.getItems().length>0&&(o={isValid:!0}),o};return{updateModelWithSelectedResource:t,buildResourcesDropdownbox:e,fillDropdownBox:n}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/util/ExtensionHook",["sap/watt/lib/lodash/lodash","sap/watt/lib/orion/javascript/esprima/esprimaVisitor","sap/watt/lib/orion/ui/esprima/esprima","sap/watt/lib/orion/ui/escodegen/escodegen.browser"],function(e,t){function n(e,t){if(e.type===esprima.Syntax.CallExpression&&e.callee&&e.callee.property&&e.callee.property.name&&0===e.callee.property.name.indexOf("extHook")&&e.callee.object&&(e.callee.object.type===esprima.Syntax.ThisExpression||e.callee.object.type===esprima.Syntax.Identifier&&"that"===e.callee.object.name)){var n=e.callee.property.name,r=[];e.arguments&&jQuery.each(e.arguments,function(e,t){var n=a(t);r.push(n)}),t.hooksObj[n]=r}return!0}function r(e,t){return e.type===esprima.Syntax.ObjectExpression&&e.properties&&e.properties.length>0&&jQuery.each(e.properties,function(e,n){if(n.key&&n.key.name===t.hookName)return t.isHookExtended=!0,!1}),!0}function i(e,t){return e.type===esprima.Syntax.ObjectExpression&&e.properties&&jQuery.each(e.properties,function(n,r){if(r.key&&r.key.name===t.hookName)return e.properties.splice(n,1),!1}),!0}function o(e,t){if(e.type===esprima.Syntax.ObjectExpression&&e.properties){var n="var dummy = {"+t.hook+"};",r=esprima.parse(n,{range:!0,tokens:!0,comment:!0});r=escodegen.attachComments(r,r.comments,r.tokens);var i=r.body[0].declarations[0].init.properties[0];return e.properties.push(i),!1}return!0}var a=function(e){return e?e.type===esprima.Syntax.MemberExpression?a(e.object)+"_"+e.property.name:e.type===esprima.Syntax.Identifier?e.name:e.type===esprima.Syntax.ThisExpression?"that":"":""},s=function(r){var i=esprima.parse(r,{}),o={hooksObj:{}};t.visit(i,o,n);var a=e.map(o.hooksObj,function(e,t){return{name:t,args:e}});return a=e.sortBy(a,"name")},u=function(e,n){if(!n)return!1;var i=esprima.parse(n,{}),o={hookName:e,isHookExtended:!1};return t.visit(i,o,r),o.isHookExtended},c=function(e,n){var r=esprima.parse(n,{range:!0,tokens:!0,comment:!0});r=escodegen.attachComments(r,r.comments,r.tokens);var o={hookName:e};t.visit(r,o,i);var a=escodegen.generate(r,{comment:!0,format:{quotes:"double",indent:{style:"\t"}}});return a},l=function(e,n){var r=esprima.parse(n,{range:!0,tokens:!0,comment:!0});r=escodegen.attachComments(r,r.comments,r.tokens);var i={hook:e};t.visit(r,i,o);var a=escodegen.generate(r,{comment:!0,format:{quotes:"double",indent:{style:"\t"}}});return a};return{getHooks:s,isHookExtended:u,removeHook:c,addHook:l,_getArgumentString:a}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/visualExt/util/ExtendUtil",["../../manager/ComponentManager","../../constants/ComponentConstants","../../ui/steps/WizardStepContentHelper","../../util/ExtensionHook","sap/watt/lib/lodash/lodash"],function(e,t,n,r,i){var o="controller",a="view",s="fragment",u="hook",c="extensionpoint",l={REPLACE_VIEW_WITH_EMPTY:"Replace View with Empty",REPLACE_VIEW_WITH_COPY:"Replace View with Copy",HIDE_CONTROL:"Hide UI Control",EXTEND_VIEW:"Extend Extension Point",EXTEND_CONTROLLER_WITH_EMPTY:"Extend Controller with Empty",EXTEND_CONTROLLER_WITH_COPY:"Extend Controller with Copy",EXTEND_CONTROLLER_HOOK:"Extend Controller Hook"},p=function(r,i,o,a){switch(o.name){case l.EXTEND_CONTROLLER_WITH_COPY:o.name="Copy of the parent controller";break;case l.EXTEND_CONTROLLER_WITH_EMPTY:o.name="Empty controller"}var s=new e(a);s.initializeComponentModel(i,t.constants.components.initModel.ExtendController),n.updateModelWithSelectedResource(i,r,o)},f=function(r,i,o,a){var s=new e(a);s.initializeComponentModel(i,t.constants.components.initModel.ExtendController),n.updateModelWithSelectedResource(i,r,o)},d=function(r,i,o,a){switch(o.name){case l.REPLACE_VIEW_WITH_COPY:o.name="Copy of the parent view";break;case l.REPLACE_VIEW_WITH_EMPTY:o.name="Empty view"}var s=new e(a);s.initializeComponentModel(i,t.constants.components.initModel.ReplaceView),n.updateModelWithSelectedResource(i,r,o)},h=function(t,r,i,o,a){var s=new e(a);s.initializeComponentModel(i,r);var u={name:t.resourceInfo.name,path:t.resourceInfo.path,resourceLocationPath:t.resourceInfo.resourceLocationPath,id:t.resourceInfo.id};n.updateModelWithSelectedResource(i,u,o)},m=function(e,t,n,r){return r.service.generation.generate(n.extensionProjectPath,t,n,!0,e)},g=function(e,t,n,r){var i=e[t];if(i){var o=i[n];if(o){if("sap.ui.viewReplacements"===t||"sap.ui.controllerExtensions"===t)return!0;var a=o[r];if("sap.ui.viewModifications"===t)return a&&a.visible===!1;if(a)return!0}}return!1},v=function(e,t,n){var r=e.extensionId,i=e.customizationId,o=e.resourceInfo.originalId;return o||(o=e.resourceInfo.id),n.service.ui5projecthandler.removeExtension(t,i,o,r).then(function(){return n.service.ui5projecthandler.getAllExtensions(t)})},y=function(e,n,r,i,o,a){var s=e.type,u=this,c=new sap.ui.model.json.JSONModel;c.setData({}),c.oData=r,c.oData.extensionProjectPath=n.getEntity().getFullPath(),c.oData.extensionProjectName=n.getEntity().getName();var l=e.resourceInfo,g={};return Q.all([a.service.extensionproject.getResourceLocation(c.oData.extensionProjectPath),a.service.ui5projecthandler.getAppNamespace(n)]).spread(function(r,v){switch(c.oData.extensionResourceLocationPath=r,c.oData.extensionProjectNamespace=v,s){case u.EXT_TYPE_VIEW:g.name=o,d(l,c.oData,g,a);break;case u.EXT_TYPE_CONTROLLER:g.name=o,p(l,c.oData,g,a);break;case u.EXT_TYPE_HOOK:g.name=e.attributes.id,c.oData.fiori||(c.oData.fiori={},c.oData.fiori.extensionCommon={}),c.oData.fiori.extensionCommon.originalId=l.originalId,c.oData.fiori.extensionCommon.extensionArgs=e.extensionHookArgs,f(l,c.oData,g,a);break;case u.EXT_TYPE_EXT_POINT:var y=t.constants.components.initModel.ExtendView;g.name=e.attributes.name,h(e,y,c.oData,g,a);break;default:if(e.isExtendable===!0&&e.isVisible===!0){var y=t.constants.components.initModel.HideControl;g.name=e.attributes.id,h(e,y,c.oData,g,a)}}return c.oData.selectedTemplate=i,m(n,i,c.oData,a)})},x=function(e,n,r,i,o){var a,s=n.getBindingContext().getObject();switch(s.type){case this.EXT_TYPE_EXT_POINT:a=t.constants.components.initModel.ExtendView.extensionCommon;break;case this.EXT_TYPE_VIEW:a=t.constants.components.initModel.ReplaceView.extensionCommon;break;default:return Q.reject(i.i18n.getText("i18n","VisualExt_WrongNodeForLayoutEditor"))}return i.service.extensionproject.openLayoutEditor(e,s,a,r,i).then(function(){i.service.usagemonitoring.report("extensibility","open_layout_editor","open_layout_editor_"+o).done()}).fail(function(e){i.service.usernotification.alert(e.message).done(),i.service.usagemonitoring.report("extensibility","open_layout_editor","error_while_open_layout_editor_"+o).done()})},b=function(e,n,r,i){var o,a,s,u,c=n.getBindingContext().getObject().type,l=n.getBindingContext().getObject();switch(c){case this.EXT_TYPE_EXT_POINT:s=t.constants.components.initModel.ExtendView.extensionCommon,o=l.resourceInfo.id,a=l.attributes.name;break;case this.EXT_TYPE_VIEW:s=t.constants.components.initModel.ReplaceView.extensionCommon,u=l.resourceInfo.originalId,o=u||l.resourceInfo.id;break;case this.EXT_TYPE_CONTROLLER:case this.EXT_TYPE_HOOK:s=t.constants.components.initModel.ExtendController.extensionCommon,u=l.resourceInfo.originalId,o=u||l.resourceInfo.id;break;default:l.isExtended===!0&&l.isVisible===!0&&(s=t.constants.components.initModel.HideControl.extensionCommon,o=l.resourceInfo.id,a=l.attributes.id)}return i.service.extensionproject.openDocument(e,s,o,a,r).fail(function(e){i.service.usernotification.alert(e.message).done()})},_=function(e,t,n){var r,i=e.getBindingContext().getObject(),o=i.resourceInfo.originalName||i.resourceInfo.name;switch(i.resourceInfo.type){case this.EXT_TYPE_CONTROLLER:r=t.extensibility.controllers[o];break;case this.EXT_TYPE_VIEW:r=t.extensibility.views[o];break;case this.EXT_TYPE_FRAGMENT:r=t.extensibility.fragments[o];break;default:r=t.extensibility.component}var a="file",s=t.extensibility.system,u=t.extensibility.type;return n.service.parentproject.getDocument(r,a,s,u,!0).then(function(e){if(e)return"Workspace"===u&&n.service.repositorybrowser.setSelection(e,!0).done(),n.service.editor.getSpecificEditor(e,"aceeditor").then(function(t){return n.service.content.open(e,t.service)});var t=n.i18n.getText("i18n","ExtUtil_DocNotFound");n.service.usernotification.alert(t).done()}).fail(function(e){n.service.usernotification.alert(e.message).done()})},w=function(e){return!!e&&(e.type!==this.EXT_TYPE_CONTROLLER&&e.type!==this.EXT_TYPE_VIEW&&e.type!==this.EXT_TYPE_FRAGMENT&&e.type!==this.EXT_TYPE_HOOK?e.isExtended===!0&&!e.resourceInfo.newId:e.isExtended===!0)},E=function(e,t,n,r,i){var o=e.replace(t,"");return""!==i&&(i="/"+i.replace("/","")),o=n+i+o.replace(/\./g,"/")+r},S=function(e,n,i,o){var a=i.getEntity(),s=this;return o.service.ui5projecthandler.getAppNamespace(i).then(function(i){var u=e.resourceInfo.newId;u||(u=e.resourceInfo.id);var c=s.getCustomResourceFilePath(u,i,a.getFullPath(),t.constants.components.initModel.ExtendController.extensionCommon.resourceSuffix,n.extensionResourceLocationPath);return o.service.filesystem.documentProvider.getDocument(c).then(function(t){return t.getContent().then(function(n){var i=r.removeHook(e.attributes.id,n),a=o.i18n.getText("i18n","VisualExt_HookRemovalFailed");return i===n?Q.reject(a):o.service.beautifierProcessor.beautify(i,"js").then(function(e){return t.setContent(e).then(function(){return t.save()})}).fail(function(e){o.service.log.error("ExtendUtil",a+" Error: "+e.message,["system"]).done(),o.service.usernotification.warning(a).done()})})})})},C=function(e,n,r){var i=n.extensionProjectNamespace,o=this.getCustomResourceFilePath(e,i,n.extensionProjectPath,t.constants.components.initModel.ExtendController.extensionCommon.resourceSuffix,n.extensionResourceLocationPath);return r.service.filesystem.documentProvider.getDocument(o).then(function(e){return e})},T=function(e){var t=sap.watt.getEnv("server_type");if("java"===t||"local_hcproxy"===t)return Q.reject();var n=Q.defer(),r={},o=sap.watt.getEnv("context_root"),a=new sap.ui.model.odata.ODataModel(o+"fioriappslibrary",!0);return a.read("Apps?$filter=BSPName eq '"+e+"'",null,null,!0,function(e,t){if(t.data.results.length>0){var o=t.data.results[0].appId;r.url=t.data.results[0].ExtensibilityDocumentationLink,a.read("Apps('"+o+"')/Extensions",null,null,!0,function(e,t){r.map={},i.forEach(t.data.results,function(e){r.map[e.File+"."+e.Name]=e}),n.resolve(r)},function(){n.reject()})}else n.reject()},function(){n.reject()}),n.promise},D=function(e,t){if(!t){var n=e.i18n.getText("i18n","ExtendUtil_badInputForGetRunConfiguration");return e.service.log.error(e.i18n.getText("i18n","Extension_LogTitle"),n,["system"]).done(),Q(null)}return e.service.setting.user.get(e.service.run,t).then(function(e){if(e)for(var t=0;t0){o.childTreeNodeModels=[];for(var s=0;s0)for(var a=0;a0){u.childTreeNodeModels=[];for(var d=0;d0){t.childTreeNodeModels=[];for(var i=0;i")}return s?s:a?"<"+a+":"+i+">":"<"+i+">"},useRawValues:!0},expanded:{parts:[{path:"isRoot"}],formatter:function(e){return e===!0},useRawValues:!0}})},this._createTreeModel=function(){var e,t=new sap.ui.model.json.JSONModel,r=[],i=[],a=[],s={childTreeNodeModels:[{isExtended:!1,isExtendable:!1,isRoot:!0,type:n.EXT_TYPE_VIEW},{isExtended:!1,isExtendable:!1,isRoot:!0,type:n.EXT_TYPE_FRAGMENT},{isExtended:!1,isExtendable:!1,isRoot:!0,type:n.EXT_TYPE_CONTROLLER}]};for(e=0;e=0;o--)n=e[o],n.attributes.id&&n.isVisible&&s.push(n.attributes.id);r.prevIds=s}}return r},R=function(e,t){var r=e.childTreeNodeModels;if(r)for(var i,o=0;ou+c?n=d-Math.floor(.8*c):sp+.1*f?r=l:l"),e.write("
"),t.getMiddle()&&e.renderControl(t.getMiddle()),e.write("
"),e.write("
"),t.getTop()&&e.renderControl(t.getTop()),e.write("
"),e.write("
"),t.getBottom()&&e.renderControl(t.getBottom()),e.write("
"),e.write("")}}),u=new my.Layout({top:e.top,middle:e.middle,bottom:r})},B=function(e){v=new sap.ui.commons.TextView({text:"No control is selected",width:"100%",wrapping:!0,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"})}).addStyleClass("statusMessage"),l=sap.ui.getCore().byId("extOptionsMenuButton"),l&&l.destroy(),l=new sap.ui.commons.MenuButton("extOptionsMenuButton",{text:C.oContext.i18n.getText("i18n","VisualExt_ExtOptionsMenuButton"),tooltip:C.oContext.i18n.getText("i18n","VisualExt_ExtOptionsTooltip"),enabled:!1}).addStyleClass("extendButton flatControlSmall");var t=new sap.ui.commons.Menu;l.setMenu(t),i=sap.ui.getCore().byId("removeExtBtn"),void 0===i&&(i=new sap.ui.commons.Button("removeExtBtn",{text:C.oContext.i18n.getText("i18n","VisualExt_RemoveExtensionButton"),tooltip:C.oContext.i18n.getText("i18n","VisualExt_RemoveExtensionTooltip"),enabled:!1}).addStyleClass("removeExtBtn flatControlSmall")),i.attachPress(ge,this);var n=sap.ui.getCore().byId("goToCodeButton");n&&n.destroy(),n=new sap.ui.commons.MenuButton("goToCodeButton",{text:C.oContext.i18n.getText("i18n","VisualExt_GoToCode"),tooltip:C.oContext.i18n.getText("i18n","VisualExt_GoToCodeTooltip"),enabled:!1}).addStyleClass("extendButton flatControlSmall");var s=new sap.ui.commons.Menu;a=new sap.ui.unified.MenuItem("openLayoutEditorItem",{text:C.oContext.i18n.getText("i18n","VisualExt_OpenLayoutEditor"),tooltip:C.oContext.i18n.getText("i18n","VisualExt_openLayoutEditorTooltip"),enabled:!1,select:[H,this]}),s.addItem(a),o=new sap.ui.unified.MenuItem("goToExtensionCodeItem",{text:C.oContext.i18n.getText("i18n","VisualExt_GoToExtensionCode"),tooltip:C.oContext.i18n.getText("i18n","VisualExt_GoToCodeTooltip"),enabled:!1,select:[W,this]}),s.addItem(o);var u=new sap.ui.unified.MenuItem("goToParentCodeItem",{text:C.oContext.i18n.getText("i18n","VisualExt_GoToParentCode"),tooltip:C.oContext.i18n.getText("i18n","VisualExt_GoToCodeTooltip"),enabled:!0,select:[ve,this]});s.addItem(u),n.setMenu(s);var c,p=new sap.ui.layout.HorizontalLayout({allowWrapping:!0,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),width:"100%",content:[l,i,n]});if(e){var f=new sap.ui.commons.Link({text:C.oContext.i18n.getText("i18n","ExtDocumentation_LinkText"),tooltip:C.oContext.i18n.getText("i18n","ExtDocumentation_LinkTooltipText"),target:"_blank",href:e}).addStyleClass("extDocumentationLink");f.setLayoutData(new sap.ui.layout.GridData({span:"L11 M11 S11",linebreak:!0})),c=[v,p,f]}else c=[v,p];r=sap.ui.getCore().byId("ExtendGridLayout"),void 0===r&&(r=new sap.ui.layout.Grid({layoutData:new sap.ui.layout.GridData({span:"L11 M11 S11",linebreak:!0}),content:c})),r.setVSpacing(0)},U=function(e,t){w=sap.ui.getCore().byId("splitterV"),void 0===w&&(w=new sap.ui.commons.Splitter("splitterV"),w.setSplitterOrientation(sap.ui.commons.Orientation.vertical),w.setSplitterPosition("73%"),w.setWidth("100%"),w.setHeight("100%"),w.addStyleClass("splitter")),w.setShowScrollBars(!1),w.addFirstPaneContent(e),w.addSecondPaneContent(t)},V=function(e,t,n){c.selectTreeElement(e,t,n),S=C.mReportTypes.FROM_APPLICATION},G=function(e,t){var n=t.getBindingContext().getObject();n.isRoot||(S=C.mReportTypes.FROM_OUTLINE,C.oContext.service.contextMenu.open(s,e.pageX,e.pageY).done())},W=function(){ye(!1).done()},H=function(){ye(!0).done()},z=function(){var e=sap.ui.getCore().byId("goToCodeButton");e.setEnabled(!1);var t=sap.ui.getCore().byId("extOptionsMenuButton");t.setEnabled(!1);var n=sap.ui.getCore().byId("removeExtBtn"); n.setEnabled(!1),E.setBusy(!0)},q=function(){E.setBusy(!1)},X=function(e,t,n){var r=_.extensibility.namespace,i=e.resourceInfo.name,o=e.extensionId?e.extensionId:"";return t===!0?C.oContext.service.usagemonitoring.report("extensibility","add_extension",r,"Pane: "+n+". Origin: "+S,i,o):C.oContext.service.usagemonitoring.report("extensibility","remove_extension","Origin: "+S)},K=function(e,t,n,r){var i,o;switch(r){case C.mExtensionTypes.REPLACE_VIEW_WITH_COPY:d=!1,o=C.oContext.i18n.getText("i18n","VisualExt_ReplacedSuccess",['"'+n+'"',e.type]),i=C.oContext.i18n.getText("i18n","VisualExt_ExtensionAdded",['"'+t+'"',e.type,o]);break;case C.mExtensionTypes.REPLACE_VIEW_WITH_EMPTY:d=!0,o=C.oContext.i18n.getText("i18n","VisualExt_ReplacedSuccess",['"'+n+'"',e.type]),i=C.oContext.i18n.getText("i18n","VisualExt_ExtensionAdded",['"'+t+'"',e.type,o]);break;case C.mExtensionTypes.EXTEND_VIEW:d=!1,o=C.oContext.i18n.getText("i18n","VisualExt_ExtendedSuccess"),i=C.oContext.i18n.getText("i18n","VisualExt_ExtensionAdded",['"'+t+'"',"extension point",o]);break;case C.mExtensionTypes.EXTEND_CONTROLLER_WITH_COPY:case C.mExtensionTypes.EXTEND_CONTROLLER_WITH_EMPTY:d=!1,o=C.oContext.i18n.getText("i18n","VisualExt_ExtendedSuccessBy",['"'+n+'"',e.type]),i=C.oContext.i18n.getText("i18n","VisualExt_ExtensionAdded",['"'+t+'"',e.type,o]);break;case C.mExtensionTypes.EXTEND_CONTROLLER_HOOK:d=!0,o=C.oContext.i18n.getText("i18n","VisualExt_ExtendedSuccess"),i=C.oContext.i18n.getText("i18n","VisualExt_ExtensionAdded",['"'+t+'"',"extension hook",o]);break;default:d=!0,o=C.oContext.i18n.getText("i18n","VisualExt_HiddenSuccess"),i=C.oContext.i18n.getText("i18n","VisualExt_ExtensionAdded",['"'+t+'"',"control",o])}return i},J=function(e,t,r){var i;return i=e.type===n.EXT_TYPE_VIEW||e.type===n.EXT_TYPE_CONTROLLER?C.oContext.i18n.getText("i18n","VisualExt_ExtensionRemoved",['"'+r+'"',e.type]):e.type===n.EXT_TYPE_EXT_POINT?C.oContext.i18n.getText("i18n","VisualExt_ExtensionRemoved",['"'+t+'"',"extension point"]):C.oContext.i18n.getText("i18n","VisualExt_ExtensionRemoved",['"'+t+'"',"control"])},Y=function(e,t,r){var i,o;e.type===n.EXT_TYPE_VIEW||e.type===n.EXT_TYPE_CONTROLLER?(i=e.resourceInfo.originalName||e.resourceInfo.name,o=e.resourceInfo.newResourceName):i=e.type===n.EXT_TYPE_EXT_POINT?e.attributes.name:e.type===n.EXT_TYPE_HOOK?e.attributes.id:e.attributes.id;var a;t===!0?(a=K(e,i,o,r),y.getButtons()[0].setVisible(!0)):(a=J(e,i,o),d=!0,y.getButtons()[0].setVisible(!1));var s=new sap.ui.commons.Label({text:a,width:"100%"});if(y.addContent(s),t===!0&&(e.type===n.EXT_TYPE_VIEW||e.type===n.EXT_TYPE_CONTROLLER)){var u=new sap.ui.commons.Label({text:C.oContext.i18n.getText("i18n","AddExtensionMessage_Important")+" ",design:sap.ui.commons.LabelDesign.Bold});y.addContent(u);var c=new sap.ui.commons.Label({wrapping:!0}).addStyleClass("implicationTextAfterExtension");switch(r){case C.mExtensionTypes.REPLACE_VIEW_WITH_COPY:c.setText(C.oContext.i18n.getText("i18n","ReplaceViewWithCopy_Implication",['"'+o+'"','"'+i+'"']));break;case C.mExtensionTypes.REPLACE_VIEW_WITH_EMPTY:c.setText(C.oContext.i18n.getText("i18n","ReplaceViewWithEmpty_Implication",['"'+o+'"','"'+i+'"']));break;case C.mExtensionTypes.EXTEND_CONTROLLER_WITH_COPY:c.setText(C.oContext.i18n.getText("i18n","ReplaceControllerWithCopy_Implication",['"'+o+'"','"'+i+'"']));break;case C.mExtensionTypes.EXTEND_CONTROLLER_WITH_EMPTY:c.setText(C.oContext.i18n.getText("i18n","ReplaceControllerWithEmpty_Implication",['"'+o+'"','"'+i+'"']));break;default:c.setText(""),y.removeContent(u)}y.addContent(c);var l=new sap.ui.commons.Link({text:C.oContext.i18n.getText("i18n","AddExtensionMessage_ImplicationsLink"),target:"_blank",href:"https://sapui5.hana.ondemand.com/sdk/#docs/guide/aef3384510724522a07df94ec90d1351.html"}).addStyleClass("implicationLinkAfterExtension");y.addContent(l)}d?(y.getButtons()[1].setVisible(!0),y.getButtons()[2].setVisible(!0),y.getButtons()[3].setVisible(!1)):(y.getButtons()[1].setVisible(!1),y.getButtons()[2].setVisible(!1),y.getButtons()[3].setVisible(!0)),y.open()},Z=function(e,t){S=C.mReportTypes.FROM_BUTTON,he(t.type).done()},ee=function(e){var t=e.type;t===n.EXT_TYPE_VIEW||t===n.EXT_TYPE_CONTROLLER?i.setEnabled(!1):i.setEnabled(n.isExtendedByNode(e))},te=function(e){h===!0&&(e.isExtended===!0?(o.setEnabled(!0),e.type!==n.EXT_TYPE_VIEW&&e.type!==n.EXT_TYPE_EXT_POINT||a.setEnabled(!0),l.getMenu().removeAllItems(),re(e)):(re(e),o.setEnabled(!1),a.setEnabled(!1)))},ne=function(e,t){S=C.mReportTypes.FROM_OUTLINE;var n=sap.ui.getCore().byId("goToCodeButton");if(!t)return n.setEnabled(!1),l.setEnabled(!1),i.setEnabled(!1),re(null),void ie(null);var r=t.getBindingContext().getObject();return ee(r),n.setEnabled(!0),v.setText(C.oContext.i18n.getText("i18n","VisualExt_NodeIsSelected",[t.getText()])),r.isRoot?(n.setEnabled(!1),l.setEnabled(!1),void re(null)):"fragment"===r.resourceInfo.type&&"extensionpoint"!==r.type?void l.setEnabled(!1):(ie(r),void te(r))},re=function(e){var t=l.getMenu();if(null===e)return void v.setText(C.oContext.i18n.getText("i18n","VisualExt_NoControlIsSelected"));if(e.type!==n.EXT_TYPE_HOOK&&(e.resourceInfo.newId||e.resourceInfo.isExtended&&e.resourceInfo.isExtended===!0))return t.removeAllItems(),e.resourceInfo.name?v.setText(C.oContext.i18n.getText("i18n","VisualExt_NodeAlreadyExtended",[e.resourceInfo.name])):v.setText(C.oContext.i18n.getText("i18n","VisualExt_ElementAlreadyExtended")),void l.setEnabled(!1);if(e.isExtended===!0)return v.setText(C.oContext.i18n.getText("i18n","VisualExt_NodeAlreadyExtended",[e.extensionId])),void l.setEnabled(!1);switch(t.getItems().length>0&&t.removeAllItems(),e.type){case n.EXT_TYPE_VIEW:var r=new sap.ui.unified.MenuItem({text:C.oContext.i18n.getText("i18n","VisualExt_ReplaceWithEmptyView"),select:[{type:C.mExtensionTypes.REPLACE_VIEW_WITH_EMPTY},Z,this]}),i=new sap.ui.unified.MenuItem({text:C.oContext.i18n.getText("i18n","VisualExt_ReplaceCopyParentView"),select:[{type:C.mExtensionTypes.REPLACE_VIEW_WITH_COPY},Z,this]});t.addItem(r),t.addItem(i);break;case n.EXT_TYPE_EXT_POINT:var o=new sap.ui.unified.MenuItem({text:C.oContext.i18n.getText("i18n","VisualExt_ExtendView"),select:[{type:C.mExtensionTypes.EXTEND_VIEW},Z,this]});t.addItem(o);break;case n.EXT_TYPE_CONTROLLER:var a=new sap.ui.unified.MenuItem({text:C.oContext.i18n.getText("i18n","VisualExt_ExtendEmptyController"),select:[{type:C.mExtensionTypes.EXTEND_CONTROLLER_WITH_EMPTY},Z,this]}),s=new sap.ui.unified.MenuItem({text:C.oContext.i18n.getText("i18n","VisualExt_ExtendParentController"),select:[{type:C.mExtensionTypes.EXTEND_CONTROLLER_WITH_COPY},Z,this]});t.addItem(a),t.addItem(s);break;case n.EXT_TYPE_HOOK:var u=new sap.ui.unified.MenuItem({text:C.oContext.i18n.getText("i18n","VisualExt_ExtendHook"),select:[{type:C.mExtensionTypes.EXTEND_CONTROLLER_HOOK},Z,this]});t.addItem(u);break;default:if(e.isVisible&&e.attributes.id){var c=new sap.ui.unified.MenuItem({text:C.oContext.i18n.getText("i18n","VisualExt_HideControl"),select:[{type:C.mExtensionTypes.HIDE_CONTROL},Z,this]});t.addItem(c)}}t.getItems().length<=0?(e.attributes.id?e.isVisible===!1&&v.setText(C.oContext.i18n.getText("i18n","VisualExt_ElementNotVisible",[e.attributes.id])):v.setText(C.oContext.i18n.getText("i18n","VisualExt_NoIdAvailable")),l.setEnabled(!1)):l.setEnabled(!0)},ie=function(e){if(C.messageHandler){if(!e)return void C.messageHandler.sendMessage("CLEAR","","");if(e.type===n.EXT_TYPE_VIEW)return void C.messageHandler.sendMessage("SELECT_",e.resourceInfo.id);var t=e.resourceInfo.id;e.resourceInfo.type===n.EXT_TYPE_FRAGMENT&&(t=c.getParentViewOfFragment(t)),e.isVisible===!0&&e.attributes.id?C.messageHandler.sendMessage("SELECT_",t,e.attributes.id):e.type===n.EXT_TYPE_EXT_POINT?C.messageHandler.sendMessage("SELECT_",t,e.attributes.name):C.messageHandler.sendMessage("CLEAR","","")}else C.oContext.service.usernotification.alert(C.oContext.i18n.getText("i18n","VisualExt_ErrorOccurred")).then(function(e){if("OK"===e.sResult){L();var t=sap.ui.getCore().byId("goToCodeButton");t.setEnabled(!1)}}).done()},oe=function(e){var t=b.getEntity().getFullPath()+"/index.html",n=b.getEntity().getFullPath()+"/webapp/index.html";return e.service.filesystem.documentProvider.getDocument(n).then(function(n){return n?Q(n):e.service.filesystem.documentProvider.getDocument(t)})},ae=function(e){return oe(e).then(function(t){if(t){var n=require.toUrl("sap.watt.saptoolsets.fiori.project.fioriexttemplate/visualExt/transceiver.js"),r=URI.parse(n),i=new URI(window.location).path(r.path),o='';return x?e.service.mockpreview.getRunnableMockSettings(t,_.mockpreview).then(function(n){return e.service.mockpreview.buildRunnableDocument(n,t).then(function(t){return se(e,t,o)})}):se(e,t,o)}})},se=function(e,t,n){return e.service.htmlbuilder.build(t,n,"visual_ext_index.html").then(function(e){var n=new URI(e);return t.getContent().then(function(e){e.indexOf("fiori2")>0&&n.hash("title-display"),p=n.toString();var t="";return t})})},ue=function(){E.fireClose()},ce=function(){return c.getSelectedElementData()},le=function(){c.clearSelection(),re(null),i.setEnabled(!1),o.setEnabled(!1),C.oContext.service.contextMenu.close().done()},pe=function(e,t){return C.oContext.service.contextMenu.open(s,e,t)},fe=function(e,t,n){c.hoverOnTreeElement(e,t,n)},de=function(){return C.mExtensionTypes},he=function(e){return z(),C.oContext.service.usagemonitoring.startPerf("extensibility","add_extension").then(function(){return c.extendSelectedElement(e).then(function(t){X(t,!0,e).fail(function(e){console.log(e)}).done(),Y(t,!0,e),ee(t);var n=sap.ui.getCore().byId("goToCodeButton");return n.setEnabled(!0),t.isRoot?(n.setEnabled(!1),l.setEnabled(!1),void re(null)):"fragment"===t.resourceInfo.type&&"extensionpoint"!==t.type?void l.setEnabled(!1):(ie(t),void te(t))})}).fail(function(e){return C.oContext.service.usernotification.alert(e)}).finally(function(){q()})},me=function(e){return c.isSelectedElementExtensibleForType(e)},ge=function(){return z(),c.removeExtensionFromSelectedElement().then(function(e){X(e,!1).fail(function(e){console.log(e)}).done(),Y(e,!1)}).fail(function(e){return C.oContext.service.usernotification.alert(e)}).finally(function(){q()})},ve=function(){return ue(),c.openOriginalCodeOfSelectedElement()},ye=function(e){return ue(),c.openExtensionCodeOfSelectedElement(e,S)};return{isExtensibilityOpen:k,openVisualExt:F,closeVisualExt:ue,configure:T,getFocusElement:ce,getExtensionTypes:de,extendSelectedElement:he,isSelectedElementExtensibleForType:me,removeExtensionFromSelectedElement:ge,openOriginalCodeOfSelectedElement:ve,openExtensionCodeOfSelectedElement:ye,_appendRunConfigurationInfoToIframeUrl:O,_enableComponentPreloadInIframeUrl:N,_addAppCacheBusterUrlParameter:j}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/services/AddFinishStepContent",{getContent:function(){jQuery.sap.require("sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.AddFinishStepContent");var e=new sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.AddFinishStepContent({context:this.context});return e}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/services/ExtendControllerStepContent",{getContent:function(){var e=this;return Q.sap.require("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/steps/WizardStepContentHelper").then(function(t){jQuery.sap.require("sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.ExtendControllerStepContent");var n=new sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.ExtendControllerStepContent({context:e.context,wizardStepContentHelper:t});n.addOptionsToReplaceWithCombo();var r=e.context.i18n.getText("command_extendController");return e.context.service.wizard.createWizardStep(n,r,"")})}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/services/ExtendHookStepContent",{getContent:function(){var e=this;return Q.sap.require("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/steps/WizardStepContentHelper").then(function(t){jQuery.sap.require("sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.ExtendHookStepContent");var n=new sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.ExtendHookStepContent({context:e.context,wizardStepContentHelper:t}),r=e.context.i18n.getText("command_extendHookConfiguration");return e.context.service.wizard.createWizardStep(n,r,"")})}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/services/ExtendViewStepContent",{getContent:function(){var e=this;return Q.sap.require("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/steps/WizardStepContentHelper").then(function(t){jQuery.sap.require("sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.ExtendViewStepContent");var n=new sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.ExtendViewStepContent({context:e.context,wizardStepContentHelper:t}),r=e.context.i18n.getText("command_selectExtensionPoint");return e.context.service.wizard.createWizardStep(n,r,"")})}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/services/ReplaceViewStepContent",{getContent:function(){var e=this;return Q.sap.require("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/steps/WizardStepContentHelper").then(function(t){jQuery.sap.require("sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.ReplaceViewStepContent");var n=new sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.ReplaceViewStepContent({context:e.context,wizardStepContentHelper:t});n.addOptionsToReplaceWithCombo();var r=e.context.i18n.getText("command_replaceView");return e.context.service.wizard.createWizardStep(n,r,"")})}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/services/HideControlStepContent",{getContent:function(){var e=this;return Q.sap.require("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/steps/WizardStepContentHelper").then(function(t){jQuery.sap.require("sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.HideControlStepContent");var n=new sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.HideControlStepContent({context:e.context,wizardStepContentHelper:t}),r=e.context.i18n.getText("command_hideControlConfiguration");return e.context.service.wizard.createWizardStep(n,r,"")})}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/services/ParentProjectStepContent",{getContent:function(){var e=this,t=[];return t.push(Q.sap.require("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/dialogs/RemoteDialog")),t.push(Q.sap.require("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/dialogs/LocalDialog")),t.push(this.context.service.applicationsdialogservice.getContent()),Q.all(t).spread(function(t,n,r){jQuery.sap.require("sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.ParentProjectStepContent");var i=new sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.ParentProjectStepContent({context:e.context,localDialog:n,remoteDialog:t,applicationsDialog:r}),o=e.context.i18n.getText("ExProjWizard_ParentProjectAndName");return e.context.service.wizard.createWizardStep(i,o,"")})}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/services/SelectExtensionProjectStepContent",{getContent:function(){jQuery.sap.require("sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.SelectExtensionProjectStep");var e=new sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.SelectExtensionProjectStep({context:this.context}),t=this.context.i18n.getText("ExtensionWizard_SelectExtensionProject");return this.context.service.wizard.createWizardStep(e,t,"")}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/ui/services/SelectExtensionStepContent",{getContent:function(){jQuery.sap.require("sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.SelectExtensionStep");var e=new sap.watt.saptoolsets.fiori.project.plugin.fioriexttemplate.ui.steps.SelectExtensionStep({context:this.context}),t=this.context.i18n.getText("ExtensionWizard_Extension"),n=this.context.i18n.getText("ExtensionWizard_SelectExtensionToAdd");return this.context.service.wizard.createWizardStep(e,t,n)}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/services/ExtensionProject",["sap/watt/platform/plugin/utils/xml/XmlUtil","../util/ExtensionHook","../visualExt/util/ExtendUtil"],function(e,t,n){var r=function(){var r=this,i="Custom";this.getExtendUtil=function(){return n},this.createFolderName=function(e){return o(e,0)},this.configure=function(e){e.layoutEditorService&&(this._oLayoutEditorService=e.layoutEditorService)},this.isFolderExist=function(e,t){for(var n=t.length;n--;)if(t[n].name.toLowerCase()===e.toLowerCase())return!0;return!1};var o=function(e,t){var n=e;return t>0&&(n+=t),r.context.service.filesystem.documentProvider.getRoot().then(function(i){return i.getCurrentMetadata().then(function(i){var a=r.isFolderExist(n,i);return a===!0?(t+=1,o(e,t)):n})})};this.getExtensionNamespace=function(e){return r.context.service.filesystem.documentProvider.getDocument(e).then(function(e){return r.context.service.ui5projecthandler.getAppNamespace(e)})};var a=function(e,t){if(e)return r.context.service.repositorybrowser.setSelection(e,!0).done(),r.context.service.document.open(e);throw new Error(r.context.i18n.getText("i18n","ExtensionProjectSRV_wasNotFound",t))},s=function(e){return r.context.service.filesystem.documentProvider.getDocument(e).then(function(t){return a(t,e)})};this.openDocument=function(e,t,n,i,o){return r.context.service.filesystem.documentProvider.getDocument(e).then(function(u){return u.refresh().then(function(){return r.context.service.ui5projecthandler.getHandlerDocument(u).then(function(c){return a(c,c.getTitle()).then(function(){return r.context.service.ui5projecthandler.getAllExtensions(u).then(function(a){return r.context.service.ui5projecthandler.getAppNamespace(u).then(function(r){var u=t.customizationId;if(!u||!n)return Q();var c=a[u][n],l=null;if("sap.ui.viewExtensions"===u){var p=c[i];l=p[t.resourceTypeName]}else l=c[t.resourceTypeName];if(!l)return Q();var f=e;return("string"==typeof o||o instanceof String)&&""!==o&&(f=f+"/"+o.replace("/","")),f+=l.replace(r,"").replace(/\./g,"/"),s(f+t.resourceSuffix)})})})})})}).fail(function(e){throw r.context.service.log.error("ExtensionProject","An error has occured. "+e,["user"]).done(),e})},this.openLayoutEditor=function(e,t,n,i){var o=t.resourceInfo.originalId||t.resourceInfo.id,a=t.attributes.name;return r.context.service.filesystem.documentProvider.getDocument(e).then(function(t){return t.refresh().then(function(){return r.context.service.ui5projecthandler.getAllExtensions(t).then(function(s){return r.context.service.ui5projecthandler.getAppNamespace(t).then(function(t){var u=n.customizationId;if(!u||!o)return Q();var c=s[u][o],l=null;if("sap.ui.viewExtensions"===u){var p=c[a];l=p[n.resourceTypeName]}else l=c[n.resourceTypeName];if(!l)return Q();var f=e;return("string"==typeof i||i instanceof String)&&""!==i&&(f=f+"/"+i.replace("/","")),f=f+l.replace(t,"").replace(/\./g,"/")+n.resourceSuffix,r.context.service.filesystem.documentProvider.getDocument(f).then(function(e){if(e)return r.context.service.repositorybrowser.setSelection(e,!0).done(),r.context.service.content.open(e,r._oLayoutEditorService);throw new Error(r.context.i18n.getText("i18n","ExtensionProjectSRV_wasNotFound",f))})})})})}).fail(function(e){throw r.context.service.log.error("ExtensionProject","An error has occurred. "+e,["user"]).done(),e})},this.getExtendedResourceInfo=function(e,t,n,i,o,a){var s=r._getExtendedResourceMetadata(n,i,e,t,o,a);return s.extendedResourcePath?r.context.service.filesystem.documentProvider.getDocument(s.extendedResourcePath).then(function(e){return e?e.getContent().then(function(t){var n=e.getEntity().getName();return r._getExtendedResourceInfo(t,i,n,s.resourceSuffix,s.replacedResourceId,s.originalResourceId)}):{}}):{}},this._getExtendedResourceInfo=function(t,n,r,i,o,a){var s=t;"view"===n&&(s=e.stringToXml(t));var u={name:r.replace(i,""),id:o,resourceContent:s,originalId:a,originalName:a.substr(a.lastIndexOf(".")+1),isExtended:!0,type:n};return u},this._getResourceConsts=function(e){var t={customizationId:"sap.ui.viewReplacements",resourceSuffix:".view.xml",resourceTypeName:"viewName"};return"controller"===e&&(t.customizationId="sap.ui.controllerExtensions",t.resourceSuffix=".controller.js",t.resourceTypeName="controllerName"),t},this._getExtendedResourceMetadata=function(e,t,n,i,o,a){var s=r._getResourceConsts(t);s.originalResourceId=e.id;var u=o[s.customizationId];if(u){var c=u[s.originalResourceId];if(c)return s.replacedResourceId=c[s.resourceTypeName],s.extendedResourcePath=r.getExtendUtil().getCustomResourceFilePath(s.replacedResourceId,a,n,s.resourceSuffix,i),s}return s},this.getCustomizingJson=function(e){return r.context.service.filesystem.documentProvider.getDocument(e).then(function(e){return r.context.service.ui5projecthandler.getAllExtensions(e)})},this.updateFileContent=function(e,t){return e.setContent(t).then(function(){return e.save()})},this.getResourceLocation=function(e){var t;return r.context.service.filesystem.documentProvider.getDocument(e).then(function(n){return n.getCurrentMetadata(!0).then(function(i){return r.context.service.platform.builder.isBuildSupported(n).then(function(e){if(e)return r.context.service.platform.builder.getTargetFolder(n).then(function(e){e&&(t=e.getEntity().getFullPath())})}).then(function(){for(var n=0;n0&&(a+=i),a+=n,r.context.service.filesystem.documentProvider.getDocument(e.extensionProjectPath).then(function(s){s.objectExists(a).then(function(a){a===!0?(i+=1,r.findExtensionRevision(e,t,n,i,o)):(i>0?e.fiori.extensionCommon.extensionFilePath=t+i:e.fiori.extensionCommon.extensionFilePath=t,o.resolve(i))}).fail(function(e){o.reject(e)})}).fail(function(e){o.reject(e)})},this.validateExtensionProject=function(e){var t={};return"/"===e?(t={isValid:!1,message:this.context.i18n.getText("i18n","ExtensionProjectSRV_ExtensionProjectMustPointToExistingFolder")},Q(t)):this.getExtensibilityModel(e).then(function(e){return t=!e||jQuery.isEmptyObject(e.views)||jQuery.isEmptyObject(e.controllers)?{isValid:!1,message:r.context.i18n.getText("i18n","ExtensionProjectSRV_ExtensionProjectNotValid")}:{isValid:!0,extensibility:e}}).fail(function(e){return t={isValid:!1,message:e}})},this.isHookExtendedInController=function(e,n,i){return r.getExtendUtil().getCustomControllerDocument(n,i,r.context).then(function(n){return n.getContent().then(function(n){try{return t.isHookExtended(e,n)}catch(t){var i=r.context.i18n.getText("i18n","ExtensionProject_IsHookExtendedWizardErr",[e,t]);throw r.context.service.log.error(r.context.i18n.getText("i18n","Extension_LogTitle"),i,["system"]).done(),new Error(i)}})})},this.updateModelForABAP=function(e){var t=e.extensibility.system;return this.context.service.destination.getDestinations("ui5_execute_abap").then(function(n){for(var r=0,i=n.length;r0&&(u="/",e.extensionProject.isBSPNamespace=!0),e.extensibility.parentResourceRootUrl="/destinations/"+t.name+e.ui5_ui5Path+u+e.componentJsPath;break}}})},this.initPathToComponentInModel=function(e){e.componentJsPath=e.extensibility.component,"abaprep"===e.extensibility.type&&(e.componentJsPath=unescape(e.componentJsPath)),e.componentJsPath=e.componentJsPath.replace("/Component.js",""),0===e.componentJsPath.indexOf("/")&&(e.componentJsPath=e.componentJsPath.substring(1,e.componentJsPath.length))},this.getResourceRoute=function(){return sap.watt.getEnv("ui5dist")?{path:"/webapp/resources",target:{type:"destination",name:"ui5dist"},description:"SAPUI5 Resources"}:{path:"/webapp/resources",target:{type:"service",name:"sapui5",entryPath:"/resources"},description:"SAPUI5 Resources"}},this.getTestResourceRoute=function(){return sap.watt.getEnv("ui5dist")?{path:"/webapp/test-resources",target:{type:"destination",name:"ui5dist-test-resources"},description:"SAPUI5 Test Resources"}:{path:"/webapp/test-resources",target:{type:"service",name:"sapui5",entryPath:"/test-resources"},description:"SAPUI5 Test Resources"}},this.addUI5ResourcesDestination=function(e){for(var t=!0,n=!0,r=0;r=0;o--){var a=e[o].parentFolderPath;r===c?n.startsWith(a,t)&&e.splice(o,1):n.startsWith(a,t)||e.splice(o,1)}},this.getBuildFolderPath=function(e,t,n){switch(n){case c:return r.context.service.filesystem.documentProvider.getDocument(e).then(function(e){return r.context.service.platform.builder.getTargetFolder(e).then(function(e){return e.getEntity().getTitle()}).fail(function(){return null})});case p:case f:return Q(null);case l:return r.context.service.heliumparentproject.getDocument(".project.json","file",t,!1).then(function(e){return e.getContent().then(function(e){var t=jQuery.parseJSON(e);return r.context.service.platform.builder.getTargetFolderByProjectSettings(t).then(function(e){return e})})}).fail(function(){return null});default:throw new Error(r.context.i18n.getText("i18n","ParentProjectSRV_UnknownExtensibilityType"))}},this.isValidMetadataLocation=function(e,t,r,i){var o=decodeURIComponent(e);return r===l&&i&&(t="/"+t),!(!n.startsWith(o,t+"/model/metadata.xml")&&!n.startsWith(o,t+"/localService/metadata.xml"))||!(0!==o.indexOf("/")||(o=o.substring(1),!n.startsWith(o,t+"/model/metadata.xml")&&!n.startsWith(o,t+"/localService/metadata.xml")))},this.getManifestPromise=function(e,t){return r.getDocument(e.extensibility.component,"file",t,e.extensibility.type).then(function(n){return n.getContent().then(function(n){return h(n)?r.getDocument(e.extensibility.manifest,"file",t,e.extensibility.type).then(function(t){return r.context.service.ui5projecthandler.getAttribute(t,"sap.ui.generic.app").then(function(n){return n&&n.pages&&(e.isSmartExtensionProject=!0,e.openExtPane=!1),r.context.service.ui5projecthandler.getDependencies(t).then(function(t){if(t)try{var n=t.minUI5Version;if(n){e.extensibility.minUI5Version=n;var r=parseFloat(n);r<1.3&&(e.extensibility.shouldLinkComponentToManifest=!1)}}catch(e){return}})})}):(e.extensibility.manifest=void 0,void(e.extensibility.shouldLinkComponentToManifest=!1))})})},this.validateParentProject=function(e,t,u,l){var p=!1,f={},d={};return d.extensibility={},d.extensibility.controllers={},d.extensibility.views={},d.extensibility.fragments={},d.extensibility.type=c,d.extensibility.shouldLinkComponentToManifest=!1,d.isSmartExtensionProject=!1,d.openExtPane=!0,t&&(d.extensibility.type=t),r.getFileResourcesInfo(e,u,d.extensibility.type,l).then(function(l){return r.getBuildFolderPath(e,u,d.extensibility.type).then(function(h){r.adjustBuildResources(l,h,d.extensibility.type,e);var m=0,g=r.getComponentsInfo(l);d.extensibility.component=g.rootComponentFilePath;for(var v,y,x=0;x2?(f.isValid=!1,f.message=r.context.i18n.getText("i18n","ParentProjectSRV_SelectSubFolderWorkspaceError"),f):g.rootComponentFilePath?m>1?(f.isValid=!1,f.message=r.context.i18n.getText("i18n","ParentProjectSRV_MultipleNeoApp_JSON")+" "+r.context.i18n.getText("i18n","ParentProjectSRV_OneNeoappFileAllowed"),f):jQuery.isEmptyObject(d.extensibility.views)||jQuery.isEmptyObject(d.extensibility.controllers)?p&&d.isSmartExtensionProject&&"abaprep"===d.extensibility.type?(f.isValid=!0,f.model=d,f):(f.isValid=!1,f.message=r.context.i18n.getText("i18n","ParentProjectSRV_NoViewsOrControllers"),f):d.isSmartExtensionProject?(f.isValid=!1,f.message=r.context.i18n.getText("i18n","ParentProjectSRV_SmartApp"),f):(f.extensionProjectName=arguments[0],f.isValid=!0,f.model=d,f):(f.isValid=!1,f.message=r.context.i18n.getText("i18n","ParentProjectSRV_Component_jsNotFoundInSpecifiedFolder"),f)})})})},this.getMockPreview=function(e,t){return e.extensibility.projectjson?r.getDocument(e.extensibility.projectjson,"file",t,e.extensibility.type).then(function(e){return e?e.getContent().then(function(e){var t=jQuery.parseJSON(e);return t.mockpreview}):Q()}):Q()},this.getViewInfo=function(t,n,o){return r.getDocument(t.path,"file",o,n).then(function(n){if(null!==n&&"file"===n.getEntity().getType()){var r=n.getEntity().getName();return jQuery.sap.endsWith(r,i)?n.getContent().then(function(n){var o=e.stringToXml(n),a=e.getXmlParameters(o,"ExtensionPoint","name"),s=e.getXmlParameters(o,"*","id"),u={name:r.replace(i,""),resourceContent:n,extensionPoints:a,controlIds:s,id:t.id,path:t.path,resourceLocationPath:t.resourceLocationPath,type:"view"};return u}):{}}return{}})},this.getFragmentInfo=function(t,n,i){return r.getDocument(t.path,"file",i,n).then(function(n){if(null!==n&&"file"===n.getEntity().getType()){var r=n.getEntity().getName();return jQuery.sap.endsWith(r,o)?n.getContent().then(function(n){var i=e.stringToXml(n),a=e.getXmlParameters(i,"ExtensionPoint","name"),s=e.getXmlParameters(i,"*","id"),u={name:r.replace(o,""),fragmentXml:n,extensionPoints:a,controlIds:s,id:t.id,path:t.path,resourceLocationPath:t.resourceLocationPath,type:"fragment"};return u}):{}}return{}})},this.getControllerInfo=function(e,n,i){return r.getDocument(e.path,"file",i,n).then(function(n){if(null!==n&&"file"===n.getEntity().getType()){var r=n.getEntity().getName();return jQuery.sap.endsWith(r,a)?n.getContent().then(function(n){var i={name:r.replace(a,""),controllerJs:n,id:e.id,path:e.path,resourceLocationPath:e.resourceLocationPath,type:"controller",hooks:t.getHooks(n)};return i}):{}}return{}})}};return r}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/services/WorkspaceParentProject",[],function(){var e=function(){var e=this,t="/",n=function(e){var t=e,n=!0,r=sap.watt.getEnv("context_root")+sap.watt.getEnv("orion_server");r=r.replace("//","/");for(var i=0;i0?n-1:0;var r=e.substring(0,n);return""===r?"":"/"+r},i=function(e,t){return e.indexOf(t,e.length-t.length)!==-1},o=function(e){var t=i(e.name,"/");return!(!e.options.dir&&!t)},a=function(e){var t="",n=e.lastIndexOf(".");return n>0&&(t=e.substr(n+1)),t},s=function(e){switch(a(e).toLowerCase()){case"jpg":case"jpeg":case"gif":case"ico":case"png":case"ttf":case"zip":case"jar":case"war":case"bmp":case"tif":case"tiff":return!0;default:return!1}},u=function(e,t){if(t.indexOf(".git")>-1)return!0;for(var n=0;n=0)return!0;return!1},c=function(e){return e.getFolderContent().then(function(e){for(var t=0;t0&&t.push(n[r]);return t}):[]})},this._onZipLoad=function(i,a,c,l){var p={};p.localPath=a.getEntity().getFullPath();var f=[],d=new t(i.target.result),h=d.files,m=p.localPath;for(var g in h)if(h.hasOwnProperty(g)&&!u(c,g)){var v="",y="folder",x=null,b=null,_=null;o(h[g])?(_=g.split("/"),x=_[_.length-2],_.length-3>=0&&(b=_[_.length-3])):(y="file",_=g.split("/"),x=_[_.length-1],_.length-2>=0&&(b=_[_.length-2]),v=s(x)?h[g].asUint8Array():n._normalizeEOLtoWindowsStyle(h[g].asText()));var w=m+r(g,x),E=new e(x,y,v,w,b);f.push(E)}p.localProjectName=m,p.remoteDocuments=f,l.resolve(p)},this.getApplicationFromWorkspace=function(e){return e?e.getProject().then(function(t){return n._buildIgnoreList(t).then(function(t){return e.exportZip().then(function(r){var i=Q.defer(),o=new FileReader;return o.onload=function(r){n._onZipLoad(r,e,t,i)},o.readAsArrayBuffer(r),i.promise})})}):Q()}};return n}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/util/ExtensionProjectSettings",["sap/watt/lib/lodash/lodash"],function(e){return{createExtensibilityProjectSettings:function(e,t,n,r,i,o){var a=this;return e.params.model.extensibility?this.createMockPreview(e,n,r,i,o).then(function(){return a.createExtensibility(e,t).then(function(){return a.createBuild(e,t)})}):Q()},createExtensibility:function(e,t){var n=e.params.model.extensibility;n.projectjson=void 0;var r=e.params.targetDocument;return t.project.setProjectSettings("extensibility",n,r)},createBuild:function(e,t){var n=e.params.targetDocument,r={targetFolder:"dist",sourceFolder:"webapp",buildRequired:!0};return t.project.setProjectSettings("build",r,n)},createMockPreview:function(e,t,n,r,i){var o=e.params.model;if(o.metadataPath&&!o.connectionData){var a=o.extensibility.system,s=this;return t.getMockPreview(o,a).then(function(t){var n=e.params.targetDocument;if(t||(t={mockUri:"",loadCustomRequests:!1,loadJSONFiles:!1,metadataFilePath:"",mockRequestsFilePath:""}),t.metadataFilePath="",t.mockRequestsFilePath){var a=t.mockRequestsFilePath.lastIndexOf("/");t.mockRequestsFilePath="localService"+t.mockRequestsFilePath.substring(a)}return t.mockUri?i.updateSettings(n,t):s.getParentServiceUrl(r,o).then(function(e){return e&&e.length>0&&(t.mockUri=e),i.updateSettings(n,t)})})}return Q()},getParentServiceUrl:function(t,n){return t.getDataSourcesByType(n.parentGuidelinesDocument,"OData").then(function(t){var n;if(t){var r=e.values(t);r[0]&&(n=r[0].uri)}return n}).fail(function(){return null})}}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/services/ExtensionGenerationHandler",["../manager/ComponentManager","../util/ExtensionProjectSettings"],function(e,t){return{onAfterGeneration:function(n){var r=n.params.model;if(!r.isSmartExtensionProject){var i=this.context.service;return Q.all([t.createExtensibilityProjectSettings(n,i.setting,i.parentproject,i.filesystem,i.ui5projecthandler,i.mockpreview),e.generatedEventHandler(n,this.context.service.uicontent,this.context.service.extensionproject)])}}}}),define("sap.watt.saptoolsets.fiori.project.fioriexttemplate/services/ParentCode",[],function(){var e;return{PARENT_PREFIX:"version-parentcode-",_oDocument:null,_DocumentEditorMap:{},init:function(){return this.context.service.perspective.attachEvent("splitterPositionChanged",this.onSplitterPositionChanged,this),this.context.service.content.attachEvent("tabDoubleClicked",this.onSplitterPositionChanged,this),Q.sap.require("sap.watt.ideplatform.compare/lib/built-compare").then(function(t){e=t})},configure:function(e){this.context.service.resource.includeStyles(e.styles).done()},getContent:function(){var e,t=this;return t._DocumentEditorMap[this._oDocument.getKeyString()]&&t._DocumentEditorMap[this._oDocument.getKeyString()].wrapperDiv?e=t._DocumentEditorMap[this._oDocument.getKeyString()].wrapperDiv:(e=new sap.ui.core.HTML({content:"
"}),t._DocumentEditorMap[this._oDocument.getKeyString()].wrapperDiv=e),e},open:function(e){this._oDocument=e;var t=$("div[id='"+this._getDivId(e)+"']");return t.length>0&&t.empty(),this._openPreview(this._oDocument)},close:function(e){var t=$("div[id='"+this._getDivId(e)+"']");t.length>0&&t.empty()},flush:function(){return Q()},setVisible:function(e){return Q(e)},isVisible:function(){return Q()},isAvailable:function(){return Q()},getTitle:function(){return this._oDocument.getEntity().getName()+" [read only]"},getTooltip:function(){return this._oDocument.getEntity().getFullPath()+" [read only]"},getState:function(){return Q()},readOnly:function(e,t){this._oDocument=e;var n=this._getDivId(e),r=e.getEntity().getName();/.*\.(xml)$/.test(r)&&(r=r.substring(0,r.lastIndexOf(".xml"))+".html");var i={viewType:"inline",parentDivId:n,newFile:{InitialContent:t,readonly:!0,Name:r},oldFile:{readonly:!0,Content:t,Name:r}};this._DocumentEditorMap[e.getKeyString()]||(this._DocumentEditorMap[e.getKeyString()]={}),this._DocumentEditorMap[e.getKeyString()].options=i,this.context.service.content.open(e,this.context.service.parentcode).done()},getFocusElement:function(){return document.getElementById(this._getDivId(this._oDocument))},getSelection:function(){return{document:this._oDocument}},onSplitterPositionChanged:function(){if(this._oDocument&&this._DocumentEditorMap&&this._DocumentEditorMap[this._oDocument.getKeyString()]){var e=this._DocumentEditorMap[this._oDocument.getKeyString()].editor;if(e&&e.getCompareView()&&e.getCompareView().getWidget()){var t=e.getCompareView().getWidget();"twoWay"===t.type&&t._uiFactory.getSplitter()._resize()}}},isRestorable:function(){return!1},_openPreview:function(t){var n=this,r=this._DocumentEditorMap[t.getKeyString()].options;return Q(r.newFile.InitialContent?r.newFile.InitialContent:t.getContent()).then(function(i){r.newFile.Content=i,n._DocumentEditorMap[t.getKeyString()].editor=new e(r,"",r.viewType),n._DocumentEditorMap[t.getKeyString()].editor.getCompareView().removeRulers(),n._DocumentEditorMap[t.getKeyString()].editor.getCompareView()._textView.redraw()})},_getDivId:function(e){return this.PARENT_PREFIX+e.getKeyString()}}}),define("sap.watt.saptoolsets.fiori.project.testGenerationWizard/command/CreateOPATest",[],function(){return{execute:function(){var e,t=this,n=this.context.service.selection;return n.getSelection().then(function(n){return e=n[0].document,t.context.service.snippetfilecreation.setCurrentFolderDocument(e)}).then(function(){require(["sap.watt.saptoolsets.fiori.project.testGenerationWizard/wizard/OPAPageGenerationWizard"],function(n){n.openOPAPageGenerationWizardUI(t.context,e)})})},isAvailable:function(){return this.context.service.snippetfilecreation.isCommandAvailable()}}}),define("sap.watt.saptoolsets.fiori.project.testGenerationWizard/command/CreateOPAJourney",[],function(){return{execute:function(){var e,t=this,n=this.context.service.selection;return n.getSelection().then(function(n){return e=n[0].document,t.context.service.snippetfilecreation.setCurrentFolderDocument(e)}).then(function(){require(["sap.watt.saptoolsets.fiori.project.testGenerationWizard/wizard/OPAJourneyGenerationWizard"],function(n){n.openOPAJourneyGenerationWizardUI(t.context,e)})})},isAvailable:function(){return this.context.service.snippetfilecreation.isCommandAvailable()}}}),define("sap.watt.saptoolsets.fiori.project.testGenerationWizard/command/CreateQUnitTest",[],function(){return{execute:function(){var e,t=this,n=this.context.service.selection;return n.getSelection().then(function(n){return e=n[0].document,t.context.service.snippetfilecreation.setCurrentFolderDocument(e)}).then(function(){require(["sap.watt.saptoolsets.fiori.project.testGenerationWizard/wizard/QUnitTestGenerationWizard"],function(n){n.openQUnitTestGenerationWizardUI(t.context,e)})})},isAvailable:function(){return this.context.service.snippetfilecreation.isCommandAvailable()}}}),define("sap.watt.saptoolsets.fiori.project.testGenerationWizard/service/FileCreation",{getContent:function(e){jQuery.sap.require("sap.watt.saptoolsets.fiori.project.testGenerationWizard.steps.FileCreationStep");var t=new sap.watt.saptoolsets.fiori.project.testGenerationWizard.steps.FileCreationStep({context:this.context}),n="";switch(e){case"PAGEOBJ":n=this.context.i18n.getText("OPAPageGenWizard_fileCreationTitle");break;case"JOURNEY":n=this.context.i18n.getText("OPAJourneyGenWizard_fileCreationTitle");break;case"QUNIT":n=this.context.i18n.getText("QUnitGenWizard_fileCreationTitle")}return this.context.service.wizard.createWizardStep(t,n,"")}}),define("sap.watt.saptoolsets.fiori.project.testGenerationWizard/service/ControlSelection",{getContent:function(e){jQuery.sap.require("sap.watt.saptoolsets.fiori.project.testGenerationWizard.steps.ControlSelectionStep");var t=new sap.watt.saptoolsets.fiori.project.testGenerationWizard.steps.ControlSelectionStep({context:this.context}),n="";switch(e){case"PAGEOBJ":n=this.context.i18n.getText("OPAPageGenWizard_ControlSelectionStepTitle")}return this.context.service.wizard.createWizardStep(t,n,"")}}),define("sap.watt.saptoolsets.fiori.project.testGenerationWizard/service/SnippetFileCreation",["sap/watt/lib/orion/editor/templates","sap/watt/lib/lodash/lodash"],function(e,t){var n="sap.watt.saptoolsets.fiori.project.testGenerationWizard/lib/";return{oFolderDocument:null,oNewFileDocument:null,_snippetContent:"",_mTemplate:{},isCommandAvailable:function(){var e=this,n=this.context.service.selection;return n.isOwner(this.context.service.repositorybrowser).then(function(r){return!!r&&e.context.service.repositorybrowserUtils.isSingleFolderNotRootSelection().then(function(r){return!!r&&n.getSelection().then(function(n){return e.context.service.projectType.getProjectTypes(n[0].document).then(function(e){var n=t.filter(e,function(e){return"sap.web"===e.id||"sap.watt.uitools.ide.web"===e.id||"sap.html5"===e.id});return n.length>0})})})})},setCurrentFolderDocument:function(e){this.oFolderDocument=e},getCurrentFolderDocument:function(){return this.oFolderDocument},clearInternalData:function(){return this.oFolderDocument=null,Q()},createFile:function(e,t){return e.createFile(t).then(function(e){return e})},_buildSnippetsForActions:function(e,t){for(var n='sap.ui.define([\n\t\t"sap/ui/test/Opa5",\n\t\t"sap/ui/test/actions/Press",\n\t\t"sap/ui/test/actions/EnterText"\n\t], function(Opa5, Press, EnterText) {\n\t\t"use strict";\n\n\t\tOpa5.createPageObjects({\n\t\t\tonMyPageUnderTest: {\n\t\t\tactions: {',r="\t\t\t}\n\t\t});\n\t}\n);",i='{{functionName}}: function() {\n\t\treturn this.waitFor({\n\t\t\tid: "{{ControlId}}",\n\t\t\tviewName: "{{ViewName}}",\n\t\t\tactions: new {{ActionName}}(),\n\t\t\terrorMessage: "Was not able to find the control with the id {{ControlId}}"\n\t\t});\n\t}',o='},assertions: {\niDoMyAssertion: function() {\n\t\treturn this.waitFor({\n\t\t\tid: "ControlId",\n\t\t\tviewName: "{{ViewName}}",\n\t\t\tsuccess: function() {\n\t\t\t\tOpa5.assert.ok(false, "Implement me");\n\t\t\t},\t\t\terrorMessage: "Was not able to find the control with the id ControlId"\n\t\t});\n\t}\n}',a="",s=e.split("/"),u=s[s.length-1].split("."),c=0;c0)return this._buildSnippetsForActions(t,r).then(function(e){if(e)return i.content=e,i.bMultipleSteps=!0,i});var o=require.toUrl(n+e);return Q.sap.ajax(o,{dataType:"text"}).then(function(e){return e&&e.length>0?e[0]:null}).then(function(e){return i.content=e,i.bMultipleSteps=!1,i}).fail(function(e){return Q(e.message)})},_createFile:function(t,n,r,i){var o=this,a="";if(i.content)return t?o.createFile(t,n).then(function(t){if(t){if(o.oNewFileDocument=t,i.bMultipleSteps)a=i.content;else{if(o._mTemplate[r])o._oInsertTerm=o._mTemplate[r].insertTerm;else{var n=new e.Template("","",i.content,"");o._oInsertTerm=n.getProposal("",0,""),o._mTemplate[r]={template:n,insertTerm:o._oInsertTerm}}a=o._mTemplate[r].insertTerm.proposal}return o.oNewFileDocument.setContent(a).then(function(){return o.oNewFileDocument.save().then(function(){if(!i.bMultipleSteps){var e=o.context.service.intellisence._getEventEmitter();e&&e._mListeners&&e._mListeners.hasOwnProperty("intellisenceContextInitialized")&&o.context.service.intellisence.detachEvent("intellisenceContextInitialized",o._onIntellisenceInitFinished,o),o.context.service.intellisence.attachEvent("intellisenceContextInitialized",o._onIntellisenceInitFinished,o)}return o.oNewFileDocument})})}return Q()}):Q("Error Creating file")},createSnippetFile:function(e,t,n,r,i){var o=this;return o._getSnippet(n,r,i).then(function(r){if(r)return o._createFile(e,t,n,r)})},snippetFileOpen:function(){if(this.oNewFileDocument)return this.openNewFile(this.oNewFileDocument)},openNewFile:function(e){return this.context.service.document.open(e)},_onIntellisenceInitFinished:function(e){var t=this;return t.context.service.intellisence.executeLinkModelHelper(this._oInsertTerm).then(function(){return t.context.service.intellisence.detachEvent("intellisenceContextInitialized",t._onIntellisenceInitFinished,t),Q()})}}}),define("sap.watt.saptoolsets.fiori.project.testGenerationWizard/service/UpdateSuite",["sap/watt/lib/orion/javascript/esprima/esprimaVisitor"],function(e){"use strict";var t={functionExpression:!1,snippetType:"",offset:"",testExists:!1};return{updateTestNameInSuiteFile:function(e,n,r,i){var o,a=this;t.snippetType=r;var s;if(i)return a.context.service.document.getDocumentByPath(n).then(function(e){return o=e,e.getContent()}).then(function(n){if(s=n,!a._parseAndVerifySuiteContent(n,t))return null;var r=i.getEntity().getFullPath()+"/",u=e.indexOf(".js");u>0&&(e=e.substring(0,u));var c=r+e;return a._fixTestFullPath(c,o,t.snippetType)}).then(function(e){if(e){e='\n"'+e+'"';var n=t.testExists?","+e:e,r=[s.slice(0,t.offset),n,s.slice(t.offset)].join("");return a.context.service.beautifierProcessor.beautify(r,"js")}return Q.reject()}).then(function(e){return e?o.setContent(e,a.context.self).then(function(){return o.save()}):Q.reject()}).fail(function(){a.context.service.log.info("Test generation wizard",a.context.i18n.getText("i18n","OPA_UPDATE_SUITE_FAILED"),["user"]).done(),a.context.service.usernotification.liteNotificationFailure(a.context.i18n.getText("i18n","OPA_UPDATE_SUITE_FAILED")).done()})},validateSuiteContent:function(e,n){var r=this;return t.snippetType=n,""===e||this.context.service.document.getDocumentByPath(e).then(function(e){if(e)return e.getContent()}).then(function(e){return t.snippetType=n,!!r._parseAndVerifySuiteContent(e,t)})},_parseAndVerifySuiteContent:function(n,r){t.functionExpression=!1,t.offset="",t.testExists=!1;var i=e.parse(n);return i.errors.length<1&&e.visit(i,r,this._testSuiteSetupVisitor),!!r.offset},_testSuiteSetupVisitor:function(e,t){return"FunctionExpression"===e.type&&(t.functionExpression=!0),"ArrayExpression"!==e.type||!e.elements||!("OPAPage"===t.snippetType&&t.functionExpression===!1||"OPAJourney"===t.snippetType&&t.functionExpression===!0||"QUnitTest"===t.snippetType&&t.functionExpression===!1)||(e.elements.length>0&&(t.testExists=!0),t.offset=e.range[1]-1,!1)},_fixTestFullPath:function(e,t,n){var r=e.slice(e.indexOf("webapp")+7);return"OPAPage"===n||"OPAJourney"===n?this._getProjectNamespace(t).then(function(t){return t?[t,"/",r].join(""):e}):Q(r)},_getProjectNamespace:function(t){var n=this;return t.getProject().then(function(e){var t=e.getTitle(),r={nRows:1,nStart:0,sFileType:"*.js",sFolderName:"/"+t+"/",sSearchTerm:"Component"};return n.context.service.filesystem.documentProvider.search(r)}).then(function(t){if(t&&t.numFound>0){var r=t.aFileEntries[0];return r.getContent().then(function(t){try{var r=e.parse(t),i={namespace:""};if(e.visit(r,i,n._ui5ProjectNamespaceVisitor),!i.namespace)return null;var o=i.namespace.replace(/\./g,"/");return o}catch(e){return null}})}}).fail(function(){return null})},_ui5ProjectNamespaceVisitor:function(e,t){if("ReturnStatement"===e.type&&e.argument&&e.argument.callee&&e.argument.arguments){var n=e.argument.callee,r=e.argument.arguments;if(n.property&&"Identifier"===n.property.type&&"extend"===n.property.name&&r[0]&&"Literal"===r[0].type){var i=r[0].value;return t.namespace=i.substr(0,i.lastIndexOf(".")),!1}}return!0}}}),define("sap.watt.saptoolsets.fiori.project.testGenerationWizard/service/ExtractSupportedControls",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{_mSupportedControlsByAction:{Press:["sap.m.Button","sap.m.Link","sap.m.StandardListItem","sap.m.IconTabFilter","sap.m.SearchField","sap.m.Page","sap.m.FullscreenPage","sap.m.DetailPage","sap.m.List","sap.m.Table","sap.m.StandardTile"],EnterText:["sap.m.Input","sap.m.SearchField","sap.m.TextArea"]},_getControlActions:function(e){var t=[];return jQuery.each(this._mSupportedControlsByAction,function(n,r){r.indexOf(e)!==-1&&t.push(n)}),t},_visitXmlDoc:function(e,t,n){n.call(this,e,t);for(var r=e.childNodes,i=0;i0){var a=e.getAttribute("id");t.supportedControls.push({sSourceName:t.sourceName,sSourceFullPath:t.sourceFullPath,sClass:i,sId:a||"MISSING_ID",aActions:o})}}},_getFragmentPath:function(e,t){var n=e.replace(t.sNamespace+".",""),r=t.sAppRootPath.concat(n.replace(/\./g,"/"),".fragment.xml");return r},_getFragmentsXmlContextsFromView:function(t,n){for(var r,i,o=t.getElementsByTagNameNS("sap.ui.core","Fragment"),a=this,s=[],u=0;u0?(t.context.service.log.error("ExtractSupportedControls",t.context.i18n.getText("XML_PARSE_ERROR",[e.getEntity().getFullPath()]),["user"]).done(),null):{wattDocument:e,xmlDocument:i}})})},extractSupportedControlsFromView:function(t){var n=this;return t&&e.endsWith(t,"view.xml")?this._getXmlContext(t).then(function(t){return n.context.service.wizardutils.getProjectInfo(t.wattDocument).then(function(e){return n._getFragmentsXmlContextsFromView(t.xmlDocument,e)}).then(function(r){var i=e.concat(r,t),o={supportedControls:[]};return i.forEach(function(e){o.sourceName=e.wattDocument.getName(),o.sourceFullPath=e.wattDocument.getEntity().getFullPath(),n._visitXmlDoc(e.xmlDocument.documentElement,o,n._extractSupportedControlsVisitor)}),o.supportedControls})}).fail(function(e){return n.context.service.log.error("ExtractSupportedControls",n.context.i18n.getText(e.message,["user"])).done(),[]}):[]}}}),define("sap.watt.saptoolsets.fiori.project.testGenerationWizard/service/WizardUtils",["sap/watt/lib/orion/javascript/esprima/esprimaVisitor"],function(e){"use strict";return{_mProjectsInfo:{},updateListOfFiles:function(e,t,n,r,i,o,a){e.service.filesearchutil.getRunnableFiles(r,i).then(function(e){var r=[];r[0]="";for(var i=0;i0){var r=t.aFileEntries[0];return Q.all([r.getEntity().getFullPath(),r.getContent()]).spread(function(t,r){try{var i=e.parse(r),o={namespace:""};if(e.visit(i,o,n._ui5ProjectNamespaceVisitor),!o.namespace)return null;var a={sAppRootPath:t.substr(0,t.indexOf("Component.js")),sNamespace:o.namespace};return a}catch(e){return null}})}}).fail(function(){return null})}return n._mProjectsInfo[r]})},_ui5ProjectNamespaceVisitor:function(e,t){if("CallExpression"===e.type&&e.callee&&e.arguments){var n=e.callee,r=e.arguments;if(n.property&&"Identifier"===n.property.type&&"extend"===n.property.name&&r[0]&&"Literal"===r[0].type){var i=r[0].value;return t.namespace=i.substr(0,i.lastIndexOf(".")),!1}}return!0}}}),define("sap.watt.saptoolsets.fiori.hcp.fiorilaunchpad/command/RegisterToFLP",[],function(){"use strict";function e(e){var t=e.service.selection,n=e.service.repositorybrowserUtils;return n.isSingleFolderNotRootSelection().then(function(e){return e?t.getSelection().then(function(e){return e[0].document.getProject().then(function(e){return e})}):null})}function t(){if(i)return this.context.service.fiorilaunchpad.openWizard(i,"menu");var t=this;return e(t.context).then(function(e){return t.context.service.fiorilaunchpad.openWizard(e,"menu")})}function n(){var t=this,n=sap.watt.getEnv("server_type");return"java"!==n&&"local_hcproxy"!==n&&e(t.context).then(function(e){return i=e,!!e})}function r(){var e=this;return this.context.service.selection.getSelection().then(function(t){return!(!t[0]||!t[0].document)&&t[0].document.getProject(!0).then(function(t){return e.context.service.projectType.hasProjectType(t,"mta").then(function(e){return!e})})})}var i=null;return{execute:t,isAvailable:r,isEnabled:n}}),define("sap.watt.saptoolsets.fiori.hcp.fiorilaunchpad/ui/services/GeneralInfoStepService",{getContent:function(){jQuery.sap.require("sap.watt.saptoolsets.fiori.hcp.plugin.fiorilaunchpad.ui.steps.GeneralInfoStep");var e=new sap.watt.saptoolsets.fiori.hcp.plugin.fiorilaunchpad.ui.steps.GeneralInfoStep({context:this.context}),t=this.context.i18n.getText("GeneralInfoStep_GeneralInfo");return this.context.service.wizard.createWizardStep(e,t,"")}}),define("sap.watt.saptoolsets.fiori.hcp.fiorilaunchpad/ui/services/ConfigureTileStepService",{getContent:function(){var e=this;jQuery.sap.require("sap.watt.saptoolsets.fiori.hcp.plugin.fiorilaunchpad.ui.steps.ConfigureTileStep");var t=new sap.watt.saptoolsets.fiori.hcp.plugin.fiorilaunchpad.ui.steps.ConfigureTileStep({context:e.context}),n=e.context.i18n.getText("ConfigureTileStep_ConfigureTile");return e.context.service.wizard.createWizardStep(t,n,"")}}),define("sap.watt.saptoolsets.fiori.hcp.fiorilaunchpad/ui/services/AssignToStepService",{getContent:function(){jQuery.sap.require("sap.watt.saptoolsets.fiori.hcp.plugin.fiorilaunchpad.ui.steps.AssignToStep");var e=new sap.watt.saptoolsets.fiori.hcp.plugin.fiorilaunchpad.ui.steps.AssignToStep({context:this.context}),t=this.context.i18n.getText("AssignToStep_Title");return this.context.service.wizard.createWizardStep(e,t,"")}}),define("sap.watt.saptoolsets.fiori.hcp.fiorilaunchpad/services/FioriLaunchpad",["sap/watt/lib/lodash/lodash"],function(e){var t=function(){var t,n,r=sap.watt.getEnv("context_root")+"sap/flp/",i="/fiori/flp/designer/v1",o=this,a="Component.js";this._getClient=function(e,t,r){var i;return n?i=Q.resolve(n):(t||(t={Accept:"*/*"}),i=o.context.service.ajaxrequest.createClient(e,t,r)),i},this.isComponentJsExist=function(e){return e.getCurrentMetadata(!0).then(function(e){for(var t=0;t0&&e.id!==n&&("UI5LIB"===e.type||"UI5COMP"===e.type)});return e.map(o,function(t){var n=e.find(i,function(e){return e["sap.app/id"]===t.id});return t.html5AppName=n.html5AppName,t})}).fail(function(e){var t=e.message||e;return o.context.service.log.warn("FioriLaunchpad",t,["user"]).done(),[]}).then(function(t){return e.map(t,function(e){var t=e.id.split(".").join("/"),n="/resources/"+t,r={path:n,target:{type:"application",name:e.html5AppName,preferLocal:!0},description:e.id+" Reuse Library"};return"UI5COMP"===e.type&&(r.target.entryPath=n),r})})})},this.getSites=function(e){var t=r+e+"/fiori/flp/runtime/v1/sites";return o._getClient().then(function(e){return e.get(t)})},this.getGroups=function(e,t){var n=r+e+i+"/groups/site/"+t;return o._getClient().then(function(e){return e.get(n)})},this.getContentPackages=function(e,t){var n=r+e+i+"/content_packages?siteId="+t;return o._getClient().then(function(e){return e.get(n)})};var l=function(e,t){e.push.apply(e,t)};this.getFioriLaunchpadModel=function(e){var t=Q.defer(),n=e+"/flp-config.json";return this.context.service.filesystem.documentProvider.getDocument(n).then(function(n){if(n)n.getContent().then(function(e){var n=jQuery.parseJSON(e);t.resolve(n)}).fail(function(n){n=o.context.i18n.getText("i18n","FioriLaunchpad_flpConfigJsonNotFound",[e]),t.reject(n)});else{var r={};r=o.context.i18n.getText("i18n","FioriLaunchpad_flpConfigJsonNotFound",[e]),t.reject(r)}}).fail(function(n){n=o.context.i18n.getText("i18n","FioriLaunchpad_wasNotFound",[e]),t.reject(n)}),t.promise},this.openWizard=function(e,t,n){return Q.sap.require("sap.watt.saptoolsets.fiori.hcp.fiorilaunchpad/ui/wizard/FLPRegistrationWizard").then(function(r){return r.openWizardUI(o.context,e,t,n)})};var p=function(e){var n=t.replace("/"+a,"");return n=n.replace("/"+e.getEntity().getName(),""),0===n.length&&(n="/"),n};this.getProviderName=function(){var e="flpnwc";return sap.watt.getEnv("internal")&&(e="flpsandbox"),e},this.getAllFioriProviderAccounts=function(e){var t=[],n=[],i={Accept:"*/*"};return o.context.service.ajaxrequest.createClient(null,i).then(function(i){for(var o=0;o=0&&(e=this._sName.substr(t+1)),e},setBackendData:function(e){this._mBackendData=e},getBackendData:function(){return this._mBackendData},getKeyString:function(){var e=this.getVersionId();return this.getType()+":"+this.getFullPath()+":"+this._sDAO+(e?":"+e:"")},getTitle:function(){return this.getName()}},e.fromKeyString=function(t){var n=t.split(":");return new e(n[0],n[1],null,n[2]||"workspace",n[3])},e}),define("sap.watt.saptoolsets.fiori.hcp.heliumrepository/services/HeliumParentProject",["sap.watt.platform.filesystem/document/FileFolderEntity"],function(e){var t=function(){var t=this,n="/",r=function(e,t){if(!e)throw new Error(t+" must be defined.")};this.getModelFolderFiles=function(e,n){r(e,"model folder path"),r(n,"system");var i="/"+n.type+"s/"+n.application+"/content?pathSuffixFilter=.json,metadata.xml";return e=e.substring(0,e.lastIndexOf("/")),t.getFolderFiles(i,e,n)},this.getDocument=function(i,o,a,s){r(i,"resource path"),r(o,"resource type"),r(a,"system"),0===i.indexOf(n)&&(i=i.substring(1));var u=i.lastIndexOf(n),c=i.substring(u+n.length),l=i.substring(0,i.lastIndexOf(n)),p=new e(o,c,l,"heliumFileDao","");return t.context.service.filesystem.documentProvider.createDocumentInternally(p,t.context.service.document.context.event).then(function(e){var t=e.getExtInfo();return t||(t={}),t.origin=a,t.external=!0,t.bBeautify=s,e.setExtInfo(t),e.getProject=function(){return this.getEntity().isProject()?Q(this):Q(null)},e.getContent().thenResolve(e)}).fail(function(e){throw"Authentication_Cancel"!==e.message?(console.log(e),e):new Error(t.context.i18n.getText("i18n","HeliumParentProject_auth_canceled"))})},this.getResourcesFromZipFiles=function(e){for(var t=[],n=0;n0?t.context.service.neoapp.addDestinations(o,n):Q()};this._updateDeployBlockInProjectSettings=function(e,n,r){var i={account:n,name:r,lastVersionWeTriedToDeploy:"1"};return t.context.service.setting.project.setProjectSettings("hcpdeploy",i,e)},this.import=function(e,n,r){var i=[],o="/"+n.type+"s/"+e+"/content",a={responseType:"blob"};return t.context.service.hcpconnectivity.getBlobFromHCP(n.account,null,null,o,a).then(function(o){return r.importZip(o,!0).then(function(){return t.context.service.neoapp.getDestinations(r).spread(function(o,a){return a&&a.routes&&(i=a.routes),l(i,r).then(function(){return Q.all([t.context.service.ui5projecthandler.getAppNamespace(r),t.context.service.fiorilaunchpad.getProviderName()]).spread(function(e,n){return t.context.service.fiorilaunchpad.getDependenciesFromAppIndex(n,e)}).then(function(e){return t.context.service.neoapp.addDestinations(e,r)}).then(function(){return t.context.service.mockpreview.updateSettings(r).then(function(){return t._updateDeployBlockInProjectSettings(r,n.account,e).then(function(){t.context.service.repositorybrowser.setSelection(r,!0).done(),t.context.service.usernotification.liteNotificationInfo(t.context.i18n.getText("i18n","HeliumParentProject_msg_end",[e])).done(),t.context.service.log.info("Import",t.context.i18n.getText("i18n","HeliumParentProject_msg_end",[e]),["user"]).done()})})})})})})})}};return t}),define("sap.watt.saptoolsets.fiori.hcp.heliumrepository/services/HeliumExtensionProject",[],function(){var e=function(){var e=this;this._generateExtensionProject=function(t,n){return e.context.service.template.getTemplatesPerCategories("Fiori_project").then(function(r){for(var i,o,a,s=0;s0&&e.length<=30&&t.test(e))},_setSelectedAccountKeyInModel:function(e,t){var n=sap.ui.getCore().byId("errorTextFieldDeploymentDialog");e.modelData.aHcpAccounts.length>0?e.modelData.sSelectedAccountKey=t:this._handleErrorTextView(n,this._getText("msg_no_accounts"))},_setSelectedAppKeyInModel:function(e,t){var n=sap.ui.getCore().byId("errorTextFieldDeploymentDialog");e.modelData.aHcpApps.length>0?e.modelData.sSelectedAppKey=t:this._handleErrorTextView(n,this._getText("msg_no_apps"))},_insertEmptyListItemToAppComboBox:function(){var e=this._oDeploymentFragment.deployedAppNameCombobox,t=e.getItems()[0];if(t&&"emptylistitem"!==t.getId()){var n=new sap.ui.core.ListItem("emptylistitem",{text:"",key:""});e.insertItem(n,0)}},_parseError:function(e){var t="";if(0===e.indexOf("");n.html(e);var r=$("h1",n);if(r&&r.length>0)t=r[0].innerHTML;else{var i=$("title",n);t=i&&i.length>0?i[0].innerHTML:e}}else t=e;return t},_handleGetAccountsButton:function(e){var t,n=this,r=this._oDlg.getModel();return this._oContext.service.hcpauthentication.authenticate(!0).then(function(e){return t=e,n._oContext.service.hcpconnectivity.getHCPAccounts(e.member,e.username,e.password).then(function(e){e.length>0&&r.setProperty("/modelData/aHcpAccounts",e)})}).fail(function(e){if(401===e.status)n._setErrorMsgInDialog({value:n._oContext.i18n.getText("getaccounts_unauthorized")},!1),n._oContext.service.system.getSystemInfo().then(function(e){return n._oContext.service.keystorage.delete(e.sAccount,"HTTPS",t.username,t.password)}).done();else if(403===e.status)n._setErrorMsgInDialog({value:n._oContext.i18n.getText("getaccounts_forbidden")},!1);else if(e.info){var r=n._parseError(e.info);n._setErrorMsgInDialog({value:n._oContext.i18n.getText("getaccounts_generalmessagewitherror",[r])},!1)}else n._setErrorMsgInDialog({value:n._oContext.i18n.getText("getaccounts_generalmessage")},!1)})},_handleSelectDeployAction:function(e){var t=this,n=this._oDlg.getModel(),r=n.oData.modelData,i=this._oDeploymentFragment.oDeployActionsRadioButtons,o=i.getSelectedItem().mProperties.key,a=r.sSelectedAppKey;if(o===this.NEW_KEY)n.setProperty("/modelData/iSelectedDeployAction",this.DEPLOY_NEW_APP),n.setProperty("/modelData/version","1.0.0"),n.setProperty("/modelData/str_deployedappname",r.sSuggestedAppName),n.setProperty("/modelData/deploymentState",t.STATUS_NOT_FOUND_IN_HCP),this._setInfoMsg(r,null),this._validateVersionAndAppFields(r);else{if(n.setProperty("/modelData/iSelectedDeployAction",this.DEPLOY_EXISTING_APP),!r.oAppInfo)return t._oContext.service.hcpconnectivity.getApps(r.sSelectedAccountKey).then(function(e){n.setProperty("/modelData/aHcpApps",e),t._insertEmptyListItemToAppComboBox(),n.setProperty("/modelData/sSelectedAppKey",""),n.setProperty("/modelData/deploymentState",t.STATUS_NOT_FOUND_IN_HCP),n.setProperty("/modelData/version","1.0.0"),t._setInfoMsg(r,r.oAppInfo),t._validateVersionAndAppFields(r)});if(""!==a){var s=t.getNewVersion(r.activeVersion,r.versions);n.setProperty("/modelData/version",s),n.setProperty("/modelData/deploymentState",t.STATUS_FOUND_IN_HCP)}else n.setProperty("/modelData/version","1.0.0");t._setInfoMsg(r,r.oAppInfo),t._validateVersionAndAppFields(r)}},_setInfoMsg:function(e,t){var n=this._oDlg.getModel();e.bBuildSupported&&!t?n?n.setProperty("/modelData/infoMessage",this._oContext.i18n.getText("buildInfoMsg")):e.infoMessage=this._oContext.i18n.getText("buildInfoMsg"):e.bBuildSupported&&t?n?n.setProperty("/modelData/infoMessage",this._oContext.i18n.getText("alreadyDeployedWithBuildInfoMsg")):e.infoMessage=this._oContext.i18n.getText("alreadyDeployedWithBuildInfoMsg"):!e.bBuildSupported&&t&&(n?n.setProperty("/modelData/infoMessage",this._oContext.i18n.getText("alreadyDeployedInfoMsg")):e.infoMessage=this._oContext.i18n.getText("alreadyDeployedInfoMsg"))},_handleChangeOfAppNameCombobox:function(e){var t=this,n=this._oDlg.getModel(),r=e.getParameter("newValue").trim(),i=n.oData.modelData.sSelectedAccountKey,o=n.oData.modelData.str_username,a=n.oData.modelData.str_password;return this._validateAllInputs(),""!==r?Q.all([this._oContext.service.hcpconnectivity.getAppVersions(i,o,a,r),this._oContext.service.hcpconnectivity.getAppInfo(i,o,a,r)]).spread(function(e,r){n.setProperty("/modelData/oAppInfo",r);var i=r.url;i=t._addHcResetParameter(i),n.setProperty("/modelData/applicationURL",i),n.setProperty("/modelData/applicationState",r.status),n.setProperty("/modelData/version",t.getNewVersion(r.activeVersion,e)),n.setProperty("/modelData/versions",e),n.setProperty("/modelData/deploymentState",t.STATUS_FOUND_IN_HCP),t._setInfoMsg(n.oData.modelData,r),t._validateAllInputs()}):void n.setProperty("/modelData/deploymentState",this.STATUS_NOT_FOUND_IN_HCP)},_handleChangeOfAccountCombobox:function(e){var t=this,n=this._oDlg.getModel(),r=this._oDeploymentFragment.heliumAccountCombobox.getSelectedKey();return n.setProperty("/modelData/sSelectedAccountKey",r),n.setProperty("/modelData/aHcpApps",[]),this._oContext.service.hcpauthentication.authenticate(!0).then(function(e){return t._oContext.service.hcpconnectivity.getApps(r,e.username,e.password).then(function(e){n.setProperty("/modelData/aHcpApps",e),t._insertEmptyListItemToAppComboBox(),n.setProperty("/modelData/sSelectedAppKey",""),n.setProperty("/modelData/deploymentState",t.STATUS_NOT_FOUND_IN_HCP),n.setProperty("/modelData/version","1.0.0"),t._setInfoMsg(n.getData().modelData,null),t._validateAllInputs()})})},_setParamsInModel:function(){var e=this._oDlg.getModel();e.setProperty("/modelData/str_account",e.oData.modelData.sSelectedAccountKey),e.setProperty("/modelData/bDeployButton",!1),e.oData.modelData.iSelectedDeployAction===this.DEPLOY_EXISTING_APP?e.setProperty("/modelData/str_deployedappname",e.oData.modelData.sSelectedAppKey):e.setProperty("/modelData/oAppInfo",null)},_handleChangeOfAppNameTextField:function(e){var t,n,r=sap.ui.getCore().byId("deployedappnameField"),i=sap.ui.getCore().byId("errorTextFieldDeploymentDialog");return void 0!==e?(t=e.getParameter("liveValue").trim(),n=!0):(t=r.getValue().trim(),n=!1),this._validateHeliumAppName(t)?(this._handleValidInput(r,n),this._handleErrorTextView(i,null),this._validateAllInputs({appName:t}),!0):(this._handleInvalidInput(r),this._handleErrorTextView(i,this._getText("msg_appnameconvention")),this._validateAllInputs({appName:t}),!1)},_reportError:function(e,t){t===!0&&this._oDlg.getModel().setProperty("/modelData/bDeployButton",!1);var n=sap.ui.getCore().byId("errorTextFieldDeploymentDialog");this._handleErrorTextView(n,e)},_resetVersionAndActivateFields:function(){var e=sap.ui.getCore().byId("activationCheckBox");e.setEnabled(!0),e.setChecked(!0)},_validateVersion:function(e){var t=/^[a-zA-Z0-9_]+([\.\/]?[^^\.\\/\/!$@%^&*()+|~=`{}\[\]:";'<>?,])*$/;return!(!(e&&e.length>0&&""!==e&&t.test(e))||this._versionExist(e))},_handleVersion:function(e){var t,n,r=sap.ui.getCore().byId("versionField"),i=sap.ui.getCore().byId("errorTextFieldDeploymentDialog");return void 0!==e?(t=e.getParameter("liveValue").trim(),n=!0):(t=r.getValue().trim(),n=!1),this._versionExist(t)?(this._handleInvalidInput(r),this._handleErrorTextView(i,this._oContext.i18n.getText("msg_version_exists_validation")),this._validateAllInputs({version:t}),void 0):this._validateVersion(t)?(this._handleValidInput(r,n),this._handleErrorTextView(i,null),this._validateAllInputs({version:t}),!0):(this._handleInvalidInput(r),this._handleErrorTextView(i,this._oContext.i18n.getText("msg_version_convention")),this._validateAllInputs({version:t}),!1)},_handleActivationCheckBox:function(e){var t=e.getSource();t.rerender()},_validateVersionAndAppFields:function(e){this._handleVersion(),e.iSelectedDeployAction===this.DEPLOY_NEW_APP&&this._handleChangeOfAppNameTextField()},_validateAllInputs:function(e){var t=this._oDlg.getModel().getData().modelData,n=t.version,r=t.str_deployedappname;e&&(e.version&&(n=e.version),null!==e.appName&&(r=e.appName)),t.iSelectedDeployAction===this.DEPLOY_EXISTING_APP&&(r=t.sSelectedAppKey),this._validateHeliumAppName(r)&&this._validateVersion(n)&&t.aHcpAccounts.length>0?this._oDlg.getModel().setProperty("/modelData/bDeployButton",!0):this._oDlg.getModel().setProperty("/modelData/bDeployButton",!1)},_bindEnterPress:function(e){var t=this;e.attachBrowserEvent("keyup",function(e){13===e.keyCode&&t._oDlg.getModel().getProperty("/modelData/bDeployButton")&&t._execute()})},_handleErrorTextView:function(e,t){t?(e.setText(t),e.hasStyleClass("sapUiHidden")&&e.removeStyleClass("sapUiHidden")):(e.setText(""),e.hasStyleClass("sapUiHidden")||e.addStyleClass("sapUiHidden"))},_handleValidInput:function(e,t){t&&this._markAsValid(e)},_handleInvalidInput:function(e){this._markAsInvalid(e)},_markAsValid:function(e){e.removeStyleClass("inputError"),e.addStyleClass("inputConfirmed");var t=jQuery("#"+e.getId());t.animate({opacity:"1"},2e3,function(){e.removeStyleClass("inputConfirmed")})},_markAsInvalid:function(e){e.removeStyleClass("inputConfirmed"),e.addStyleClass("inputError")},_showDialogMessage:function(e,t,n,r){"alert"===e&&sap.ui.commons.MessageBox.alert(t,r,n,null)},_getText:function(e){if(this._oContext){var t=this._oContext.i18n;return t.getText("i18n",e)}return e},_setErrorMsgInDialog:function(e,t){e.value?this._reportError(e.value,t):this._reportError(this._getText(e.msgKey),t),this._oDlg.setBusy(!1)},getAppURI:function(){var e=this._oDlg.getModel().getData().modelData;return this._oContext.service.deployment.getAppURI(e.str_account,e.str_username,e.str_password,e.str_deployedappname)}};return i}),define("sap.watt.saptoolsets.fiori.hcp.deployment/util/OrionGit",[],function(){"use strict";var e={_fileService:null,_gitService:null,_initService:function(e){this._gitService=e.service.git,this._fileService=e.service.filesystem},_getOrionGitRepos:function(e){return this._gitService.getRepositoriesList(e).fail(function(e){throw e.action="orion_getrepos",e})},_initOrionGitRepo:function(e,t){var n,r=this;return this._fileService.documentProvider.getRoot().then(function(i){return n=i,r._gitService.initRepository(e,i.getEntity().getBackendData().location,t)}).then(function(){return n.refresh()}).fail(function(e){throw e.action="orion_initrepo",e})},_getRemotesOfOrionGit:function(e){return this._gitService.getRemotes(e).fail(function(e){throw e.action="orion_getremotes",e})},_getRemoteOrionGit:function(e){return this._gitService.getRemoteBranches(e).fail(function(e){throw e.action="orion_getremote",e})},_addHeliumAsOrionRemoteGit:function(e,t){return this._gitService.addRemote(e,"origin",t).fail(function(e){throw e.action="orion_addremote",e})},_deleteRemoteOrionGit:function(e,t){return this._gitService.deleteRemote(e,t).fail(function(e){throw e.action="orion_deleteremote",e})},_fetchFromRemoteGit:function(e,t,n){var r=this;return this._gitService.getRepositoryDetails(e).then(function(i){return r._gitService.fetch(e,i,"",n,t)}).fail(function(e){throw e.action="orion_fetchfromremote",e})},_getStatusOrionGit:function(e){return this._gitService.getStatus(e).fail(function(e){throw e.action="orion_getstatus",e})},_stageChangesOrionGit:function(e,t){return this._gitService.stageMultipleFiles(e,t).fail(function(e){throw e.action="orion_stage",e})},_getConfigOrionGit:function(){return this._gitService.getGitSettings().fail(function(e){if(e&&404===e.status&&"git"===e.source){var t={};return t.name="",t.email="",t}throw e.action="orion_getconfig",e})},_commitChangesOrionGit:function(e,t){return"undefined"==typeof t&&(t="project template"),this._gitService.commit(e,t,void 0,!1,"").fail(function(e){throw e.action="orion_commit",e})},_rebaseChangesOrionGit:function(e){return this._gitService.rebase(e,"origin/master").fail(function(e){throw e.action="orion_reabse",e})},_mergeChangesOrionGit:function(e){return this._gitService.mergeChangesFromRemoteToHead(e,"origin/master").fail(function(e){throw e.action="orion_merge",e})},_pushAllToRemoteGit:function(e,t,n){var r=this;return this._gitService.getRepositoryDetails(e).then(function(i){return r._gitService.push(e,!1,i,"",n,t)}).fail(function(e){throw e.action="orion_pushtoremote",e})},_setRepoConfigurations:function(e){var t=this;return this._gitService.setRepositoryConfiguration(e,{Key:"branch.master.merge",Value:"refs/heads/master"}).then(function(){return t._gitService.setRepositoryConfiguration(e,{Key:"branch.master.remote",Value:"origin"})}).fail(function(e){throw e.action="orion_setrepoconfig",e})}};return e}),define("sap.watt.saptoolsets.fiori.hcp.deployment/service/Deployment",["../util/DeployDialogHelper","../util/OrionGit","sap/watt/lib/lodash/lodash"],function(e,t,n){"use strict";var r="Forbidden",i="hcpdeploy",o="neo-app.json",a="index.html",s="default Account",u="non-default Account",c="Redploy",l="Deploy";return{NEO_APP_FILE_NAME:"neo-app.json",init:function(){},getDeployedAppInfo:function(e,t,n,r){var i=this;return i.context.service.hcpconnectivity.getAppInfo(n,e,t,r).then(function(e){return e}).fail(function(e){if(404===e.status)return null;throw e})},_getAccountFromProjectSettings:function(e){var t=this;return t.context.service.setting.project.getProjectSettings(i,e).then(function(e){return e&&e.account?e.account:t._getDefaultAccount()})},initializeParams:function(e){var t=this;return e.getProject(!0).then(function(e){var n={appname:e.getEntity().getName(),deployedappname:null,account:null,username:null},r={helium:n,projectDocument:e,entity:e.getEntity()};return t._getAccountFromProjectSettings(e).then(function(e){return r.helium.account=e,r})})},_initDeployedAppName:function(e){var t=this,n=e.projectDocument;return t.context.service.setting.project.getProjectSettings(i,n).then(function(t){if(t&&t.name)e.helium.deployedappname=t.name;else{var n=e.helium.appname,r=/^[a-z][0-9a-z]*$/;n.length>30&&(n=n.substring(0,30)),r.test(n)||(n=n.replace(/[^a-z\d\s]+/gi,"")),e.helium.deployedappname=n.toLowerCase()}})},getDefaultDeploymentAppName:function(e){var t=e.getEntity().getName(),n=/^[a-z][0-9a-z]*$/;return t.length>30&&(t=t.substring(0,30)),n.test(t)||(t=t.replace(/[^a-z\d\s]+/gi,"")),t.toLowerCase()},getIsWelcomeFileExistOnHCP:function(e,t,n,r,i){var o=this;return this._getWelcomeFilePath(i).then(function(i){return o.context.service.hcpconnectivity.isWelcomeFileExistOnHCP(e,t,n,r,i).then(function(e){return e}).fail(function(){return!1})})},getRelevantAccount:function(e,t,n,r){return e?Q(e):r&&r.providerAccount?Q(r.providerAccount):t&&t.account?Q(t.account):Q(n)},getRelevantAppName:function(e,t,n,r){return e?Q(e):r&&r.appName?Q(r.appName):t&&t.name?Q(t.name):Q(n)},createDeploymentDialogData:function(e,t){var r=this,o={bIsGetAccountsButtonVisible:!1,projectName:e.getEntity().getName(),projectDocument:e,applicationName:null,account:null,hcpApps:null,hcpAccounts:null,username:t.username,password:t.password,member:t.member,appInfo:null,appVersions:null};return r.context.service.ui5projecthandler.isManifestProjectGuidelinesType(e).then(function(t){if(t)return r.context.service.ui5projecthandler.getAttribute(e,"sap.platform.hcp")}).then(function(a){return Q.all([r.context.service.hcpconnectivity.getIsSAPIdP(),r.context.service.hcpconnectivity.getHCPDefaultAccount(),r.context.service.hcpconnectivity.getHCPAccountFromGitRepository(e),r.context.service.hcpconnectivity.getHCPAppNameFromGitRepository(e,t.username,t.password),r.context.service.setting.project.getProjectSettings(i,e),r.getDefaultDeploymentAppName(e),r.context.service.platform.builder.isBuildSupported(e)]).spread(function(e,t,i,s,u,c,l){return o.bIsGetAccountsButtonVisible=e,o.bBuildSupported=l,o.suggestedAppName=c,o.defaultAccount=t,r.getRelevantAccount(i,u,t,a).then(function(e){return o.account=e,Q().then(function(){return o.account===o.defaultAccount?Q([{name:o.account}]):r.context.service.hcpconnectivity.getHCPAccounts(o.member,o.username,o.password).fail(function(){return[{name:o.account}]})}).then(function(e){return o.hcpAccounts=e,r.getRelevantAppName(s,u,c,a).then(function(e){o.applicationName=e;var a=n.map(o.hcpAccounts,"name");return n.includes(a,o.account)?i&&s?r.getDeployedAppInfo(o.username,o.password,o.account,o.applicationName):u&&u.account&&u.name?r.getDeployedAppInfo(o.username,o.password,o.account,o.applicationName):null:(o.account=t,null)}).then(function(e){return o.appInfo=e,e?Q.all([r.context.service.hcpconnectivity.getAppVersions(o.account,o.username,o.password,o.applicationName),r.getIsWelcomeFileExistOnHCP(o.username,o.password,o.account,o.applicationName,o.projectDocument)]).spread(function(e,t){return o.appVersions=e,o.bWelcomeFileExistOnHCP=t,o}):(o.account=t,o.applicationName=c,o)}).then(function(){return r.context.service.hcpconnectivity.getApps(o.account,o.username,o.password).fail(function(){return[{name:o.applicationName}]})}).then(function(e){o.hcpApps=e})})})}).then(function(){return o})})},isPomXmlExist:function(e){return e.getCurrentMetadata(!0).then(function(e){for(var t=0;t0){var n=URI(t).search({hc_commitid:e[0].commitId}).toString();a.commitURI=n}else a.commitURI=t;return a})},getLinkToAppPageOnHCP:function(e,t){return this.context.service.hcpconnectivity.getLinkToCockPit(e).then(function(e){var n=e.split("/"),r=n.indexOf("accountdashboard");return r>-1&&n.splice(r,1),n.push("html5app"),n.push(t),n.push("dashboard"),n.join("/")})},_handleDeployErrors:function(e,t){e.context.service.usernotification.liteNotificationInfo(e.context.i18n.getText("i18n","DeployLogFailureMsg")).done();var n={msgKey:"",disableDeployButton:!1};if("undefined"!=typeof t.action){if("Unauthorized"===t.info)return n.msgKey="msg_unauthorized",e.context.service.usagemonitoring.report("deployment","deploy_to_hcp",n.msgKey).done(),n;if(t.info===r&&403===t.status)return n.msgKey="msg_forbidden",e.context.service.usagemonitoring.report("deployment","deploy_to_hcp",n.msgKey).done(),n;switch(t.action){case"heliumDeployContent":try{var i=JSON.parse(t.info);i.message?n.value=i.message:n.msgKey="deployment_content_error"}catch(e){n.msgKey="deployment_content_error"}break;case"hcp_build":n.msgKey="deployment_cannotbuild";break;case"hcp_connectivity_getapps":n.msgKey="msg_hcp_connectivity_getapps";break;case"hcp_connectivity_createapp":if(409===t.status)try{var o=JSON.parse(t.info);"1001"===o.code?n.msgKey="msg_heliumapp_git_exist":"1007"===o.code?n.msgKey="msg_heliumapp_git_not_exist":n.msgKey="msg_heliumapp_exist"}catch(e){n.msgKey="msg_heliumapp_exist"}else n.msgKey="msg_heliumapp_notcreated";break;case"hcp_connectivity_getappinfo":n.msgKey="msg_hcp_connectivity_getappinfo";break;case"unsupported_deployment":n.msgKey="msg_unsupported_deployment";break;case"app_version_exists":n.msgKey="msg_unsupported_deployment",n.disableDeployButton=!0;break;case"heliumActivateApp":n.msgKey="msg_activate_app";break;case"deployment_rename_or_update_app":n.msgKey="msg_rename_or_update_app",n.value=e.context.i18n.getText("i18n","msg_rename_or_update_app",[t.sDeployedAppName]);break;case"app_id_exists":n.disableDeployButton=!0,n.appId=t.appId,n.value=e.context.i18n.getText("i18n","App_Id_Exists_Error_Message",[t.appId]);break;default:n.msgKey="msg_unhandled_error"}return e.context.service.usagemonitoring.report("deployment","deploy_to_hcp",n.msgKey).done(),n}return n={title:"dlg_error",message:"msg_fail_heliumservices",info:""}},_addCacheControls:function(e){var t=this;return e.objectExists(this.NEO_APP_FILE_NAME).then(function(n){if(n){var r=[],i={path:"**.html",directive:"private",maxAge:0};return r.push(i),i={path:"sap-ui-cachebuster-info.json",directive:"private",maxAge:0},r.push(i),i={directive:"public",maxAge:31536e3},r.push(i),t.context.service.neoapp.addCacheControls(r,e,!1)}})},_setHCPPlatformBlock:function(e,t,r,i){var o=this;return o.context.service.ui5projecthandler.isManifestProjectGuidelinesType(e).then(function(a){return a?Q.all([o.context.service.ui5projecthandler.getHandlerFilePath(e),o.context.service.ui5projecthandler.getAttribute(e,"sap.platform.hcp")]).spread(function(a,s){var u=n.drop(a.split("/"),2).join("/");s.uri=u;var c=s._version;if(c)try{var l=parseFloat(c);l>=1.4&&(s.providerAccount=t,s.appName=r,s.appVersion=i)}catch(e){}return o.context.service.ui5projecthandler.setHCPPlatformBlock(e,s)}):Q()})},_createExportZip:function(e){var t=this;return t.context.service.platform.builder.isBuildSupported(e).then(function(n){if(n){var r={triggeredBy:"Deploy to HCP"};return t.context.service.platform.builder.build(e,r).then(function(){return t.context.service.platform.builder.getTargetFolder(e).then(function(e){return e.exportZip()})})}return e.exportZip()})},_buildAppInfoAndVersion:function(e,t){return{appInfo:e,version:t}},_getNewVersionForGitConflict:function(t,n,r){return t=e.getNewVersion(t,n),r.setProperty("/modelData/version",t),t},_getRepositoryForCreateApp:function(e,t,r){var i;if(e){var o=new URI(e);i=o.path(),n.startsWith(i,"/")&&(i=i.substring(1)),n.startsWith(i,t)||(i=void 0),n.endsWith(i,r)||(i=void 0)}return i},_isVersionExist:function(e,t){var n=0;for(n;t&&n0){for(var n=[],r=0;r0&&(t=n[0].value),t},r=function(e,t){var n,r=$(e).find("atom\\:content, content");if(r&&r.length>0){var i=r[0];n=jQuery(i).attr("src"),n=URI(n).absoluteTo(t).toString()}return n},i=function(e,t){var n,r=jQuery(e).find("[rel='appindex']");if(r&&r.length>0){var i=r[0];n=jQuery(i).attr("href"),n=URI(n).absoluteTo(t).toString()}return n},o=function(e,t){var n="",r=0;if(e.deleted.length>0){for(n=n+t.i18n.getText("i18n","DeployWizard_Deleted")+"\n",r=0;r0){for(n=n+t.i18n.getText("i18n","DeployWizard_Updated")+"\n",r=0;r0){for(n=n+t.i18n.getText("i18n","DeployWizard_Created")+"\n",r=0;r0)return e.Children[0].GitUrl}):Q()},u=function(e){var n="";if(0===e.indexOf("");o.html(e);var a=$("h1",o);if(a&&a.length>0)n=a[0].innerHTML;else{var s=$("title",o);n=s&&s.length>0?s[0].innerHTML:e}}else n=e;return n};return{getXmlBaseUrl:n,getContentUrl:r,getAppIndexUrl:i,getGitUrl:s,buildUpdateMessage:a,parseResponseText:u}}),define("sap.watt.saptoolsets.fiori.abap.abaprepository/service/ABAPRepository",["sap/watt/platform/plugin/utils/xml/XmlUtil","../utils/ABAPRepositoryConstants","../ui/dialog/IndexMessagesDialog","../utils/DeploymentUtility","sap/watt/lib/lodash/lodash","sap/watt/lib/jqueryxpathplugin/jquery.xpath"],function(e,t,n,r,i){var o=function(){var o=this,a=" ",s=1,u=1,c=!1,l={},p="sap";this.getdeployInProgress=function(){return c},this.openDeployWizard=function(e){return Q.sap.require("sap/watt/saptoolsets/fiori/abap/plugin/abaprepository/ui/wizard/DeployWizard").then(function(t){return t.openWizard(o.context,e)})};var f=function(e,t){t=encodeURIComponent(t);var n=e.filestore_ui5_bsp+"/"+t;return Q.sap.ajax({type:"GET",url:n,headers:{"X-CSRF-Token":e.csrfToken}})},d=function(e){var t=e.proxyUrlPrefix+e.appIndexUrl;return Q.sap.ajax({type:"POST",url:t,headers:{Accept:"*/*","Content-Type":"application/octet-stream","X-CSRF-Token":e.csrfToken}})},h=function(e){var t=e[0],r=$(t).xpath("//*:MESSAGES/*");if(!r||0===r.length)return void o.context.service.log.info(o.context.i18n.getText("i18n","DeployToBSPDialog_DeployLogTitle"),o.context.i18n.getText("i18n","ABAPRepository_AppIndexInfo"),["user"]).done();for(var i=[],a=0;a0&&(d+=" - "+c),o.context.service.log.info("Application Index",d,["user"]).done()}}i.length>0&&n.open(o.context,i).done()};this.createApplication=function(e,t){if(c=!0,s=1,u=t.remoteDocuments.length,e.filestore_ui5_bsp)return o.postFolder(a,t.name,e,t).then(function(n){var i=n[0],o=r.getXmlBaseUrl(i);e.xmlBaseValue=o;var a=r.getContentUrl(i,o);l.root=a;var s=r.getAppIndexUrl(i,o);e.appIndexUrl=s;var u=x(t.remoteDocuments);return m(u,0,e,t).then(function(){var n=b(t.remoteDocuments);return y(n,0,e,t).then(function(){return e.appIndexUrl?d(e).then(function(e){return h(e)}):Q()})})}).catch(function(e){c=!1;var n;n=e.responseText?r.parseResponseText(e.responseText):e.message,o.context.service.log.error(o.context.i18n.getText("i18n","DeployToBSPDialog_DeployLogTitle"),o.context.i18n.getText("i18n","DeployWizard_FileError2",[t.name,n]),["user"]).done(),o.context.service.usagemonitoring.report("deployment","deploy_to_abap",n).done();var i={message:o.context.i18n.getText("i18n","DeployWizard_FileError2",[t.name,n])};return Q.reject(i)});throw new Error(o.context.i18n.getText("i18n","ABAPRepositoryService_DeployFailed_filestoreui5bspNotFound"))};var m=function(e,t,n,i){var a;if(t||(t=0),t0&&(t=e.substr(n+1)),t},v=function(e){switch(g(e).toLowerCase()){case"jpg":case"jpeg":case"gif":case"ico":case"png":case"ttf":case"zip":case"jar":case"war":case"bmp":case"tif":case"tiff":return!0;default:return!1}},y=function(e,n,i,a,p){n||(n=0);var f;if(p||(p=t.CREATE_ACTION),n-1){var n=e.split("/");t=n[0]}return t},this.isPomXmlExist=function(e){return e.getCurrentMetadata(!0).then(function(e){for(var t=0;t0)return t}return null}).fail(function(){return null})},this.getUI5VersionOnABAP=function(e,t){var n=e.ui5_rt_version;return Q.sap.ajax({url:n,dataType:"json",cache:!1}).then(function(e){return e}).fail(function(e){if(200===e.status&&"OK"===e.statusText)return e.responseText;var n;return e.responseText?n=r.parseResponseText(e.responseText):e.message&&(n=e.message),o.context.service.log.warn(o.context.i18n.getText("i18n","DeployToBSPDialog_DeployLogTitle"),o.context.i18n.getText("i18n","DeployWizard_FailedToGetUI5Version",[t.description,n]),["user"]).done(),null})},this.parseDependenciesResponse=function(e,t){var n=[];if(e&&t&&t.length>0){var r=e[t];if(r){var o=r.dependencies;o&&o.length>0&&(n=i.remove(o,function(e){return e.url.length>0&&e.id!==t}))}}return n};var A=function(e,t){var n=t.id;n=n.split(".").join("/");var r={path:"/resources/"+n,target:{type:"destination",name:e.name,entryPath:t.url,preferLocal:!0},description:n+" Reuse Library"};return r},P=function(e,t){var n="/sap/bc/ui2/app_index/ui5_app_info",r=e.proxyUrlPrefix+n,i={};return i.id=t,e.sapClient&&e.sapClient.length>0&&(i["sap-client"]=e.sapClient),r=URI(r).search(i).toString(),Q.sap.ajax({type:"GET",url:r})};this.getDependenciesAsNeoappRoutes=function(e,t){var n=[];return e&&t&&0!==t.length?o.getDependencies(e,t).then(function(t){for(var r,i=0;i0&&(n=o.parseDependenciesResponse(e[0],t)),n}):n}};return o}),define("sap.watt.saptoolsets.fiori.abap.abaprepository/service/BSPParentProject",["sap/watt/platform/plugin/utils/xml/XmlUtil","sap.watt.platform.filesystem/document/FileFolderEntity","sap/watt/lib/jszip/jszip-shim","../utils/DeploymentUtility"],function(e,t,n,r){var i=function(){var i=this,o="%2f",a={};this.getFileResourcesInfo=function(e,t,n,r){if(r||(r={filestore_ui5_bsp:"/destinations/"+t.name+"/sap/bc/adt/filestore/ui5-bsp/objects"}),r.filestore_ui5_bsp){var o=[],a=[],s=l(r,e,o,e,n);return a.push(s),Q.all(a).spread(function(){return o})}throw new Error(i.context.i18n.getText("i18n","ABAPRepositoryService_DeployFailed_filestoreui5bspNotFound"))};var s=function(e,t){return e.indexOf(t)>-1},u=function(e){return s(e,"/")?encodeURIComponent(e):e},c=function(e){return s(e,"%2f")?decodeURIComponent(e):e};i._getLocalFullName=function(e,t,n){if(!e||!t||!n)return"";var r=c(e),i=r.replace(t,n);return i};var l=function(t,n,s,c,p){n=u(n);var f=t.filestore_ui5_bsp+"/"+n+"/content";return Q.sap.ajax({url:f,dataType:"xml",cache:!1}).then(function(u){for(var f=[],d=e.firstElementChild(u[0]).childNodes,h=d.length,m=0;m0)return i.context.service.neoapp.addDestinations(e,t)}).fail(function(e){var t=e.responseText,o=r.parseResponseText(t);i.context.service.log.error(i.context.i18n.getText("i18n","Import_ImportTitle"),i.context.i18n.getText("i18n","ImportFromABAP_FailedToGetDependencies",[n,o]),["user"]).done()})})})})};var h=function(e,t,n){i.context.service.log.info("Import from SAPUI5 ABAP Repository",i.context.i18n.getText("i18n","BSPParentProject_msg_report",[e,t,n]),["user"]).done()},m=function(e,t,n,r,o){return n.importZip(t,!0).then(function(){return i.context.service.log.info("Import",i.context.i18n.getText("i18n","Updating_neoapp"),["user"]).done(),i._updateNeoAppJson(o,n).then(function(){return i.context.service.log.info("Import",i.context.i18n.getText("i18n","Updating_projectjson"),["user"]).done(),i.context.service.mockpreview.updateSettings(n).then(function(){return i.context.service.abaprepository.updateProjectJsonWithDeploy(r,n.getEntity().getFullPath(),e)})})})};this._handleBuiltProject=function(e){return e.getCurrentMetadata(!0).then(function(t){for(var n=0;n-1&&(s=s.substr(u+c.length)),jQuery.sap.endsWith(s,".xml")?a.file(s,e):n.test(s)&&a.file(s,e)),Q()}).catch(function(e){var n=t.path.split(o).join("/");i.context.service.log.error(i.context.i18n.getText("i18n","Import_ImportTitle"),i.context.i18n.getText("i18n","Import_ImportError",[t.type+" "+n,e]),["user"]).done();var r=t.type;return r=r.charAt(0).toUpperCase()+r.slice(1),Q.reject({error:r+" "+n+": "+e+"\n"})})},this.import=function(e,t,n,r){return i.context.service.log.info("Import",i.context.i18n.getText("i18n","importOriginalApplicationInProcess"),["user"]).done(),i.context.service.destination.getDestinations("dev_abap").then(function(o){var a=d(o,t);return i.importResourceAsZip(e,t,a,r).then(function(r){var o=r.generate({type:"blob"});return m(t,o,n,e,a).then(function(){return i._handleBuiltProject(n).then(function(){i.context.service.repositorybrowser.setSelection(n,!0).done(),i.context.service.usernotification.liteNotificationInfo(i.context.i18n.getText("i18n","BSPParentProject_msg_end",[e])).done(),i.context.service.log.info("Import",i.context.i18n.getText("i18n","BSPParentProject_msg_end",[e]),["user"]).done()})})})})},this.importResourceAsZip=function(e,t,r,o){var a=new n;return i.getFileResourcesInfo(e,t,null,o).then(function(n){if(0===n.length)return a;for(var o=n.length,s=[],u=0;u"+n+"";return o+=t?"/sap/bc/adt/filestore/ui5-bsp/objects/"+t+"/$create":"",u.context.service.abapdestination.getRestResource(r).then(function(e){return e.post({url:i,data:o,headers:{Accept:"text/plain","X-sap-adt-profiling":"server-time","Content-Type":"application/vnd.sap.as+xml; charset=utf-8; dataname=com.sap.adt.CreateCorrectionRequest"}}).then(function(e){return e.data.replace("/com.sap.cts/object_record/","")}).fail(function(e){throw l(e),e.message=u.context.i18n.getText("i18n","Transport_CreateRequestFailed")+e.message,e})})}throw new Error(u.context.i18n.getText("i18n","Transport_CreateFailed_transportsNotFound"))})},this.getApplicationInfo=function(e,t){return s(t).then(function(n){return n&&null!==n?c("",e,"","$new",t,n).then(function(e){var t;t="string"==typeof e?e:(new XMLSerializer).serializeToString(e);var n=$(jQuery.sap.parseXML(t)),r=n.find("DEVCLASS").text(),i=n.find("LOCKS>CTS_OBJECT_LOCK>LOCK_HOLDER>REQ_HEADER>TRKORR").text();return""===i&&(i=void 0),{transportValue:i,packageValue:r}}):{transportValue:void 0,packageValue:"$TMP"}}).fail(function(e){throw l(e),e})},this.getTransports=function(e,t,n){return s(n).then(function(r){if(r&&null!==r){var i="I",o="$create";return c(e,t,i,o,n,r)}throw new Error(u.context.i18n.getText("i18n","Transport_GetTransportsFailed_transportchecksNotFound"))}).fail(function(e){throw l(e),e})},this.getTransportsForUri=function(e,t,n,r){return s(t).then(function(i){if(i&&null!==i){r&&!n&&(n="I");var o;return c(e,o,n,r,t,i)}throw new Error(u.context.i18n.getText("i18n","Transport_GetTransportsFailed_transportchecksNotFound"))}).fail(function(e){throw l(e),e})};var c=function(e,t,n,r,i,o){var a=o,s=f(t,e,n,r);return u.context.service.abapdestination.getRestResource(i).then(function(e){return e.post({url:a,data:s,headers:{Accept:"application/vnd.sap.as+xml; dataname=com.sap.adt.transport.service.checkData","Content-Type":"application/vnd.sap.as+xml; charset=UTF-8; dataname=com.sap.adt.transport.service.checkData","X-sap-adt-profiling":"server-time"}}).then(function(e){if(200===e.jqXHR.status&&""===e.data)throw new Error(u.context.i18n.getText("i18n","TransportChecks_Note_Not_Implemented"));return e.data}).fail(function(e){throw l(e),e})})},l=function(e){e&&e.adtErrorData&&e.adtErrorData.message&&e.adtErrorData.message.text&&(e.message=e.adtErrorData.message.text),e.jqXHR&&e.jqXHR.responseText&&(e.responseText=e.jqXHR.responseText)},p=function(e){return encodeURIComponent(e)},f=function(e,t,n,r){var i=[];i.push(t),i.push(n);var o='{0}{1}';return e&&r?(e=p(e),i.push(e),o+="/sap/bc/adt/filestore/ui5-bsp/objects/{2}/{3}",i.push(r)):r&&(o+="{2}",i.push(r)),o+="",o=d(o,i)},d=function(e,t){for(var n=0;n=0)throw new Error(r.context.i18n.getText("i18n","ABAPRepositoryService_GetApplicationsFailed_InvalidDiscovery"));var a=jQuery.sap.parseXML(i[0]),s={};return s.csrfToken=i[1].getResponseHeader("X-CSRF-Token"),n(s,a,e,t),s.description=e.description,s.proxyUrlPrefix=e.proxyUrlPrefix,s})}},this.getStatus=function(t){if(t)return this.getStatusWithFilter(t,e)}};return e}),define("sap.watt.saptoolsets.fiori.abap.abaprepository/service/Search",["sap/watt/platform/plugin/utils/xml/XmlUtil"],function(e){var t=function(){this.getPackages=function(n,r){if(n.search)return t(n,r).then(function(t){for(var n,r=[],i=e.firstElementChild(t[0]).childNodes,o=0;o0,"Function "+e+", argument "+t+": the argument is an empty string: "+n)}}var n=new e;return n}()}),define("sap/watt/saptoolsets/fiori/abap/plugin/adt/communication/util/AdtUrlUtil",[],function(){"use strict";var e=new function(){this.ensureLeadingUriPrefix=function(e,t){return"string"!=typeof e||0===e.length||0===t.indexOf(e)?t:"string"!=typeof t||0===t.length?e:"/"!==t.charAt(0)&&"\\"!==t.charAt(0)?e+"/"+t:e+t},this.extractHostUrl=function(e){var t="";if("string"==typeof e&&(0===e.indexOf("https:")||0===e.indexOf("http:"))){var n=e.split("/");t=n[0]+"//"+n[2]}return t}};return e}),define("sap/watt/saptoolsets/fiori/abap/plugin/adt/communication/util/AdtErrorDataContentHandlerXml",["./AdtCheckUtil"],function(e){"use strict";var t=e.createInstance(),n=new function(){this.deserialize=function(e){t.checkStringArgumentIsNotEmpty("AdtRestResource.deserialize","xml",e);var n=jQuery.parseXML(e),r=jQuery(n),i={};return i.message={text:r.find("message").text(),language:r.find("message").attr("lang")},i.namespace=r.find("namespace").attr("id"),i.type=r.find("type").attr("id"),i.localizedMessage={text:r.find("localizedMessage").text(),language:r.find("localizedMessage").attr("lang")},i.getProperty=function(e){for(var t=r.find("entry"),n=0;n0||"string"==typeof n.password&&n.password.length>0)&&i.handle('Request "'+e+" "+r.url+'" contains user name and/or password in the URL.'),n.search&&p.test(n.search)&&i.handle('Request "'+e+" "+r.url+'" contains user name and/or password in the query parameters.'))}},checkInvalidCharacters:new function(){this.check=function(e,t,n){for(var r in t.headers){var i=t.headers[r];(h.test(r)||h.test(i))&&n.handle('Request "'+e+" "+t.url+'" contains not printable characters in header field "'+r+'"')}}},checkAsyncFalse:new function(){this.check=function(e,t,n){t.async===!1&&n.handle('Request "'+e+" "+t.url+'" is executed as synchronous request')}},checkProtocolHTTPS:new function(){this.check=function(e,r,i){if(n=n||t(r.url),n&&n.protocol&&null!==n.protocol)f.test(n.protocol)||i.handle('Request "'+e+" "+r.url+'" does not use HTTPS');else{var o=d.exec(r.url);null===o&&("undefined"==typeof document&&"undefined"==typeof document.URL||(o=d.exec(document.URL))),null!==o&&f.test(o)||i.handle('Request "'+e+" "+r.url+'" does not use HTTPS')}}}};o.makeImmutable(c),this.__test__injectConsole=function(e){r=e,i.__test__injectConsole(e)},this.checkAndRefuseCSRFTokenHeader=function(e,t){try{t&&t.headers&&t.headers["x-csrf-token"]&&a[s].handle('Request "'+e+" "+t.url+"\" uses proprietary CSRF token handling: it uses a header field 'x-csrf-token'.")}finally{n=void 0}},this.checkAndCorrectCsrfTokenHeader=function(e,t){try{e&&(t.headers=t.headers||{}),t.headers["x-csrf-token"]!==e&&(e?t.headers["x-csrf-token"]=e:delete t.headers["x-csrf-token"],a[u].handle('Request "'+t.type+" "+t.url+"\": the header field 'x-csrf-token' was reset to its original value."))}finally{n=void 0}},this.check=function(t,r){try{for(var i in e)i in c&&e[i]in a&&c[i].check(t,r,a[e[i]])}finally{n=void 0}}}var i=e.createInstance(),o=t.createFreezer({freezeDeeply:!0,freezeInheritedProperties:!0,freezeFunctions:!0}),a=t.createPrototypeFreezer({freezeDeeply:!0,freezeInheritedProperties:!0,freezeFunctions:!0}),s="strict",u="info",c={checkInvalidCharacters:s,checkUsernamePassword:s},l={checkAsyncFalse:s,checkProtocolHTTPS:s};o.makeImmutable(c),o.makeImmutable(l);var p=/[(^\?)|&](sap-user=|sap-password=)/,f=/^https:?$/,d=/^[a-zA-Z][a-zA-Z0-9\+\-\.]*:/,h=/[\000-\037]/;a.makeImmutable(n.prototype),a.makeImmutable(r.prototype);var m=new n;return o.makeImmutable(m),m}()}),define("sap/watt/saptoolsets/fiori/abap/plugin/adt/communication/service/AdtRestResource",["../util/AdtCheckUtil","../util/AdtUrlUtil","../util/AdtErrorDataContentHandlerXml","../util/AdtSecurityChecker"],function(e,t,n,r){"use strict";function i(){this.createInstance=function(e){return e&&e.urlPrefix&&c.checkStringArgumentIsNotEmpty("AdtRestResourceFactory.createInstance","settings.urlPrefix",e.urlPrefix),new o(e)}}function o(){function e(){return null!==E}function i(){E=null}function o(e,t,n,r,i){this.message="Request [ "+e+" "+t+" ] failed: "+n.statusText;var o=new Error(this.message);if("string"==typeof o.stack)this.stack=o.stack;else try{throw o}catch(e){this.stack=e.stack}this.jqXHR=n,this.textStatus=r,this.errorThrown=i;try{"string"==typeof this.constructor.name&&"AdtAjaxError"===this.constructor.name||(this.constructor.name="AdtAjaxError")}catch(e){}}function l(e,t){var n=Q.defer(),r=e.headers?e.headers["x-csrf-token"]:void 0;return e.beforeSend=h(e.beforeSend,r,t),jQuery.ajax(e).then(function(e,t,r){delete r.then,n.resolve({data:e,textStatus:t,jqXHR:r})},function(t,r,i){delete t.then;var a=new o(e.type,e.url,t,r,i);n.reject(a)}),n.promise}function p(e){e.toString=function(){return"{ status: "+e.status+", ... }"}}function f(e){e&&e.jqXHR&&p(e.jqXHR),e.toString=function(){return"{ jqXHR: "+e.jqXHR+", textStatus: "+e.textStatus+", data: "+e.data+" }"}}function d(e){e&&e.jqXHR&&p(e.jqXHR),e.toString=function(){return"{ jqXHR: "+e.jqXHR+", textStatus: "+e.textStatus+", errorThrown: "+e.errorThrown+", adtErrorData: "+e.adtErrorData+" }"}}function h(e,t,n){return function(r,i){"function"==typeof e&&(e(r,i),n.checkAndCorrectCsrfTokenHeader(t,i)),n.check(i.type,i)}}function m(t){if(e())return E;var r="GET",o={type:r,url:y(t),cache:!1,headers:{"x-csrf-token":"fetch",Accept:"application/xml"},dataType:"xml",crossDomain:!0};return E=l(o,D).then(function(e){_(r,o,e);var t=e.jqXHR.getResponseHeader("x-csrf-token");return c.check(0!==t.length,"Security handling with CSRF token is not supported for public ICF services: ICF service '/sap/bc/adt'."),t},function(e){if(e.jqXHR.status!==a&&e.jqXHR.status!==s){var t=e.jqXHR.getResponseHeader("content-type");null!==t&&t.indexOf("application/xml")>-1&&(e.adtErrorData=n.deserialize(e.jqXHR.responseText))}throw i(),d(e),e})}function g(e,t){if(void 0!==t.success&&null!==t.success){var r=t.success;t.success=void 0}t.type=e,x(e,t);var i=l(t,T).then(function(n){return _(e,t,n),void 0!==t.adtContentHandler&&null!==t.adtContentHandler&&(n.data=t.adtContentHandler.serialize(n.data,n.jqXHR)),void 0!==r&&r(n),f(n),n},function(e){if(e.jqXHR.status!==a&&e.jqXHR.status!==s){var t=e.jqXHR.getResponseHeader("content-type");null!==t&&t.indexOf("application/xml")>-1&&(e.adtErrorData=n.deserialize(e.jqXHR.responseText))}throw d(e),e});return i}function v(e,n,r){var o=r||{};"string"==typeof n?(c.checkStringArgumentIsNotEmpty("AdtRestResource."+e,"url",n),o.url=n):(c.checkArgumentIsDefinedAndNotNull("AdtRestResource."+e,"settings",n),o=n),T.checkAndRefuseCSRFTokenHeader(e,o);var a=t.extractHostUrl(o.url),s=m(a);return s.then(function(t){o.headers=o.headers||{},o.headers["x-csrf-token"]=t;var n=g(e,o);return n.then(function(e){return e},function(t){if("object"===(typeof t.jqXHR).toLowerCase()&&t.jqXHR.status===u&&void 0===t.adtErrorData){i();var n=m(a);return n.then(function(t){o.headers["x-csrf-token"]=t;var n=g(e,o);return n})}throw t})},function(e){throw i(),e})}function y(e){if("string"==typeof e&&""!==e){c.check("string"!=typeof S.urlPrefix||e===S.urlPrefix,"AdtRestResource: inconsistent host URL and URL prefix: "+e+"!=="+S.urlPrefix);var n=e}else n=S.urlPrefix;return t.ensureLeadingUriPrefix(n,"/sap/bc/adt/compatibility/graph")}function x(e,t){b(e,t)}function b(e,n){if("string"==typeof S.urlPrefix&&""!==S.urlPrefix){var r=t.extractHostUrl(n.url);"string"==typeof r&&""!==r&&c.check("string"!=typeof S.urlPrefix||r===S.urlPrefix,"AdtRestResource: inconsistent host URL and URL prefix: "+r+"!=="+S.urlPrefix),n.url=t.ensureLeadingUriPrefix(S.urlPrefix,n.url)}}function _(e,t,n){w(e,t,n)}function w(e,t,n){n.jqXHR.status>=200&&n.jqXHR.status<300&&void 0!==n.data&&null!==n.data&&(void 0!==t.headers&&null!==t.headers&&void 0!==t.headers.Accept&&null!==t.headers.Accept||A.warn('Request "'+t.type+" "+t.url+'" resulted in a response with a body. The request did not specify acceptable content types via the accept header. This can lead to client/server compatibility problems.'))}var E=null,S=arguments[0]||{},C=S.security||{},T=r.createInstance(C),D=r.createInstance({}),A=function(){return"undefined"!=typeof window&&"undefined"!=typeof window.console&&"undefined"!=typeof window.console.warn?window.console:new function(){this.warn=function(){}}}();this.__test__injectConsole=function(e){A=e,c.__test__injectConsole(e),T.__test__injectConsole(e),D.__test__injectConsole(e)},o.prototype=new Error,o.prototype.constructor=o,o.prototype.name="AdtAjaxError",this.get=function(e,t){var n;return"string"==typeof e?(c.checkStringArgumentIsNotEmpty("AdtRestResource.get","url",e),n=t||{},n.url=e):(c.checkArgumentIsDefinedAndNotNull("AdtRestResource.get","settings",e),n=e),T.checkAndRefuseCSRFTokenHeader("GET",n),g("GET",n)},this.post=function(e,t){return v("POST",e,t)},this.put=function(e,t){return v("PUT",e,t)},this.del=function(e,t){return v("DELETE",e,t)}}var a=0,s=200,u=403,c=e.createInstance();return new i}),define("sap.watt.saptoolsets.fiori.abap.adt.communication/service/AdtRestResourceWrapper",["sap/watt/saptoolsets/fiori/abap/plugin/adt/communication/service/AdtRestResource"],function(e){"use strict";function t(){this.createInstance=function(t){return e.createInstance(t)}}var n=new t;return n}),!function(e){"use strict";function t(e){var n;if(null===e||void 0===e)return!1;if(r.isArray(e))return e.length>0;if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return!0;for(n in e)if(e.hasOwnProperty(n)&&t(e[n]))return!0;return!1}var n=function(){function e(e){this.options=e}return e.prototype.toString=function(){return JSON&&JSON.stringify?JSON.stringify(this.options):this.options},e}(),r=function(){function e(e){return"[object Array]"===Object.prototype.toString.apply(e)}function t(e){return"[object String]"===Object.prototype.toString.apply(e)}function n(e){return"[object Number]"===Object.prototype.toString.apply(e)}function r(e){return"[object Boolean]"===Object.prototype.toString.apply(e)}function i(e,t){var n,r="",i=!0;for(n=0;n="a"&&"z">=e||e>="A"&&"Z">=e}function t(e){return e>="0"&&"9">=e}function n(e){return t(e)||e>="a"&&"f">=e||e>="A"&&"F">=e}return{isAlpha:e,isDigit:t,isHexDigit:n}}(),o=function(){function e(e){var t,n,r="",i=a.encode(e);for(n=0;nt?"0":"")+t.toString(16).toUpperCase();return r}function t(e,t){ return"%"===e.charAt(t)&&i.isHexDigit(e.charAt(t+1))&&i.isHexDigit(e.charAt(t+2))}function n(e,t){return parseInt(e.substr(t,2),16)}function r(e){if(!t(e,0))return!1;var r=n(e,1),i=a.numBytes(r);if(0===i)return!1;for(var o=1;i>o;o+=1)if(!t(e,3*o)||!a.isValidFollowingCharCode(n(e,3*o+1)))return!1;return!0}function o(e,r){var i=e.charAt(r);if(!t(e,r))return i;var o=n(e,r+1),s=a.numBytes(o);if(0===s)return i;for(var u=1;s>u;u+=1)if(!t(e,r+3*u)||!a.isValidFollowingCharCode(n(e,r+3*u+1)))return i;return e.substr(r,3*s)}var a={encode:function(e){return unescape(encodeURIComponent(e))},numBytes:function(e){return 127>=e?1:e>=194&&223>=e?2:e>=224&&239>=e?3:e>=240&&244>=e?4:0},isValidFollowingCharCode:function(e){return e>=128&&191>=e}};return{encodeCharacter:e,isPctEncoded:r,pctCharAt:o}}(),a=function(){function e(e){return i.isAlpha(e)||i.isDigit(e)||"_"===e||o.isPctEncoded(e)}function t(e){return i.isAlpha(e)||i.isDigit(e)||"-"===e||"."===e||"_"===e||"~"===e}function n(e){return":"===e||"/"===e||"?"===e||"#"===e||"["===e||"]"===e||"@"===e||"!"===e||"$"===e||"&"===e||"("===e||")"===e||"*"===e||"+"===e||","===e||";"===e||"="===e||"'"===e}return{isVarchar:e,isUnreserved:t,isReserved:n}}(),s=function(){function e(e,t){var n,r="",i="";for(("number"==typeof e||"boolean"==typeof e)&&(e=e.toString()),n=0;n1?n:a.isReserved(n)||a.isUnreserved(n)?n:o.encodeCharacter(n)}function r(e){var t,n="",r="";for(t=0;t1?r:a.isReserved(r)||a.isUnreserved(r)?r:o.encodeCharacter(r);return n}return{encode:e,encodePassReserved:t,encodeLiteral:r,encodeLiteralCharacter:n}}(),u=function(){function e(e){t[e]={symbol:e,separator:"?"===e?"&":""===e||"+"===e||"#"===e?",":e,named:";"===e||"&"===e||"?"===e,ifEmpty:"&"===e||"?"===e?"=":"",first:"+"===e?"":e,encode:"+"===e||"#"===e?s.encodePassReserved:s.encode,toString:function(){return this.symbol}}}var t={};return e(""),e("+"),e("#"),e("."),e("/"),e(";"),e("?"),e("&"),{valueOf:function(e){return t[e]?t[e]:"=,!@|".indexOf(e)>=0?null:t[""]}}}(),c=function(){function e(e){this.literal=s.encodeLiteral(e)}return e.prototype.expand=function(){return this.literal},e.prototype.toString=e.prototype.expand,e}(),l=function(){function e(e){function t(){var t=e.substring(d,c);if(0===t.length)throw new n({expressionText:e,message:"a varname must be specified",position:c});f={varname:t,exploded:!1,maxLength:null},d=null}function r(){if(h===c)throw new n({expressionText:e,message:"after a ':' you have to specify the length",position:c});f.maxLength=parseInt(e.substring(h,c),10),h=null}var s,c,l=[],f=null,d=null,h=null,m="";for(s=function(t){var r=u.valueOf(t);if(null===r)throw new n({expressionText:e,message:"illegal use of reserved operator",position:c,operator:t});return r}(e.charAt(0)),c=s.symbol.length,d=c;c=4)throw new n({expressionText:e,message:"A :prefix must have max 4 digits",position:c});continue}r()}if(":"!==m)if("*"!==m){if(","!==m)throw new n({expressionText:e,message:"illegal character",character:m,position:c});l.push(f),f=null,d=c+1}else{if(null===f)throw new n({expressionText:e,message:"exploded without varspec",position:c});if(f.exploded)throw new n({expressionText:e,message:"exploded twice",position:c});if(f.maxLength)throw new n({expressionText:e,message:"an explode (*) MUST NOT follow to a prefix",position:c});f.exploded=!0}else{if(null!==f.maxLength)throw new n({expressionText:e,message:"only one :maxLength is allowed per varspec",position:c});if(f.exploded)throw new n({expressionText:e,message:"an exploeded varspec MUST NOT be varspeced",position:c});h=c+1}}return null!==d&&t(),null!==h&&r(),l.push(f),new p(e,s,l)}function t(t){var r,i,o=[],a=null,s=0;for(r=0;rs&&o.push(new c(t.substring(s,r))),s=null,a=r)}if(null!==a)throw new n({templateText:t,message:"unclosed brace",position:a});return s0,a+"scheme for collection with category "+t+" missing");var r=jQuery(t).attr("term");p.check(r&&null!==r&&r.length>0,a+"term for collection with category "+t+" missing");var i=e.attr("href");return p.check(i&&null!==i&&i.length>0,a+"uri for collection with category "+t+" missing"),{scheme:n,term:r,uri:i}}function o(e){var t=e.children(),r=null,o=null,a=[],s=0;for(var u in t)if(t.hasOwnProperty(u))if("app:accept"===t[u].nodeName){var l=jQuery(t[u]).text();l&&l.length>0&&(a[s++]=l)}else if("adtcomp:templateLinks"===t[u].nodeName&&(o=n(t[u].childNodes),o&&o.length>0)){r=new c;for(var p=0;p-1},d.makeImmutable(s.prototype),d.makeImmutable(u.prototype),d.makeImmutable(c.prototype);var m=new o;return f.makeImmutable(m),m}),define("sap.watt.saptoolsets.fiori.abap.adt.compatibility/service/AdtDiscoveryWrapper",["./AdtDiscovery"],function(e){"use strict";function t(){this.getDiscovery=function(t,n){return e.getDiscovery(t,n)}}var n=new t;return n}),define("fiorixmlanalysis/utils/SAX",[],function(){function e(t,r){if(!(this instanceof e))return new e(t,r);var i=this;n(i),i.q=i.c="",i.bufferCheckPosition=T.MAX_BUFFER_LENGTH,i.opt=r||{},i.opt.lowercase=i.opt.lowercase||i.opt.lowercasetags,i.looseCase=i.opt.lowercase?"toLowerCase":"toUpperCase",i.tags=[],i.closed=i.closedRoot=i.sawRoot=!1,i.tag=i.error=null,i.strict=!!t,i.noscript=!(!t&&!i.opt.noscript),i.state=Q.BEGIN,i.strictEntities=i.opt.strictEntities,i.ENTITIES=i.strictEntities?Object.create(T.XML_ENTITIES):Object.create(T.ENTITIES),i.attribList=[],i.opt.xmlns&&(i.ns=Object.create(B)),i.trackPosition=i.opt.position!==!1,i.trackPosition&&(i.position=i.line=i.column=0),l(i,"onready")}function t(e){for(var t=Math.max(T.MAX_BUFFER_LENGTH,10),n=0,r=0,i=D.length;rt)switch(D[r]){case"textNode":f(e);break;case"cdata":p(e,"oncdata",e.cdata),e.cdata="";break;case"script":p(e,"onscript",e.script),e.script="";break;default:h(e,"Max buffer length exceeded: "+D[r])}n=Math.max(n,o)}var a=T.MAX_BUFFER_LENGTH-n;e.bufferCheckPosition=a+e.position}function n(e){for(var t=0,n=D.length;t",e.tagName="",void(e.state=Q.SCRIPT);p(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var r=n;t--;){var i=e.tags[t];if(i.name===r)break;g(e,"Unexpected close tag")}if(t<0)return g(e,"Unmatched closing tag: "+e.tagName),e.textNode+="",void(e.state=Q.TEXT);e.tagName=n;for(var o=e.tags.length;o-- >t;){var a=e.tag=e.tags.pop();e.tagName=e.tag.name,p(e,"onclosetag",e.tagName);var s={};for(var u in a.ns)s[u]=a.ns[u];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&a.ns!==c.ns&&Object.keys(a.ns).forEach(function(t){var n=a.ns[t];p(e,"onclosenamespace",{prefix:t,uri:n})})}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=Q.TEXT}function w(e){var t,n=e.entity,r=n.toLowerCase(),i="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[r]?e.ENTITIES[r]:(n=r,"#"===n.charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),t=parseInt(n,16),i=t.toString(16)):(n=n.slice(1),t=parseInt(n,10),i=t.toString(10))),n=n.replace(/^0+/,""),i.toLowerCase()!==n?(g(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function E(e,t){"<"===t?(e.state=Q.OPEN_WAKA,e.startTagPosition=e.position,e.startTagLine=e.line,e.startTagColumn=e.column):c(k,t)&&(g(e,"Non-whitespace before first tag."),e.textNode=t,e.state=Q.TEXT)}function S(e,t){var n="";return t"===i?(p(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=Q.TEXT):u(O,i)?(n.state=Q.SGML_DECL_QUOTED,n.sgmlDecl+=i):n.sgmlDecl+=i;continue;case Q.SGML_DECL_QUOTED:i===n.q&&(n.state=Q.SGML_DECL,n.q=""),n.sgmlDecl+=i;continue;case Q.DOCTYPE:">"===i?(n.state=Q.TEXT,p(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=i,"["===i?n.state=Q.DOCTYPE_DTD:u(O,i)&&(n.state=Q.DOCTYPE_QUOTED,n.q=i));continue;case Q.DOCTYPE_QUOTED:n.doctype+=i,i===n.q&&(n.q="",n.state=Q.DOCTYPE);continue;case Q.DOCTYPE_DTD:n.doctype+=i,"]"===i?n.state=Q.DOCTYPE:u(O,i)&&(n.state=Q.DOCTYPE_DTD_QUOTED,n.q=i);continue;case Q.DOCTYPE_DTD_QUOTED:n.doctype+=i,i===n.q&&(n.state=Q.DOCTYPE_DTD,n.q="");continue;case Q.COMMENT:"-"===i?n.state=Q.COMMENT_ENDING:n.comment+=i;continue;case Q.COMMENT_ENDING:"-"===i?(n.state=Q.COMMENT_ENDED,n.comment=d(n.opt,n.comment),n.comment&&p(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+i,n.state=Q.COMMENT);continue;case Q.COMMENT_ENDED:">"!==i?(g(n,"Malformed comment"),n.comment+="--"+i,n.state=Q.COMMENT):n.state=Q.TEXT;continue;case Q.CDATA:"]"===i?n.state=Q.CDATA_ENDING:n.cdata+=i;continue;case Q.CDATA_ENDING:"]"===i?n.state=Q.CDATA_ENDING_2:(n.cdata+="]"+i,n.state=Q.CDATA);continue;case Q.CDATA_ENDING_2:">"===i?(n.cdata&&p(n,"oncdata",n.cdata),p(n,"onclosecdata"),n.cdata="",n.state=Q.TEXT):"]"===i?n.cdata+="]":(n.cdata+="]]"+i,n.state=Q.CDATA);continue;case Q.PROC_INST:"?"===i?n.state=Q.PROC_INST_ENDING:u(k,i)?n.state=Q.PROC_INST_BODY:n.procInstName+=i;continue;case Q.PROC_INST_BODY:if(!n.procInstBody&&u(k,i))continue;"?"===i?n.state=Q.PROC_INST_ENDING:n.procInstBody+=i;continue;case Q.PROC_INST_ENDING:">"===i?(p(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=Q.TEXT):(n.procInstBody+="?"+i,n.state=Q.PROC_INST_BODY);continue;case Q.OPEN_TAG:u(V,i)?n.tagName+=i:(v(n),">"===i?b(n):"/"===i?n.state=Q.OPEN_TAG_SLASH:(c(k,i)&&g(n,"Invalid character in tag name"),n.state=Q.ATTRIB));continue;case Q.OPEN_TAG_SLASH:">"===i?(b(n,!0),_(n)):(g(n,"Forward-slash in opening tag not followed by >"),n.state=Q.ATTRIB);continue;case Q.ATTRIB:if(u(k,i))continue;">"===i?b(n):"/"===i?n.state=Q.OPEN_TAG_SLASH:u(U,i)?(n.attribName=i,n.attribValue="",n.state=Q.ATTRIB_NAME):g(n,"Invalid attribute name");continue;case Q.ATTRIB_NAME:"="===i?n.state=Q.ATTRIB_VALUE:">"===i?(g(n,"Attribute without value"),n.attribValue=n.attribName,x(n),b(n)):u(k,i)?n.state=Q.ATTRIB_NAME_SAW_WHITE:u(V,i)?n.attribName+=i:g(n,"Invalid attribute name");continue;case Q.ATTRIB_NAME_SAW_WHITE:if("="===i)n.state=Q.ATTRIB_VALUE;else{if(u(k,i))continue;g(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",p(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===i?b(n):u(U,i)?(n.attribName=i,n.state=Q.ATTRIB_NAME):(g(n,"Invalid attribute name"),n.state=Q.ATTRIB)}continue;case Q.ATTRIB_VALUE:if(u(k,i))continue;u(O,i)?(n.q=i,n.state=Q.ATTRIB_VALUE_QUOTED):(g(n,"Unquoted attribute value"),n.state=Q.ATTRIB_VALUE_UNQUOTED,n.attribValue=i);continue;case Q.ATTRIB_VALUE_QUOTED:if(i!==n.q){"&"===i?n.state=Q.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=i;continue}x(n),n.q="",n.state=Q.ATTRIB_VALUE_CLOSED;continue;case Q.ATTRIB_VALUE_CLOSED:u(k,i)?n.state=Q.ATTRIB:">"===i?b(n):"/"===i?n.state=Q.OPEN_TAG_SLASH:u(U,i)?(g(n,"No whitespace between attributes"),n.attribName=i,n.attribValue="",n.state=Q.ATTRIB_NAME):g(n,"Invalid attribute name");continue;case Q.ATTRIB_VALUE_UNQUOTED:if(c(N,i)){"&"===i?n.state=Q.ATTRIB_VALUE_ENTITY_U:n.attribValue+=i;continue}x(n),">"===i?b(n):n.state=Q.ATTRIB;continue;case Q.CLOSE_TAG:if(n.tagName)">"===i?_(n):u(V,i)?n.tagName+=i:n.script?(n.script+=""===i?_(n):g(n,"Invalid characters in closing tag");continue;case Q.TEXT_ENTITY:case Q.ATTRIB_VALUE_ENTITY_Q:case Q.ATTRIB_VALUE_ENTITY_U:var s,l;switch(n.state){case Q.TEXT_ENTITY:s=Q.TEXT,l="textNode";break;case Q.ATTRIB_VALUE_ENTITY_Q:s=Q.ATTRIB_VALUE_QUOTED,l="attribValue";break;case Q.ATTRIB_VALUE_ENTITY_U:s=Q.ATTRIB_VALUE_UNQUOTED,l="attribValue"}";"===i?(n[l]+=w(n),n.entity="",n.state=s):u(n.entity.length?W:G,i)?n.entity+=i:(g(n,"Invalid character in entity name"),n[l]+="&"+n.entity+i,n.entity="",n.state=s);continue;default:throw new Error(n,"Unknown state: "+n.state)}}return n.position>=n.bufferCheckPosition&&t(n),n}var T={};T.parser=function(t,n){return new e(t,n)},T.SAXParser=e,T.SAXStream=o,T.createStream=i,T.MAX_BUFFER_LENGTH=65536;var D=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];T.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}t.prototype=e;var n=new t;return n}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),e.prototype={end:function(){m(this)},write:C,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){r(this)}};var A;try{A=require("stream").Stream}catch(e){A=function(){}}var P=T.EVENTS.filter(function(e){return"error"!==e&&"end"!==e});o.prototype=Object.create(A.prototype,{constructor:{value:o}}),o.prototype.write=function(e){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e)){if(!this._decoder){var t=require("string_decoder").StringDecoder;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},o.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},o.prototype.on=function(e,t){var n=this;return n._parser["on"+e]||P.indexOf(e)===-1||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),A.prototype.on.call(n,e,t)};var k="\r\n\t ",I="0124356789",F="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",O="'\"",N=k+">",j="[CDATA[",R="DOCTYPE",L="http://www.w3.org/XML/1998/namespace",M="http://www.w3.org/2000/xmlns/",B={xml:L,xmlns:M};k=a(k),I=a(I),F=a(F);var U=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,V=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,G=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,W=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;O=a(O),N=a(N);var Q=0;T.STATE={BEGIN:Q++,BEGIN_WHITESPACE:Q++,TEXT:Q++,TEXT_ENTITY:Q++,OPEN_WAKA:Q++,SGML_DECL:Q++,SGML_DECL_QUOTED:Q++,DOCTYPE:Q++,DOCTYPE_QUOTED:Q++,DOCTYPE_DTD:Q++,DOCTYPE_DTD_QUOTED:Q++,COMMENT_STARTING:Q++,COMMENT:Q++,COMMENT_ENDING:Q++,COMMENT_ENDED:Q++,CDATA:Q++,CDATA_ENDING:Q++,CDATA_ENDING_2:Q++,PROC_INST:Q++,PROC_INST_BODY:Q++,PROC_INST_ENDING:Q++,OPEN_TAG:Q++,OPEN_TAG_SLASH:Q++,ATTRIB:Q++,ATTRIB_NAME:Q++,ATTRIB_NAME_SAW_WHITE:Q++,ATTRIB_VALUE:Q++,ATTRIB_VALUE_QUOTED:Q++,ATTRIB_VALUE_CLOSED:Q++,ATTRIB_VALUE_UNQUOTED:Q++,ATTRIB_VALUE_ENTITY_Q:Q++,ATTRIB_VALUE_ENTITY_U:Q++,CLOSE_TAG:Q++,CLOSE_TAG_SAW_WHITE:Q++,SCRIPT:Q++,SCRIPT_ENDING:Q++},T.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},T.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240, euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(T.ENTITIES).forEach(function(e){var t=T.ENTITIES[e],n="number"==typeof t?String.fromCharCode(t):t;T.ENTITIES[e]=n});for(var H in T.STATE)T.STATE[T.STATE[H]]=H;return Q=T.STATE,String.fromCodePoint||!function(){var e=String.fromCharCode,t=Math.floor,n=function(){var n,r,i=16384,o=[],a=-1,s=arguments.length;if(!s)return"";for(var u="";++a1114111||t(c)!==c)throw RangeError("Invalid code point: "+c);c<=65535?o.push(c):(c-=65536,n=(c>>10)+55296,r=c%1024+56320,o.push(n,r)),(a+1===s||o.length>i)&&(u+=e.apply(null,o),o.length=0)}return u};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:n,configurable:!0,writable:!0}):String.fromCodePoint=n}(),T}),define("fiorixmlanalysis/utils/customXmlParser",["./SAX"],function(e){"use strict";function t(e,t){return function(n){var r=t.createElementNS(n.ns[n.prefix]||"",n.name);for(var i in n.attributes)if(n.attributes.hasOwnProperty(i)){var o=n.attributes[i];r.setAttribute(o.name,o.value)}r.position={line:{start:this.startTagLine+1,end:this.line+1},column:{start:this.startTagColumn-1,end:this.column+1}},e.push(r)}}function n(e,t){return function(){var n=e.pop();n&&(0===e.length?t.appendChild(n):e[e.length-1].appendChild(n))}}function r(e,t){return function(n){var r=t.createComment(n);0===e.length?t.appendChild(r):e[e.length-1].appendChild(r)}}var i,o=[];return{parseXML:function(a){i=a,o=[];var s=!0,u=[],c=document.implementation.createDocument("","",null),l=e.parser(s,{xmlns:!0,position:!0});return l.oncomment=r(u,c),l.onopentag=t(u,c),l.onclosetag=n(u,c),l.write(a),c},getPosition:function(e,t,n,r){o.length||(o=i.split("\n"),o.unshift(""));for(var a=0,s=e.line.end-e.line.start+1,u={line:{},column:{}};a>|[!<>]=|(?![0-9-])[\w-]+:\*|\s+|./g);if(n){for(var r=0,i=0,o=n.length;i0)}function i(){this.dataTypes={},this.documents={},this.functions={},this.collations={},this.collections={}}function o(e,t,n){Hn[e]=n,zn[e]=t}function a(e,t){qn[e]=t}function s(n,r){var i=new t(n),o=p(i,r);if(!i.eof())throw new e("XPST0003","Unexpected token beyond end of query");if(!o)throw new e("XPST0003","Expected expression");this.internalExpression=o}function u(){}function c(){}function l(){this.items=[]}function p(t,n){var r;if(!t.eof()&&(r=f(t,n))){var i=new l;for(i.items.push(r);","==t.peek();){if(t.next(),t.eof()||!(r=f(t,n)))throw new e("XPST0003","Expected expression");i.items.push(r)}return i}}function f(e,t){if(!e.eof())return y(e,t)||h(e,t)||b(e,t)||R(e,t)}function d(){this.bindings=[],this.returnExpr=null}function h(t,n){if("for"==t.peek()&&"$"==t.peek(1).substr(0,1)){t.next();var r,i=new d;do i.bindings.push(g(t,n));while(","==t.peek()&&t.next());if("return"!=t.peek())throw new e("XPST0003","Expected 'return' token in for expression");if(t.next(),t.eof()||!(r=f(t,n)))throw new e("XPST0003","Expected return statement operand in for expression");return i.returnExpr=r,i}}function m(e,t,n,r){this.prefix=e,this.localName=t,this.namespaceURI=n,this.inExpr=r}function g(t,n){var r=t.peek().substr(1).match(ir);if(!r)throw new e("XPST0003","Expected binding in for expression");if("*"==r[1]||"*"==r[2])throw new e("XPST0003","Illegal use of wildcard in for expression binding variable name");if(t.next(),"in"!=t.peek())throw new e("XPST0003","Expected 'in' token in for expression binding");t.next();var i;if(t.eof()||!(i=f(t,n)))throw new e("XPST0003","Expected in statement operand in for expression binding");return new m(r[1]||null,r[2],r[1]?n.getURIForPrefix(r[1]):null,i)}function v(e,t,n){this.condExpr=e,this.thenExpr=t,this.elseExpr=n}function y(t,n){var r,i,o;if("if"==t.peek()&&"("==t.peek(1)){if(t.next(2),t.eof()||!(r=p(t,n)))throw new e("XPST0003","Expected if statement operand in conditional expression");if(")"!=t.peek())throw new e("XPST0003","Expected ')' token in for expression");if(t.next(),"then"!=t.peek())throw new e("XPST0003","Expected 'then' token in conditional if expression");if(t.next(),t.eof()||!(i=f(t,n)))throw new e("XPST0003","Expected then statement operand in condional expression");if("else"!=t.peek())throw new e("XPST0003","Expected 'else' token in conditional if expression");if(t.next(),t.eof()||!(o=f(t,n)))throw new e("XPST0003","Expected else statement operand in condional expression");return new v(r,i,o)}}function x(e){this.quantifier=e,this.bindings=[],this.satisfiesExpr=null}function b(t,n){var r=t.peek();if(("some"==r||"every"==r)&&"$"==t.peek(1).substr(0,1)){t.next();var i,o=new x(r);do o.bindings.push(w(t,n));while(","==t.peek()&&t.next());if("satisfies"!=t.peek())throw new e("XPST0003","Expected 'satisfies' token in quantified expression");if(t.next(),t.eof()||!(i=f(t,n)))throw new e("XPST0003","Expected satisfies statement operand in quantified expression");return o.satisfiesExpr=i,o}}function _(e,t,n,r){this.prefix=e,this.localName=t,this.namespaceURI=n,this.inExpr=r}function w(t,n){var r=t.peek().substr(1).match(ir);if(!r)throw new e("XPST0003","Expected binding in quantified expression");if("*"==r[1]||"*"==r[2])throw new e("XPST0003","Illegal use of wildcard in quantified expression binding variable name");if(t.next(),"in"!=t.peek())throw new e("XPST0003","Expected 'in' token in quantified expression binding");t.next();var i;if(t.eof()||!(i=f(t,n)))throw new e("XPST0003","Expected in statement operand in quantified expression binding");return new _(r[1]||null,r[2],r[1]?n.getURIForPrefix(r[1]):null,i)}function E(e,t,n){this.left=e,this.right=t,this.operator=n}function S(t,n){var r,i;if(!t.eof()&&(r=Se(t,n))){if(!(t.peek()in Yn))return r;var o=t.peek();if(t.next(),t.eof()||!(i=Se(t,n)))throw new e("XPST0003","Expected second operand in comparison expression");return new E(r,i,o)}}function C(e,t){var n=bn(e.left.evaluate(t),t);if(!n.length)return new Xe(!1);var r=bn(e.right.evaluate(t),t);if(!r.length)return new Xe(!1);for(var i,o,a=!1,s=0,u=n.length;sc)throw new e("XPST0017","Function "+t+"() must have "+(c?" no more than ":"")+c+" argument"+(c>1||!c?"s":""));if(u1?"s":""));for(var p=0;p1)throw new e("XPTY0004","Required cardinality of "+i+" is one or zero")}else if("+"==r){if(o<1)throw new e("XPTY0004","Required cardinality of "+i+" is one or more")}else if("*"!=r&&1!=o)throw new e("XPTY0004","Required cardinality of "+i+" is exactly one")}function _e(e){this.left=e,this.items=[]}function we(t,n){var r,i;if(!t.eof()&&(r=Ae(t,n))){if("intersect"!=(i=t.peek())&&"except"!=i)return r;for(var o=new _e(r);"intersect"==(i=t.peek())||"except"==i;){if(t.next(),t.eof()||!(r=Ae(t,n)))throw new e("XPST0003","Expected second operand in "+i+" expression");o.items.push([i,r])}return o}}function Ee(e,t){this.left=e,this.right=t}function Se(t,n){var r,i;if(!t.eof()&&(r=P(t,n))){if("to"!=t.peek())return r;if(t.next(),t.eof()||!(i=P(t,n)))throw new e("XPST0003","Expected second operand in range expression");return new Ee(r,i)}}function Ce(e){this.left=e,this.items=[]}function Te(t,n){var r,i;if(!t.eof()&&(r=we(t,n))){if("|"!=(i=t.peek())&&"union"!=i)return r;for(var o=new Ce(r);"|"==(i=t.peek())||"union"==i;){if(t.next(),t.eof()||!(r=we(t,n)))throw new e("XPST0003","Expected second operand in union expression");o.items.push(r)}return o}}function De(e,t){this.expression=e,this.type=t}function Ae(t,n){var r,i;if(!t.eof()&&(r=ke(t,n))){if("instance"!=t.peek()||"of"!=t.peek(1))return r;if(t.next(2),t.eof()||!(i=Ue(t,n)))throw new e("XPST0003","Expected second operand in instance of expression");return new De(r,i)}}function Pe(e,t){this.expression=e,this.type=t}function ke(t,n){var r,i;if(!t.eof()&&(r=Fe(t,n))){if("treat"!=t.peek()||"as"!=t.peek(1))return r;if(t.next(2),t.eof()||!(i=Ue(t,n)))throw new e("XPST0003","Expected second operand in treat expression");return new Pe(r,i)}}function Ie(e,t){this.expression=e,this.type=t}function Fe(t,n){var r,i;if(!t.eof()&&(r=Ne(t,n))){if("castable"!=t.peek()||"as"!=t.peek(1))return r;if(t.next(2),t.eof()||!(i=Ge(t,n)))throw new e("XPST0003","Expected second operand in castable expression");return new Ie(r,i)}}function Oe(e,t){this.expression=e,this.type=t}function Ne(t,n){var r,i;if(!t.eof()&&(r=O(t,n))){if("cast"!=t.peek()||"as"!=t.peek(1))return r;if(t.next(2),t.eof()||!(i=Ge(t,n)))throw new e("XPST0003","Expected second operand in cast expression");return new Oe(r,i)}}function je(e,t,n){this.prefix=e,this.localName=t,this.namespaceURI=n}function Re(t,n){var r=t.peek().match(ir);if(r){if("*"==r[1]||"*"==r[2])throw new e("XPST0003","Illegal use of wildcard in type name");return t.next(),new je(r[1]||null,r[2],r[1]?n.getURIForPrefix(r[1]):null)}}function Le(e){this.test=e}function Me(t,n){if(!t.eof()){var r;if("item"==t.peek()&&"("==t.peek(1)){if(t.next(2),")"!=t.peek())throw new e("XPST0003","Expected ')' token in item type expression");return t.next(),new Le}return(r=J(t,n))?new Le(r):(r=Re(t,n))?new Le(r):void 0}}function Be(e,t){this.itemType=e||null,this.occurence=t||null}function Ue(t,n){if(!t.eof()){if("empty-sequence"==t.peek()&&"("==t.peek(1)){if(t.next(2),")"!=t.peek())throw new e("XPST0003","Expected ')' token in sequence type");return t.next(),new Be}var r,i;return!t.eof()&&(r=Me(t,n))?(i=t.peek(),"?"==i||"*"==i||"+"==i?t.next():i=null,new Be(r,i)):void 0}}function Ve(e,t){this.itemType=e||null,this.occurence=t||null}function Ge(e,t){var n,r;if(!e.eof()&&(n=Re(e,t)))return r=e.peek(),"?"==r?e.next():r=null,new Ve(n,r)}function We(){}function Qe(){}function He(){}function ze(e){return e instanceof pt||e instanceof at||e instanceof ot}function qe(e,t,n,r,i){this.scheme=e,this.authority=t,this.path=n,this.query=r,this.fragment=i}function $e(e){this.value=e}function Xe(e){this.value=e}function Ke(e,t,n,r,i){this.year=e,this.month=t,this.day=n,this.timezone=r,this.negative=i}function Je(e,t){return 2==t&&(e%400==0||e%100!=0&&e%4==0)?29:fr[t-1]}function Ye(e,t){if(!t){var n=Je(e.year,e.month);if(e.day>n)for(;e.day>n;)e.month+=1,e.month>12&&(e.year+=1,0==e.year&&(e.year=1),e.month=1),e.day-=n,n=Je(e.year,e.month);else if(e.day<1)for(;e.day<1;)e.month-=1,e.month<1&&(e.year-=1,0==e.year&&(e.year=-1),e.month=12),n=Je(e.year,e.month),e.day+=n}return e.month>12?(e.year+=~~(e.month/12),0==e.year&&(e.year=1),e.month=e.month%12):e.month<1&&(e.year+=~~(e.month/12)-1,0==e.year&&(e.year=-1),e.month=e.month%12+12),e}function Ze(e,t,n,r,i,o,a,s){this.year=e,this.month=t,this.day=n,this.hours=r,this.minutes=i,this.seconds=o,this.timezone=a,this.negative=s}function et(e,t){return sValue=Cn(e),arguments.length<2&&(t=2),(sValue.length0?"+":"-")+et(In.abs(~~(t/60)))+":"+et(In.abs(t%60)):"Z"}function nt(e){return(e.negative?"-":"")+et(e.year,4)+"-"+et(e.month)+"-"+et(e.day)}function rt(e){var t=Cn(e.seconds).split(".");return et(e.hours)+":"+et(e.minutes)+":"+et(t[0])+(t.length>1?"."+t[1]:"")}function it(e){return Ye(wt(e))}function ot(e){this.value=e}function at(e){this.value=e}function st(e,t,n,r,i,o,a){this.year=e,this.month=t,this.day=n,this.hours=r,this.minutes=i,this.seconds=o,this.negative=a}function ut(e){return(e.year?e.year+"Y":"")+(e.month?e.month+"M":"")}function ct(e){return(e.day?e.day+"D":"")+(e.hours||e.minutes||e.seconds?"T"+(e.hours?e.hours+"H":"")+(e.minutes?e.minutes+"M":"")+(e.seconds?e.seconds+"S":""):"")}function lt(e){return Ct(Dt(e))}function pt(e){this.value=e}function ft(e,t){this.day=e,this.timezone=t}function dt(e,t){this.month=e,this.timezone=t}function ht(e,t,n){this.month=e,this.day=t,this.timezone=n}function mt(e,t){this.year=e,this.timezone=t}function gt(e,t,n){this.year=e,this.month=t,this.timezone=n}function vt(e){this.value=e}function yt(){}function xt(e,t,n){this.prefix=e,this.localName=t,this.namespaceURI=n}function bt(e){this.value=e}function _t(e,t,n,r){this.hours=e,this.minutes=t,this.seconds=n,this.timezone=r}function wt(e){return(e.seconds>=60||e.seconds<0)&&(e.minutes+=~~(e.seconds/60)-(e.seconds<0&&e.seconds%60?1:0),e.seconds=e.seconds%60+(e.seconds<0&&e.seconds%60?60:0)),(e.minutes>=60||e.minutes<0)&&(e.hours+=~~(e.minutes/60)-(e.minutes<0&&e.minutes%60?1:0),e.minutes=e.minutes%60+(e.minutes<0&&e.minutes%60?60:0)),(e.hours>=24||e.hours<0)&&(e instanceof Ze&&(e.day+=~~(e.hours/24)-(e.hours<0&&e.hours%24?1:0)),e.hours=e.hours%24+(e.hours<0&&e.hours%24?24:0)),e}function Et(e){this.value=e}function St(e,t,n){st.call(this,e,t,0,0,0,0,n)}function Ct(e){return e.month>=12&&(e.year+=~~(e.month/12),e.month%=12),e}function Tt(e,t,n,r,i){st.call(this,0,0,e,t,n,r,i)}function Dt(e){return e.seconds>=60&&(e.minutes+=~~(e.seconds/60),e.seconds%=60),e.minutes>=60&&(e.hours+=~~(e.minutes/60),e.minutes%=60),e.hours>=24&&(e.day+=~~(e.hours/24),e.hours%=24),e}function At(e){this.value=e}function Pt(e){this.value=e}function kt(e){this.value=e}function It(e){this.value=e}function Ft(e){this.value=e}function Ot(e){this.value=e}function Nt(e){this.value=e}function jt(e){this.value=e}function Rt(e){this.value=e}function Lt(e){this.value=e}function Mt(e){this.value=e}function Bt(e){this.value=e}function Ut(e){this.value=e}function Vt(e){this.value=e}function Gt(e){this.value=e}function Wt(e){this.value=e}function Qt(e){this.value=e}function Ht(e){this.value=e}function zt(e){this.value=e}function qt(e){this.value=e}function $t(e){this.value=e}function Xt(){}function Kt(){}function Jt(){}function Yt(){}function Zt(){}function en(){}function tn(){}function nn(){}function rn(e,t,n){var r=dn(e),i=dn(t);return new Xe("lt"==n?ri:r==i)}function on(e,t,n){return an(Ze.cast(e),Ze.cast(t),n)}function an(e,t,n){var r=new Tt(0,0,0,0),i=yn(e,r).toString(),o=yn(t,r).toString();return new Xe("lt"==n?io:i==o)}function sn(e,t,n){var r;e instanceof Ke?r=new Ke(e.year,e.month,e.day,e.timezone,e.negative):e instanceof Ze&&(r=new Ze(e.year,e.month,e.day,e.hours,e.minutes,e.seconds,e.timezone,e.negative)),r.year=r.year+t.year*("-"==n?-1:1),r.month=r.month+t.month*("-"==n?-1:1),Ye(r,!0);var i=Je(r.year,r.month);return r.day>i&&(r.day=i),r}function un(e,t,n){var r;return e instanceof Ke?(r=new Ke(e.year,e.month,e.day,e.timezone,e.negative),r.day=r.day+t.day*("-"==n?-1:1),Ye(r)):e instanceof Ze&&(r=new Ze(e.year,e.month,e.day,e.hours,e.minutes,e.seconds,e.timezone,e.negative),r.seconds=r.seconds+t.seconds*("-"==n?-1:1),r.minutes=r.minutes+t.minutes*("-"==n?-1:1),r.hours=r.hours+t.hours*("-"==n?-1:1),r.day=r.day+t.day*("-"==n?-1:1),it(r)),r}function cn(e){return(60*(60*(24*e.day+e.hours)+e.minutes)+e.seconds)*(e.negative?-1:1)}function ln(e){var t=(e=In.round(e))<0,n=~~((e=In.abs(e))/86400),r=~~((e-=3600*n*24)/3600),i=~~((e-=3600*r)/60),o=e-=60*i;return new Tt(n,r,i,o,t)}function pn(e){return(12*e.year+e.month)*(e.negative?-1:1)}function fn(e){var t=(e=In.round(e))<0,n=~~((e=In.abs(e))/12),r=e-=12*n;return new St(n,r,t)}function dn(e){return e.seconds+60*(e.minutes-(null!=e.timezone?e.timezone%60:0)+60*(e.hours-(null!=e.timezone?~~(e.timezone/60):0)))}function hn(e,t){if(On(e)||In.abs(e)==Rn||On(t)||In.abs(t)==Rn)return 0;var n=Cn(e).match(or),r=Cn(t).match(or),i=In.max(1,(n[2]||n[3]||"").length+(n[5]||0)*("+"==n[4]?-1:1),(r[2]||r[3]||"").length+(r[5]||0)*("+"==r[4]?-1:1));return i+(i%2?0:1)}function mn(e,t,n){return new(e instanceof At&&t instanceof At&&n==In.round(n)?At:ot)(n)}function gn(e,t){if(null==e)return null;var n=e[t]*(e.negative?-1:1);return"seconds"==t?new ot(n):new At(n)}function vn(e,t){if(null==e)return null;if("timezone"==t){var n=e.timezone;return null==n?null:new Tt(0,In.abs(~~(n/60)),In.abs(n%60),0,n<0)}var r=e[t];return e instanceof Ke||"hours"==t&&24==r&&(r=0),e instanceof _t||(r*=e.negative?-1:1),"seconds"==t?new ot(r):new At(r)}function yn(e,t){if(null==e)return null;var n;if(n=e instanceof Ke?new Ke(e.year,e.month,e.day,e.timezone,e.negative):e instanceof _t?new _t(e.hours,e.minutes,e.seconds,e.timezone,e.negative):new Ze(e.year,e.month,e.day,e.hours,e.minutes,e.seconds,e.timezone,e.negative),null==t)n.timezone=null;else{var r=cn(t)/60;if(null!=e.timezone){var i=r-e.timezone;e instanceof Ke?i<0&&n.day--:(n.minutes+=i%60,n.hours+=~~(i/60)),it(n)}n.timezone=r}return n}function xn(t,n){if(!t.length)return!1;var r=t[0];if(n.DOMAdapter.isNode(r))return!0;if(1==t.length){if(r instanceof Xe)return r.value.valueOf();if(r instanceof bt)return!!r.valueOf().length;if(ze(r))return!(On(r.valueOf())||0==r.valueOf());throw new e("FORG0006","Effective boolean value is defined only for sequences containing booleans, strings, numbers, URIs, or nodes")}throw new e("FORG0006","Effective boolean value is not defined for a sequence of two or more items")}function bn(e,t){for(var n,r,i=[],o=0,a=e.length;o=0,c=n.indexOf("x")>=0;if(u||c){n=n.replace(/[sx]/g,"");for(var l,p=[],f=/\s/,d=0,h=t.length,m=!1,g="";d0},t.prototype.eof=function(){return this.index>=this.length},n.prototype.isNode=function(e){return e&&!!e.nodeType},n.prototype.getProperty=function(e,t){return e[t]},n.prototype.isSameNode=function(e,t){return e==t},n.prototype.compareDocumentPosition=function(e,t){return e.compareDocumentPosition(t)},n.prototype.lookupNamespaceURI=function(e,t){return e.lookupNamespaceURI(t)},n.prototype.getElementById=function(e,t){return e.getElementById(t)},n.prototype.getElementsByTagNameNS=function(e,t,n){return e.getElementsByTagNameNS(t,n)},r.prototype.item=null,r.prototype.position=0,r.prototype.size=0,r.prototype.scope=null,r.prototype.stack=null,r.prototype.dateTime=null,r.prototype.timezone=null,r.prototype.staticContext=null,r.prototype.pushVariable=function(e,t){this.stack.hasOwnProperty(e)||(this.stack[e]=[]),this.stack[e].push(this.scope[e]),this.scope[e]=t},r.prototype.popVariable=function(e){this.stack.hasOwnProperty(e)&&(this.scope[e]=this.stack[e].pop(),this.stack[e].length||(delete this.stack[e],"undefined"==typeof this.scope[e]&&delete this.scope[e]))},i.prototype.baseURI=null,i.prototype.dataTypes=null,i.prototype.documents=null,i.prototype.functions=null,i.prototype.defaultFunctionNamespace=null,i.prototype.collations=null,i.prototype.defaultCollationName=Un+"/collation/codepoint",i.prototype.collections=null,i.prototype.namespaceResolver=null,i.prototype.defaultElementNamespace=null;var Qn=/^(?:\{([^\}]+)\})?(.+)$/;i.prototype.setDataType=function(e,t){var n=e.match(Qn);n&&n[1]!=Bn&&(this.dataTypes[e]=t)},i.prototype.getDataType=function(e){var t=e.match(Qn);if(t)return t[1]==Bn?qn[An.$2]:this.dataTypes[e]},i.prototype.setDocument=function(e,t){this.documents[e]=t},i.prototype.setFunction=function(e,t){var n=e.match(Qn);n&&n[1]!=Un&&(this.functions[e]=t)},i.prototype.getFunction=function(e){var t=e.match(Qn);if(t)return t[1]==Un?Hn[An.$2]:this.functions[e]},i.prototype.setCollation=function(e,t){this.collations[e]=t},i.prototype.getCollation=function(e){return this.collations[e]},i.prototype.setCollection=function(e,t){this.collections[e]=t},i.prototype.getURIForPrefix=function(t){var n,r=this.namespaceResolver,i=r&&r.lookupNamespaceURI?r.lookupNamespaceURI:r;if(i instanceof kn&&(n=i.call(r,t)))return n;if("fn"==t)return Un;if("xs"==t)return Bn;if("xml"==t)return Gn;if("xmlns"==t)return Vn;throw new e("XPST0081","Prefix '"+t+"' has not been declared")},i.js2xs=function(e){return e="boolean"==typeof e?new Xe(e):"number"==typeof e?On(e)||!Nn(e)?new at(e):ce(Cn(e)):new bt(Cn(e))},i.xs2js=function(e){return e=e instanceof Xe?e.valueOf():ze(e)?e.valueOf():e.toString()};var Hn={},zn={},qn={},$n={};s.prototype.internalExpression=null,s.prototype.evaluate=function(e){return this.internalExpression.evaluate(e)},u.prototype.equals=function(e,t){throw"Not implemented"},u.prototype.compare=function(e,t){throw"Not implemented"},c.ANYSIMPLETYPE_DT=1,c.STRING_DT=2,c.BOOLEAN_DT=3,c.DECIMAL_DT=4,c.FLOAT_DT=5,c.DOUBLE_DT=6,c.DURATION_DT=7,c.DATETIME_DT=8,c.TIME_DT=9,c.DATE_DT=10,c.GYEARMONTH_DT=11,c.GYEAR_DT=12,c.GMONTHDAY_DT=13,c.GDAY_DT=14,c.GMONTH_DT=15,c.HEXBINARY_DT=16,c.BASE64BINARY_DT=17,c.ANYURI_DT=18,c.QNAME_DT=19,c.NOTATION_DT=20,c.NORMALIZEDSTRING_DT=21,c.TOKEN_DT=22,c.LANGUAGE_DT=23,c.NMTOKEN_DT=24,c.NAME_DT=25,c.NCNAME_DT=26,c.ID_DT=27,c.IDREF_DT=28,c.ENTITY_DT=29,c.INTEGER_DT=30,c.NONPOSITIVEINTEGER_DT=31,c.NEGATIVEINTEGER_DT=32,c.LONG_DT=33,c.INT_DT=34,c.SHORT_DT=35,c.BYTE_DT=36,c.NONNEGATIVEINTEGER_DT=37,c.UNSIGNEDLONG_DT=38,c.UNSIGNEDINT_DT=39,c.UNSIGNEDSHORT_DT=40,c.UNSIGNEDBYTE_DT=41,c.POSITIVEINTEGER_DT=42,c.LISTOFUNION_DT=43,c.LIST_DT=44,c.UNAVAILABLE_DT=45,c.DATETIMESTAMP_DT=46,c.DAYMONTHDURATION_DT=47,c.DAYTIMEDURATION_DT=48,c.PRECISIONDECIMAL_DT=49,c.ANYATOMICTYPE_DT=50,c.ANYTYPE_DT=51,c.XT_YEARMONTHDURATION_DT=-1,c.XT_UNTYPEDATOMIC_DT=-2,l.prototype.items=null,l.prototype.evaluate=function(e){for(var t=[],n=0,r=this.items.length;n":"gt","<":"lt",">=":"ge","<=":"le"},Kn={};Kn.eq=function(t,n,r){var i="";if(ze(t))ze(n)&&(i="numeric-equal");else if(t instanceof Xe)n instanceof Xe&&(i="boolean-equal");else if(t instanceof bt){if(n instanceof bt)return $n["numeric-equal"].call(r,Hn.compare.call(r,t,n),new At(0))}else t instanceof Ke?n instanceof Ke&&(i="date-equal"):t instanceof _t?n instanceof _t&&(i="time-equal"):t instanceof Ze?n instanceof Ze&&(i="dateTime-equal"):t instanceof st?n instanceof st&&(i="duration-equal"):t instanceof gt?n instanceof gt&&(i="gYearMonth-equal"):t instanceof mt?n instanceof mt&&(i="gYear-equal"):t instanceof ht?n instanceof ht&&(i="gMonthDay-equal"):t instanceof dt?n instanceof dt&&(i="gMonth-equal"):t instanceof ft?n instanceof ft&&(i="gDay-equal"):t instanceof xt?n instanceof xt&&(i="QName-equal"):t instanceof vt?n instanceof vt&&(i="hexBinary-equal"):t instanceof $e&&n instanceof $e&&(i="base64Binary-equal");if(i)return $n[i].call(r,t,n);throw new e("XPTY0004","Cannot compare values of given types")},Kn.ne=function(e,t,n){return new Xe(!Kn.eq(e,t,n).valueOf())},Kn.gt=function(t,n,r){var i="";if(ze(t))ze(n)&&(i="numeric-greater-than");else if(t instanceof Xe)n instanceof Xe&&(i="boolean-greater-than");else if(t instanceof bt){if(n instanceof bt)return $n["numeric-greater-than"].call(r,Hn.compare.call(r,t,n),new At(0))}else t instanceof Ke?n instanceof Ke&&(i="date-greater-than"):t instanceof _t?n instanceof _t&&(i="time-greater-than"):t instanceof Ze?n instanceof Ze&&(i="dateTime-greater-than"):t instanceof St?n instanceof St&&(i="yearMonthDuration-greater-than"):t instanceof Tt&&n instanceof Tt&&(i="dayTimeDuration-greater-than");if(i)return $n[i].call(r,t,n);throw new e("XPTY0004","Cannot compare values of given types")},Kn.lt=function(t,n,r){var i="";if(ze(t))ze(n)&&(i="numeric-less-than");else if(t instanceof Xe)n instanceof Xe&&(i="boolean-less-than");else if(t instanceof bt){if(n instanceof bt)return $n["numeric-less-than"].call(r,Hn.compare.call(r,t,n),new At(0))}else t instanceof Ke?n instanceof Ke&&(i="date-less-than"):t instanceof _t?n instanceof _t&&(i="time-less-than"):t instanceof Ze?n instanceof Ze&&(i="dateTime-less-than"):t instanceof St?n instanceof St&&(i="yearMonthDuration-less-than"):t instanceof Tt&&n instanceof Tt&&(i="dayTimeDuration-less-than");if(i)return $n[i].call(r,t,n);throw new e("XPTY0004","Cannot compare values of given types")},Kn.ge=function(t,n,r){var i="";if(ze(t)){if(ze(n))return $n["numeric-greater-than"].call(r,t,n)||$n["numeric-equal"].call(r,t,n)}else if(t instanceof Xe)n instanceof Xe&&(i="boolean-less-than");else if(t instanceof bt){if(n instanceof bt)return $n["numeric-greater-than"].call(r,Hn.compare.call(r,t,n),new At(-1))}else t instanceof Ke?n instanceof Ke&&(i="date-less-than"):t instanceof _t?n instanceof _t&&(i="time-less-than"):t instanceof Ze?n instanceof Ze&&(i="dateTime-less-than"):t instanceof St?n instanceof St&&(i="yearMonthDuration-less-than"):t instanceof Tt&&n instanceof Tt&&(i="dayTimeDuration-less-than");if(i)return new Xe(!$n[i].call(r,t,n).valueOf());throw new e("XPTY0004","Cannot compare values of given types")},Kn.le=function(t,n,r){var i="";if(ze(t)){if(ze(n))return $n["numeric-less-than"].call(r,t,n)||$n["numeric-equal"].call(r,t,n)}else if(t instanceof Xe)n instanceof Xe&&(i="boolean-greater-than");else if(t instanceof bt){if(n instanceof bt)return $n["numeric-less-than"].call(r,Hn.compare.call(r,t,n),new At(1))}else t instanceof Ke?n instanceof Ke&&(i="date-greater-than"):t instanceof _t?n instanceof _t&&(i="time-greater-than"):t instanceof Ze?n instanceof Ze&&(i="dateTime-greater-than"):t instanceof St?n instanceof St&&(i="yearMonthDuration-greater-than"):t instanceof Tt&&n instanceof Tt&&(i="dayTimeDuration-greater-than");if(i)return new Xe(!$n[i].call(r,t,n).valueOf());throw new e("XPTY0004","Cannot compare values of given types")};var Jn={};Jn.is=function(e,t,n){return $n["is-same-node"].call(n,e,t)},Jn[">>"]=function(e,t,n){return $n["node-after"].call(n,e,t)},Jn["<<"]=function(e,t,n){return $n["node-before"].call(n,e,t)};var Yn={"=":C,"!=":C,"<":C,"<=":C,">":C,">=":C,eq:T,ne:T,lt:T,le:T,gt:T,ge:T,is:D,">>":D,"<<":D};A.prototype.left=null,A.prototype.items=null;var Zn={};Zn["+"]=function(t,n,r){var i="",o=!1;if(ze(t)?ze(n)&&(i="numeric-add"):t instanceof Ke?n instanceof St?i="add-yearMonthDuration-to-date":n instanceof Tt&&(i="add-dayTimeDuration-to-date"):t instanceof St?n instanceof Ke?(i="add-yearMonthDuration-to-date",o=!0):n instanceof Ze?(i="add-yearMonthDuration-to-dateTime",o=!0):n instanceof St&&(i="add-yearMonthDurations"):t instanceof Tt?n instanceof Ke?(i="add-dayTimeDuration-to-date",o=!0):n instanceof _t?(i="add-dayTimeDuration-to-time",o=!0):n instanceof Ze?(i="add-dayTimeDuration-to-dateTime",o=!0):n instanceof Tt&&(i="add-dayTimeDurations"):t instanceof _t?n instanceof Tt&&(i="add-dayTimeDuration-to-time"):t instanceof Ze&&(n instanceof St?i="add-yearMonthDuration-to-dateTime":n instanceof Tt&&(i="add-dayTimeDuration-to-dateTime")),i)return $n[i].call(r,o?n:t,o?t:n);throw new e("XPTY0004","Arithmetic operator is not defined for provided arguments")},Zn["-"]=function(t,n,r){var i="";if(ze(t)?ze(n)&&(i="numeric-subtract"):t instanceof Ke?n instanceof Ke?i="subtract-dates":n instanceof St?i="subtract-yearMonthDuration-from-date":n instanceof Tt&&(i="subtract-dayTimeDuration-from-date"):t instanceof _t?n instanceof _t?i="subtract-times":n instanceof Tt&&(i="subtract-dayTimeDuration-from-time"):t instanceof Ze?n instanceof Ze?i="subtract-dateTimes":n instanceof St?i="subtract-yearMonthDuration-from-dateTime":n instanceof Tt&&(i="subtract-dayTimeDuration-from-dateTime"):t instanceof St?n instanceof St&&(i="subtract-yearMonthDurations"):t instanceof Tt&&n instanceof Tt&&(i="subtract-dayTimeDurations"),i)return $n[i].call(r,t,n);throw new e("XPTY0004","Arithmetic operator is not defined for provided arguments")},A.prototype.evaluate=function(e){var t=bn(this.left.evaluate(e),e);if(!t.length)return[];be(e,t,"?","first operand of '"+this.items[0][0]+"'");var n=t[0];n instanceof Et&&(n=at.cast(n));for(var r,i,o=0,a=this.items.length;o1)return[new Xe(!1)];if(!n.length)return[new Xe("?"==i)];try{r.cast(bn(n,t)[0])}catch(t){if("XPST0051"==t.code)throw t;if("XPST0017"==t.code)throw new e("XPST0080","No value is castable to "+(r.prefix?r.prefix+":":"")+r.localName);return[new Xe(!1)]}return[new Xe(!0)]},Oe.prototype.expression=null,Oe.prototype.type=null,Oe.prototype.evaluate=function(e){var t=this.expression.evaluate(e);return be(e,t,this.type.occurence,"'cast as' expression operand"),t.length?[this.type.itemType.cast(bn(t,e)[0],e)]:[]},je.prototype.prefix=null,je.prototype.localName=null,je.prototype.namespaceURI=null,je.prototype.test=function(t,n){var r=(this.namespaceURI?"{"+this.namespaceURI+"}":"")+this.localName,i=this.namespaceURI==Bn?qn[this.localName]:n.staticContext.getDataType(r);if(i)return t instanceof i;throw new e("XPST0051","Unknown simple type "+(this.prefix?this.prefix+":":"")+this.localName)},je.prototype.cast=function(t,n){var r=(this.namespaceURI?"{"+this.namespaceURI+"}":"")+this.localName,i=this.namespaceURI==Bn?qn[this.localName]:n.staticContext.getDataType(r);if(i)return i.cast(t);throw new e("XPST0051","Unknown atomic type "+(this.prefix?this.prefix+":":"")+this.localName)},Le.prototype.test=null,Be.prototype.itemType=null,Be.prototype.occurence=null,Ve.prototype.itemType=null,Ve.prototype.occurence=null,Qe.prototype.builtInKind=c.ANYTYPE_DT,Qe.prototype=new We,Qe.prototype.builtInKind=c.ANYSIMPLETYPE_DT,Qe.prototype.primitiveKind=null,Qe.PRIMITIVE_ANYURI="anyURI",Qe.PRIMITIVE_BASE64BINARY="base64Binary",Qe.PRIMITIVE_BOOLEAN="boolean",Qe.PRIMITIVE_DATE="date",Qe.PRIMITIVE_DATETIME="dateTime",Qe.PRIMITIVE_DECIMAL="decimal",Qe.PRIMITIVE_DOUBLE="double",Qe.PRIMITIVE_DURATION="duration",Qe.PRIMITIVE_FLOAT="float",Qe.PRIMITIVE_GDAY="gDay",Qe.PRIMITIVE_GMONTH="gMonth",Qe.PRIMITIVE_GMONTHDAY="gMonthDay",Qe.PRIMITIVE_GYEAR="gYear",Qe.PRIMITIVE_GYEARMONTH="gYearMonth",Qe.PRIMITIVE_HEXBINARY="hexBinary",Qe.PRIMITIVE_NOTATION="NOTATION",Qe.PRIMITIVE_QNAME="QName",Qe.PRIMITIVE_STRING="string",Qe.PRIMITIVE_TIME="time",He.prototype=new Qe,He.prototype.builtInKind=c.ANYATOMICTYPE_DT,He.cast=function(t){throw new e("XPST0017","Abstract type used in constructor function xs:anyAtomicType")},a("anyAtomicType",He),qe.prototype=new He,qe.prototype.builtInKind=c.ANYURI_DT,qe.prototype.primitiveKind=Qe.PRIMITIVE_ANYURI,qe.prototype.scheme=null,qe.prototype.authority=null,qe.prototype.path=null,qe.prototype.query=null,qe.prototype.fragment=null,qe.prototype.toString=function(){return(this.scheme?this.scheme+":":"")+(this.authority?"//"+this.authority:"")+(this.path?this.path:"")+(this.query?"?"+this.query:"")+(this.fragment?"#"+this.fragment:"")};var ur=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;qe.cast=function(t){if(t instanceof qe)return t;if(t instanceof bt||t instanceof Et){var n;if(n=Ln(t).match(ur))return new qe(n[2],n[4],n[5],n[7],n[9]);throw new e("FORG0001")}throw new e("XPTY0004","Casting value '"+t+"' to xs:anyURI can never succeed")},a("anyURI",qe),$e.prototype=new He,$e.prototype.builtInKind=c.BASE64BINARY_DT,$e.prototype.primitiveKind=Qe.PRIMITIVE_BASE64BINARY,$e.prototype.value=null,$e.prototype.valueOf=function(){return this.value},$e.prototype.toString=function(){return this.value};var cr=/^((([A-Za-z0-9+\/]\s*){4})*(([A-Za-z0-9+\/]\s*){3}[A-Za-z0-9+\/]|([A-Za-z0-9+\/]\s*){2}[AEIMQUYcgkosw048]\s*=|[A-Za-z0-9+\/]\s*[AQgw]\s*=\s*=))?$/;$e.cast=function(t){if(t instanceof $e)return t;if(t instanceof bt||t instanceof Et){var n=Ln(t).match(cr);if(n)return new $e(n[0]);throw new e("FORG0001")}if(t instanceof vt)throw"Casting from 'xs:hexBinary' to 'xs:base64Binary' not implemented";throw new e("XPTY0004","Casting value '"+t+"' to xs:hexBinary can never succeed")},a("base64Binary",$e),Xe.prototype=new He,Xe.prototype.builtInKind=c.BOOLEAN_DT,Xe.prototype.primitiveKind=Qe.PRIMITIVE_BOOLEAN,Xe.prototype.value=null,Xe.prototype.valueOf=function(){return this.value},Xe.prototype.toString=function(){return Cn(this.value)};var lr=/^(0|1|true|false)$/;Xe.cast=function(t){if(t instanceof Xe)return t;if(t instanceof bt||t instanceof Et){var n;if(n=Ln(t).match(lr))return new Xe("1"==n[1]||"true"==n[1]);throw new e("FORG0001")}if(ze(t))return new Xe(0!=t);throw new e("XPTY0004","Casting value '"+t+"' to xs:boolean can never succeed")},a("boolean",Xe),Ke.prototype=new He,Ke.prototype.builtInKind=c.DATE_DT,Ke.prototype.primitiveKind=Qe.PRIMITIVE_DATE,Ke.prototype.year=null,Ke.prototype.month=null,Ke.prototype.day=null,Ke.prototype.timezone=null,Ke.prototype.negative=null,Ke.prototype.toString=function(){return nt(this)+tt(this)};var pr=/^(-?)([1-9]\d\d\d+|0\d\d\d)-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])(Z|([+\-])(0\d|1[0-4]):([0-5]\d))?$/;Ke.cast=function(t){if(t instanceof Ke)return t;if(t instanceof bt||t instanceof Et){var n=Ln(t).match(pr);if(n){var r=+n[2],i=+n[3],o=+n[4];if(o-1t.valueOf())},$n["yearMonthDuration-less-than"]=function(e,t){return new Xe(pn(e)pn(t))},$n["dayTimeDuration-less-than"]=function(e,t){return new Xe(cn(e)cn(t))},$n["duration-equal"]=function(e,t){return new Xe(e.negative==t.negative&&pn(e)==pn(t)&&cn(e)==cn(t))},$n["dateTime-equal"]=function(e,t){return an(e,t,"eq")},$n["dateTime-less-than"]=function(e,t){return an(e,t,"lt")},$n["dateTime-greater-than"]=function(e,t){return an(e,t,"gt")},$n["date-equal"]=function(e,t){return on(e,t,"eq")},$n["date-less-than"]=function(e,t){return on(e,t,"lt")},$n["date-greater-than"]=function(e,t){return on(e,t,"gt")},$n["time-equal"]=function(e,t){return rn(e,t,"eq")},$n["time-less-than"]=function(e,t){return rn(e,t,"lt")},$n["time-greater-than"]=function(e,t){return rn(e,t,"gt")},$n["gYearMonth-equal"]=function(e,t){return an(new Ze(e.year,e.month,Je(e.year,e.month),0,0,0,null==e.timezone?this.timezone:e.timezone),new Ze(t.year,t.month,Je(t.year,t.month),0,0,0,null==t.timezone?this.timezone:t.timezone),"eq")},$n["gYear-equal"]=function(e,t){return an(new Ze(e.year,1,1,0,0,0,null==e.timezone?this.timezone:e.timezone),new Ze(t.year,1,1,0,0,0,null==t.timezone?this.timezone:t.timezone),"eq")},$n["gMonthDay-equal"]=function(e,t){return an(new Ze(1972,e.month,e.day,0,0,0,null==e.timezone?this.timezone:e.timezone),new Ze(1972,t.month,t.day,0,0,0,null==t.timezone?this.timezone:t.timezone),"eq")},$n["gMonth-equal"]=function(e,t){return an(new Ze(1972,e.month,Je(1972,t.month),0,0,0,null==e.timezone?this.timezone:e.timezone),new Ze(1972,t.month,Je(1972,t.month),0,0,0,null==t.timezone?this.timezone:t.timezone),"eq")},$n["gDay-equal"]=function(e,t){return an(new Ze(1972,12,e.day,0,0,0,null==e.timezone?this.timezone:e.timezone),new Ze(1972,12,t.day,0,0,0,null==t.timezone?this.timezone:t.timezone),"eq")},$n["add-yearMonthDurations"]=function(e,t){return fn(pn(e)+pn(t))},$n["subtract-yearMonthDurations"]=function(e,t){return fn(pn(e)-pn(t))},$n["multiply-yearMonthDuration"]=function(e,t){return fn(pn(e)*t)},$n["divide-yearMonthDuration"]=function(e,t){return fn(pn(e)/t)},$n["divide-yearMonthDuration-by-yearMonthDuration"]=function(e,t){return new ot(pn(e)/pn(t))},$n["add-dayTimeDurations"]=function(e,t){return ln(cn(e)+cn(t))},$n["subtract-dayTimeDurations"]=function(e,t){return ln(cn(e)-cn(t))},$n["multiply-dayTimeDuration"]=function(e,t){return ln(cn(e)*t)},$n["divide-dayTimeDuration"]=function(e,t){return ln(cn(e)/t)},$n["divide-dayTimeDuration-by-dayTimeDuration"]=function(e,t){return new ot(cn(e)/cn(t))},$n["subtract-dateTimes"]=function(e,t){throw"Operator function 'subtract-dateTimes' not implemented"},$n["subtract-dates"]=function(e,t){throw"Operator function 'subtract-dates' not implemented"},$n["subtract-times"]=function(e,t){return ln(dn(e)-dn(t))},$n["add-yearMonthDuration-to-dateTime"]=function(e,t){return sn(e,t,"+")},$n["add-dayTimeDuration-to-dateTime"]=function(e,t){return un(e,t,"+")},$n["subtract-yearMonthDuration-from-dateTime"]=function(e,t){return sn(e,t,"-")},$n["subtract-dayTimeDuration-from-dateTime"]=function(e,t){return un(e,t,"-")},$n["add-yearMonthDuration-to-date"]=function(e,t){return sn(e,t,"+")},$n["add-dayTimeDuration-to-date"]=function(e,t){return un(e,t,"+")},$n["subtract-yearMonthDuration-from-date"]=function(e,t){return sn(e,t,"-")},$n["subtract-dayTimeDuration-from-date"]=function(e,t){return un(e,t,"-")},$n["add-dayTimeDuration-to-time"]=function(e,t){var n=new _t(e.hours,e.minutes,e.seconds,e.timezone);return n.hours+=t.hours,n.minutes+=t.minutes,n.seconds+=t.seconds,wt(n)},$n["subtract-dayTimeDuration-from-time"]=function(e,t){var n=new _t(e.hours,e.minutes,e.seconds,e.timezone);return n.hours-=t.hours,n.minutes-=t.minutes,n.seconds-=t.seconds,wt(n)},$n["is-same-node"]=function(e,t){return new Xe(this.DOMAdapter.isSameNode(e,t))},$n["node-before"]=function(e,t){return new Xe(!!(4&this.DOMAdapter.compareDocumentPosition(e,t)))},$n["node-after"]=function(e,t){return new Xe(!!(2&this.DOMAdapter.compareDocumentPosition(e,t)))},$n["numeric-add"]=function(e,t){var n=e.valueOf(),r=t.valueOf(),i=In.pow(10,hn(n,r));return mn(e,t,(n*i+r*i)/i)},$n["numeric-subtract"]=function(e,t){var n=e.valueOf(),r=t.valueOf(),i=In.pow(10,hn(n,r));return mn(e,t,(n*i-r*i)/i)},$n["numeric-multiply"]=function(e,t){var n=e.valueOf(),r=t.valueOf(),i=In.pow(10,hn(n,r));return mn(e,t,n*i*(r*i)/(i*i))},$n["numeric-divide"]=function(e,t){var n=e.valueOf(),r=t.valueOf(),i=In.pow(10,hn(n,r));return mn(e,t,e*i/(t*i))},$n["numeric-integer-divide"]=function(e,t){return new At(~~(e/t))},$n["numeric-mod"]=function(e,t){var n=e.valueOf(),r=t.valueOf(),i=In.pow(10,hn(n,r));return mn(e,t,n*i%(r*i)/i)},$n["numeric-unary-plus"]=function(e){return e},$n["numeric-unary-minus"]=function(e){return e.value*=-1,e},$n["numeric-equal"]=function(e,t){return new Xe(e.valueOf()==t.valueOf())},$n["numeric-less-than"]=function(e,t){return new Xe(e.valueOf()t.valueOf())},$n["QName-equal"]=function(e,t){return new Xe(e.localName==t.localName&&e.namespaceURI==t.namespaceURI)},$n.concatenate=function(e,t){return e.concat(t)},$n.union=function(t,n){for(var r,i=[],o=0,a=t.length;os?a.pop():(a.push(o[u]),s++):"."!=o[u]&&a.push(o[u]);".."!=o[--u]&&"."!=o[u]||a.push(""),r.path=a.join("/")}return r}),o("true",[],function(){return new Xe(!0)}),o("false",[],function(){return new Xe(!1)}),o("not",[[Xt,"*"]],function(e){return new Xe(!xn(e,this))}),o("position",[],function(){return new At(this.position)}),o("last",[],function(){return new At(this.size)}),o("current-dateTime",[],function(){return this.dateTime}),o("current-date",[],function(){return Ke.cast(this.dateTime)}),o("current-time",[],function(){return _t.cast(this.dateTime)}),o("implicit-timezone",[],function(){return this.timezone}),o("default-collation",[],function(){return new bt(this.staticContext.defaultCollationName)}),o("static-base-uri",[],function(){return qe.cast(new bt(this.staticContext.baseURI||""))}),o("years-from-duration",[[st,"?"]],function(e){return gn(e,"year")}),o("months-from-duration",[[st,"?"]],function(e){return gn(e,"month")}),o("days-from-duration",[[st,"?"]],function(e){return gn(e,"day")}),o("hours-from-duration",[[st,"?"]],function(e){return gn(e,"hours")}),o("minutes-from-duration",[[st,"?"]],function(e){return gn(e,"minutes")}),o("seconds-from-duration",[[st,"?"]],function(e){return gn(e,"seconds")}),o("year-from-dateTime",[[Ze,"?"]],function(e){return vn(e,"year")}),o("month-from-dateTime",[[Ze,"?"]],function(e){return vn(e,"month")}),o("day-from-dateTime",[[Ze,"?"]],function(e){return vn(e,"day")}),o("hours-from-dateTime",[[Ze,"?"]],function(e){return vn(e,"hours")}),o("minutes-from-dateTime",[[Ze,"?"]],function(e){return vn(e,"minutes")}),o("seconds-from-dateTime",[[Ze,"?"]],function(e){return vn(e,"seconds")}),o("timezone-from-dateTime",[[Ze,"?"]],function(e){return vn(e,"timezone")}),o("year-from-date",[[Ke,"?"]],function(e){return vn(e,"year")}),o("month-from-date",[[Ke,"?"]],function(e){return vn(e,"month")}),o("day-from-date",[[Ke,"?"]],function(e){return vn(e,"day")}),o("timezone-from-date",[[Ke,"?"]],function(e){return vn(e,"timezone")}),o("hours-from-time",[[_t,"?"]],function(e){return vn(e,"hours")}),o("minutes-from-time",[[_t,"?"]],function(e){return vn(e,"minutes")}),o("seconds-from-time",[[_t,"?"]],function(e){return vn(e,"seconds")}),o("timezone-from-time",[[_t,"?"]],function(e){return vn(e,"timezone")}),o("adjust-dateTime-to-timezone",[[Ze,"?"],[Tt,"?",!0]],function(e,t){return yn(e,arguments.length>1&&null!=t?arguments.length>1?t:this.timezone:null)}),o("adjust-date-to-timezone",[[Ke,"?"],[Tt,"?",!0]],function(e,t){return yn(e,arguments.length>1&&null!=t?arguments.length>1?t:this.timezone:null)}),o("adjust-time-to-timezone",[[_t,"?"],[Tt,"?",!0]],function(e,t){return yn(e,arguments.length>1&&null!=t?arguments.length>1?t:this.timezone:null)}),o("name",[[Kt,"?",!0]],function(t){if(arguments.length){if(null==t)return new bt("")}else{if(!this.DOMAdapter.isNode(this.item))throw new e("XPTY0004","name() function called when the context item is not a node");t=this.item}var n=Hn["node-name"].call(this,t);return new bt(null==n?"":n.toString())}),o("local-name",[[Kt,"?",!0]],function(t){if(arguments.length){if(null==t)return new bt("")}else{if(!this.DOMAdapter.isNode(this.item))throw new e("XPTY0004","local-name() function called when the context item is not a node");t=this.item}return new bt(this.DOMAdapter.getProperty(t,"localName")||"")});o("namespace-uri",[[Kt,"?",!0]],function(t){if(arguments.length){if(null==t)return qe.cast(new bt(""))}else{if(!this.DOMAdapter.isNode(this.item))throw new e("XPTY0004","namespace-uri() function called when the context item is not a node");t=this.item}return qe.cast(new bt(this.DOMAdapter.getProperty(t,"namespaceURI")||""))});o("number",[[He,"?",!0]],function(t){if(!arguments.length){if(!this.item)throw new e("XPDY0002");t=bn([this.item],this)[0]}var n=new at(jn);if(null!=t)try{n=at.cast(t)}catch(e){}return n}),o("lang",[[bt,"?"],[Kt,"",!0]],function(t,n){if(arguments.length<2){if(!this.DOMAdapter.isNode(this.item))throw new e("XPTY0004","lang() function called when the context item is not a node");n=this.item}var r=this.DOMAdapter.getProperty;2==r(n,"nodeType")&&(n=r(n,"ownerElement"));for(var i;n;n=r(n,"parentNode"))if(i=r(n,"attributes"))for(var o=0,a=i.length;o1?t.valueOf():0;if(n<0){var r=new At(In.pow(10,-n)),i=In.round($n["numeric-divide"].call(this,e,r)),o=new At(i);return nDecimal=In.abs($n["numeric-subtract"].call(this,o,$n["numeric-divide"].call(this,e,r))),$n["numeric-multiply"].call(this,$n["numeric-add"].call(this,o,new ot(.5==nDecimal&&i%2?-1:0)),r)}var r=new At(In.pow(10,n)),i=In.round($n["numeric-multiply"].call(this,e,r)),o=new At(i);return nDecimal=In.abs($n["numeric-subtract"].call(this,o,$n["numeric-multiply"].call(this,e,r))),$n["numeric-divide"].call(this,$n["numeric-add"].call(this,o,new ot(.5==nDecimal&&i%2?-1:0)),r)}),o("resolve-QName",[[bt,"?"],[en]],function(t,n){if(null==t)return null;var r=t.valueOf(),i=r.match(Sr);if(!i)throw new e("FOCA0002","Invalid QName '"+r+"'");var o=i[1]||null,a=i[2],s=this.DOMAdapter.lookupNamespaceURI(n,o);if(null!=o&&!s)throw new e("FONS0004","Namespace prefix '"+o+"' has not been declared");return new xt(o,a,s||null)}),o("QName",[[bt,"?"],[bt]],function(t,n){var r=n.valueOf(),i=r.match(Sr);if(!i)throw new e("FOCA0002","Invalid QName '"+r+"'");return new xt(i[1]||null,i[2]||null,null==t?"":t.valueOf())}),o("prefix-from-QName",[[xt,"?"]],function(e){return null!=e&&e.prefix?new Qt(e.prefix):null}),o("local-name-from-QName",[[xt,"?"]],function(e){return null==e?null:new Qt(e.localName)}),o("namespace-uri-from-QName",[[xt,"?"]],function(e){return null==e?null:qe.cast(new bt(e.namespaceURI||""))}),o("namespace-uri-for-prefix",[[bt,"?"],[en]],function(e,t){var n=null==e?"":e.valueOf(),r=this.DOMAdapter.lookupNamespaceURI(t,n||null);return null==r?null:qe.cast(new bt(r))}),o("in-scope-prefixes",[[en]],function(e){throw"Function 'in-scope-prefixes' not implemented"}),o("boolean",[[Xt,"*"]],function(e){return new Xe(xn(e,this))}),o("index-of",[[He,"*"],[He],[bt,"",!0]],function(e,t,n){if(!e.length||null==t)return[];var r=t;r instanceof Et&&(r=bt.cast(r));for(var i,o=[],a=0,s=e.length;ar&&(i=r+1);for(var o=[],a=0;an)return e;for(var i=[],o=0;o2?In.round(n):e.length-r+1;return e.slice(r-1,r-1+i)}),o("unordered",[[Xt,"*"]],function(e){return e}),o("zero-or-one",[[Xt,"*"]],function(t){if(t.length>1)throw new e("FORG0003");return t}),o("one-or-more",[[Xt,"*"]],function(t){if(!t.length)throw new e("FORG0004");return t}),o("exactly-one",[[Xt,"*"]],function(t){if(1!=t.length)throw new e("FORG0005");return t}),o("deep-equal",[[Xt,"*"],[Xt,"*"],[bt,"",!0]],function(e,t,n){throw"Function 'deep-equal' not implemented"}),o("count",[[Xt,"*"]],function(e){return new At(e.length)}),o("avg",[[He,"*"]],function(t){if(!t.length)return null;try{var n=t[0];n instanceof Et&&(n=at.cast(n));for(var r,i=1,o=t.length;i1?n:new at(0);try{var r=t[0];r instanceof Et&&(r=at.cast(r));for(var i,o=1,a=t.length;o2&&(o=r.valueOf()),i=o==Un+"/collation/codepoint"?Pr:this.staticContext.getCollation(o),!i)throw new e("FOCH0002","Unknown collation {"+o+"}");return new At(i.compare(t.valueOf(),n.valueOf()))}),o("codepoint-equal",[[bt,"?"],[bt,"?"]],function(e,t){return null==e||null==t?null:new Xe(e.valueOf()==t.valueOf())}),o("concat",null,function(){if(arguments.length<2)throw new e("XPST0017","Function concat() must have at least 2 arguments"); for(var t,n=[],r=0,i=arguments.length;r2?i+In.round(n):r.length;return new bt(o>i?r.substring(i,o):"")}),o("string-length",[[bt,"?",!0]],function(t){if(!arguments.length){if(!this.item)throw new e("XPDY0002");t=bt.cast(bn([this.item],this)[0])}return new At(null==t?0:t.valueOf().length)}),o("normalize-space",[[bt,"?",!0]],function(t){if(!arguments.length){if(!this.item)throw new e("XPDY0002");t=bt.cast(bn([this.item],this)[0])}return new bt(null==t?"":Ln(t).replace(/\s\s+/g," "))}),o("normalize-unicode",[[bt,"?"],[bt,"",!0]],function(e,t){throw"Function 'normalize-unicode' not implemented"}),o("upper-case",[[bt,"?"]],function(e){return new bt(null==e?"":e.valueOf().toUpperCase())}),o("lower-case",[[bt,"?"]],function(e){return new bt(null==e?"":e.valueOf().toLowerCase())}),o("translate",[[bt,"?"],[bt],[bt]],function(e,t,n){if(null==e)return new bt("");for(var r,i=e.valueOf().split(""),o=t.valueOf().split(""),a=n.valueOf().split(""),s=a.length,u=[],c=0,l=i.length;c126)&&(n[r]=window.encodeURIComponent(n[r]));return new bt(n.join(""))}),o("contains",[[bt,"?"],[bt,"?"],[bt,"",!0]],function(e,t,n){return new Xe((null==e?"":e.valueOf()).indexOf(null==t?"":t.valueOf())>=0)}),o("starts-with",[[bt,"?"],[bt,"?"],[bt,"",!0]],function(e,t,n){return new Xe(0==(null==e?"":e.valueOf()).indexOf(null==t?"":t.valueOf()))}),o("ends-with",[[bt,"?"],[bt,"?"],[bt,"",!0]],function(e,t,n){var r=null==e?"":e.valueOf(),i=null==t?"":t.valueOf();return new Xe(r.indexOf(i)==r.length-i.length)}),o("substring-before",[[bt,"?"],[bt,"?"],[bt,"",!0]],function(e,t,n){var r,i=null==e?"":e.valueOf(),o=null==t?"":t.valueOf();return new bt((r=i.indexOf(o))>=0?i.substring(0,r):"")}),o("substring-after",[[bt,"?"],[bt,"?"],[bt,"",!0]],function(e,t,n){var r,i=null==e?"":e.valueOf(),o=null==t?"":t.valueOf();return new bt((r=i.indexOf(o))>=0?i.substring(r+o.length):"")}),o("matches",[[bt,"?"],[bt],[bt,"",!0]],function(e,t,n){var r=null==e?"":e.valueOf(),i=wn(t.valueOf(),arguments.length>2?n.valueOf():"");return new Xe(i.test(r))}),o("replace",[[bt,"?"],[bt],[bt],[bt,"",!0]],function(e,t,n,r){var i=null==e?"":e.valueOf(),o=wn(t.valueOf(),arguments.length>3?r.valueOf():"");return new Xe(i.replace(o,n.valueOf()))}),o("tokenize",[[bt,"?"],[bt],[bt,"",!0]],function(e,t,n){for(var r=null==e?"":e.valueOf(),i=wn(t.valueOf(),arguments.length>2?n.valueOf():""),o=[],a=0,s=r.split(i),u=s.length;at?1:-1};var kr=function(){};kr.prototype.nodeType=2,kr.prototype.nodeName=kr.prototype.nodeValue=kr.prototype.ownerDocument=kr.prototype.localName=kr.prototype.namespaceURI=kr.prototype.prefix=kr.prototype.attributes=kr.prototype.childNodes=kr.prototype.firstChild=kr.prototype.lastChild=kr.prototype.previousSibling=kr.prototype.nextSibling=kr.prototype.parentNode=kr.prototype.name=kr.prototype.specified=kr.prototype.value=kr.prototype.ownerElement=null,En.prototype=new n;var Ir=new i;En.prototype.getProperty=function(e,t){if(t in e)return e[t];if("baseURI"==t){for(var n,r="",i=Ir.getFunction("{http://www.w3.org/2005/xpath-functions}resolve-uri"),o=Ir.getDataType("{http://www.w3.org/2001/XMLSchema}string"),a=e;a;a=a.parentNode)1==a.nodeType&&(n=a.getAttribute("xml:base"))&&(r=i(new o(n),new o(r)).toString());return r}if("textContent"==t){var s=[];return function(e){for(var t,n=0;t=e.childNodes[n];n++)3==t.nodeType||4==t.nodeType?s.push(t.data):1==t.nodeType&&t.firstChild&&arguments.callee(t)}(e),s.join("")}},En.prototype.compareDocumentPosition=function(e,t){if("compareDocumentPosition"in e)return e.compareDocumentPosition(t);if(t==e)return 0;var n,r,i,o,a,s=null,u=null;if(2==e.nodeType&&(s=e,e=this.getProperty(s,"ownerElement")),2==t.nodeType&&(u=t,t=this.getProperty(u,"ownerElement")),s&&u&&e&&e==t)for(o=0,n=this.getProperty(e,"attributes"),a=n.length;o1&&(i=i.concat(u[h]))}return i}}}),define("fiorixmlanalysis/rules/DG_XML_NO_SINGLE_TAB",[],function(){"use strict";return{id:"DG_XML_NO_SINGLE_TAB",category:"Desgin Guidelines Error",path:"//ns:IconTabBar/ns:items[count(ns:IconTabFilter)=1]//ancestor::ns:IconTabBar",errorMsg:"An icon tab bar should at least have two icon tab filter.",helpUrl:"https://help.hana.ondemand.com/webide/frameset.htm?c4b38d061d834516950260df05763ab6.html",validate:function(e,t,n){for(var r=[],i=0;i-1||a.indexOf("__metadata/media_src")>-1)&&r.push(o)}}return r}}}),define("fiorixmlanalysis/rules/XML_BOOKMARK_PERFORMANCE",[],function(){"use strict";return{id:"XML_BOOKMARK_PERFORMANCE",category:"Fiori Architectural Guidelines Error",path:"//footerbar:AddBookmarkButton[@serviceRefreshInterval > 0 and @serviceRefreshInterval < 300]",errorMsg:"A value of more than 0 and less than 300 for the property serviceRefreshIntervall may result in performance limitations.",helpUrl:"https://help.hana.ondemand.com/webide/frameset.htm?1cb106fb7db14f75b4de28fa89767dc6.html",validate:function(e,t,n){for(var r=[],i=0;i-1||t.indexOf(".fragment.")>-1?this.reportAnalysisErrors(e,t,n,r,this.setRootSeverity,this.reportError):Q({})},reportAnalysisErrors:function(n,r,o,a,s,u){var c=[];for(var l in i){var p,f,d=i[l];a.indexOf(t.get(d.id))>=0&&(p=e.exec(d.path,n),f=d.validate(o,r,p),f.then?c.push(f):c.push(Q({id:d.id,category:d.category,errorMsg:d.errorMsg,helpUrl:d.helpUrl,violations:f})))}return Q.all(c).then(function(e){for(var n=0;n0){s(o,a);for(var c=0;c]+\,?)+/;return t.test(e)},startsWith:function(e,t){return 0===e.indexOf(t)},getLastPart:function(e,t){void 0==t&&(t=".");var n=e.lastIndexOf(t);return n==-1?e:e.substr(n+1)},removeLastPart:function(e,t){return"number"==typeof t?e.substr(0,e.length-t):e.substr(0,e.length-t.length)},getText:function(n,r){return e||(jQuery.sap.require("sap.ui.model.resource.ResourceModel"),e=this._createResourceModel(),t=e.getResourceBundle()),t?t.getText(n,r):n},parseComplexObjectFromString:function(e){var t=e.replace(/(\w+)(\s*):/gm,function(e,t){var n=e.trim();return n=n.replace(/\s/g,""),'"'+n.substr(0,n.length-1)+'" : '});t=t.replace(/\'/g,'"');var n=null;try{n=$.parseJSON(t)}catch(e){}return n},parseBindingInfor:function(e){var t={value:"",paths:"",formatter:"",tooComplex:!1,extraStr:""};if(void 0==e)return t;var n=e.indexOf("{"),r=e.lastIndexOf("}");if(n==-1&&r==-1)return t.value=e,t;if(0!=n||r!=e.length-1)return t.value=e,t.tooComplex=!0,t;var i=e.indexOf("path"),o=e.indexOf("formatter");if(i==-1&&o==-1)return e=e.substr(1),t.paths=this.removeLastPart(e,1),t.paths.indexOf("}")!=-1&&(t.paths=t.paths.replace(/\}/g,""),t.paths=t.paths.replace(/\{/g,","),t.paths=t.paths.replace(/\s/g,"")),t;var a=this.parseComplexObjectFromString(e);if(null==a)return t.value=e,t.tooComplex=!0,t;if("formatter"in a&&(t.formatter=a.formatter,delete a.formatter),"parts"in a){for(var s=[],u=a.parts,c=0;c-1?"error":"warning"},o.prototype.addNodeIssue=function(e,t,n,r,i,o){var a=this.getPosition();this.addIssue(e,a.line.start,a.column.start,t,n,r,i,o)},o.prototype.addMetaIssue=function(e,n,i,o,a,s,u,c){var l=this.getPosition(),p=t.getPosition(l,r.getLastPart(this.getNodeName()),n,i);this.addIssue(e,p.line.start,p.column.start,o,a,s,u,c)},o.prototype.checkSemantic=function(e){this.checkSemantic_NodeSelf(e),this.checkSemantic_Meta(e);for(var t=this.getNodes(),n=0;n0&&this.addMetaIssue(e,t,i,u[0],u[1],u[2],u[3],u[4])},o.prototype.checkSemantic_Meta_Event=function(e,t,n,i){i.DeprecatedInfo&&i.DeprecatedInfo.isDeprecated&&this.addMetaIssue(e,t,n,"XML_DEPRECATED_EVENT",t,this.getNodeName(),i.DeprecatedInfo.since,this._retriveTextFromHtml(i.DeprecatedInfo.description)),r.isValidFunction(n)||this.addMetaIssue(e,t,n,"XML_INVALID_EVENT_FUNC",n)},o.prototype.checkSemantic_Meta_Asso=function(e,t,n,i){ for(var o=n.split(","),a=0;a1&&this!=r.getNodes()[0]&&this.addNodeIssue(t,"XML_INVALID_MULTIPLICITY",r.getNodeName(),r.getNodes().length)}}}}},o.prototype._retriveTextFromHtml=function(e){if(e)return e.replace(/<(?:.|\n)*?>/gm,"")},o}),define("fiorixmlanalysis/utils/XmlViewReader",["./customXmlParser","./XmlCtrlNode","./EnumValue","./Utils","./Ui5MetadataMng"],function(e,t,n,r,i){return{validateXml:function(t,n,r){var i=e.parseXML(t);if(null==i.documentElement){var o={issues:[{message:"Invalid XML"}]};return Q(o)}var a=this.parseXml(i.documentElement),s={aId:[],issues:[],metaData:n};return a.checkSemantic(s),delete s.aId,delete s.metaData,Q(s)},parseXml:function(e){function i(e){var t=e[0];return t>="A"&&t<="Z"}function o(e){return"xmlns"==e||0==e.indexOf("xmlns:")}function a(e){return e.localName||e.baseName||e.nodeName}function s(e,t){var n=u(e,t);c(n,t);for(var r=$(t),i=0;i0&&(this._aExtensionFilters=e.repositoryBrowserExtensionFilters)},isAvailable:function(){return!0},open:function(e){var n=this;this._oDocument=e,this._oManifestContent={};var r={_version:"1.2.0","sap.app":{_version:"1.2.0"}},i=this._oAppDescriptorEditorView.getController().getSelectedTabName();return this._oDocument.getProject().then(function(e){return e.getTitle()}).then(function(e){return n.context.service.usagemonitoring.report("appDescriptor","open",i,e)}).done(),this._oDocument.getContent().then(function(e){try{jQuery.extend(n._oManifestContent,JSON.parse(e)),t.isEmpty(n._oManifestContent)||(r=n._oManifestContent),n._oAppDescriptorEditorView.getController().setParsingErrorPage(!1)}catch(e){return n._oAppDescriptorEditorView.getController().setParsingErrorPage(!0),console.log(n.context.i18n.getText("AppDescriptor_invalid_file")),Q()}return n.context.service.fioriSchemaProvider.getFlatSchema(r).then(function(e){n._bVisibility=sap.watt.getEnv("internal"),n._oAdjustedSchema=e,n._fillManifestSkeleton(n._oAdjustedSchema,n._oManifestContent),n._oAppDescriptorEditorView.getController().setManifestAndSchema(e.properties,n._oManifestContent,n._oDocument)})})},getContent:function(){return this._oAppDescriptorEditorView||(this._oAppDescriptorEditorView=sap.ui.view({viewName:"sap.watt.saptoolsets.fiori.editor.plugin.appdescriptoreditor.ui.AppDescriptorEditor",type:sap.ui.core.mvc.ViewType.XML,viewData:{oContext:this.context,oUtil:n,aExtentionFilters:this._aExtensionFilters}}),this.context.i18n.applyTo(this._oAppDescriptorEditorView),this._oAppDescriptorEditorView.getController().attachEvent("manifestChanged",this._onManifsetChanged,this)),this._oAppDescriptorEditorView},flush:function(){this._oDocument.isDirty()&&this.updateDocument()},_onManifsetChanged:function(){this.updateDocument()},_fillManifestSkeleton:function(e,n,r,i){var o=this,a={},s={},u=null,c="string",l=[],p=[],f=[];if(jQuery.each(e,function(e,t){switch(e){case"properties":a=t;break;case"patternProperties":s=t;break;case"default":u=t;break;case"type":c=t;break;case"enum":l=t;break;case"items":p=t;break;case"required":f=t}}),jQuery.isEmptyObject(a)&&!jQuery.isEmptyObject(s)||!jQuery.isEmptyObject(a)&&jQuery.isEmptyObject(s))jQuery.each(a,function(e,r){!t.isEmpty(f)&&t.includes(f,e)?(void 0===n[e]&&(n[e]={}),o._fillManifestSkeleton(r,n[e],n,e)):void 0!==n[e]&&o._fillManifestSkeleton(r,n[e],n,e)});else{if(jQuery.isPlainObject(r[i])){if(!jQuery.isEmptyObject(r[i]))return}else if(void 0!==r[i])return;if(i){var d=!1;if(r[i]&&jQuery.isArray(r[i])&&(d=!0),u)return void(d?r[i].push(u):r[i]=u);if(jQuery.isArray(l)){if(1==l.length)return void(d?r[i].push(l[0]):r[i]=l[0]);if(l.length>1&&"_version"===i)return void(d?r[i].push(l[l.length-1]):r[i]=l[l.length-1]);if(l.length>1)return void(d?r[i].push(l[0]):r[i]=l[0])}switch(c){case"integer":d?r[i].push(0):r[i]=0;break;case"object":d?r[i].push({}):r[i]={};break;case"array":d?r[i].push([]):r[i]=[],o._fillManifestSkeleton(p,r[i],r,i);break;case"boolean":d?r[i].push(!1):r[i]=!1;break;default:d?r[i].push(""):r[i]=""}}}},updateDocument:function(){var e=this,t=this._oDocument;this.context.service.beautifierProcessor.beautify(JSON.stringify(this._oManifestContent),"json").then(function(n){return t.setContent(n,e.context.self)}).done()}});return r}),define("sap.watt.saptoolsets.fiori.editor.fioriJsValidator/util/configReader",["sap/watt/lib/jszip/jszip-shim"],function(e){"use strict";return{zipLoadCalled:!1,fioriDefaultConfig:{},fioriDefaultCustomRules:{},getFioriConfiguration:function(){var e=this;return Q(e.fioriDefaultConfig)},getFioriRules:function(){var e=this;return Q(e.fioriDefaultCustomRules)},getZipSourceUrl:function(){return require.toUrl("sap.watt.saptoolsets.fiori.editor.fioriJsValidator/rules/eslint.distribution-eslint.configuration.assembly.zip")},_loadDefaultConfig:function(){if(this.zipLoadCalled)return Q();this.zipLoadCalled=!0;var t=this,n=Q.defer(),r=this.getZipSourceUrl(),i=new XMLHttpRequest;return i.open("GET",r,!0),i.responseType="arraybuffer",i.onload=function(){if(4===this.readyState&&this.status<300)try{var r=new e;r.load(this.response);var i="";for(var o in r.files){var a=r.files[o];if(a.options&&a.options.dir)i=o;else if(".eslintrc"===o){var s=JSON.parse(a.asText());t.fioriDefaultConfig=s}else if(o.indexOf(".js")!==-1){var u=o.replace(/\.js/,"");u=u.replace(i,""),t.fioriDefaultCustomRules[u]=t._adaptCustomRulesContent(a.asText())}}n.resolve()}catch(e){n.reject(e)}else n.reject(new Error("rules could not be found. failed with status "+this.status))},i.onerror=function(e){n.reject(e)},i.send(null),n.promise},_adaptCustomRulesContent:function(e){var t=e.replace(/(\s*(module\.exports)\s*=)/,"\n return ");return t}}}),function(){var e=function t(n,r,i){function o(s,u){if(!r[s]){if(!n[s]){var c="function"==typeof e&&e;if(!u&&c)return c(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var p=r[s]={exports:{}};n[s][0].call(p.exports,function(e){var t=n[s][1][e];return o(t?t:e)},p,p.exports,t,n,r,i)}return r[s].exports}for(var a="function"==typeof e&&e,s=0;s0)){for(i.trailingComments.length>0?i.trailingComments[0].range[0]>=e.range[1]?(n=i.trailingComments,i.trailingComments=[]):i.trailingComments.length=0:i.bottomRightStack.length>0&&i.bottomRightStack[i.bottomRightStack.length-1].trailingComments&&i.bottomRightStack[i.bottomRightStack.length-1].trailingComments[0].range[0]>=e.range[1]&&(n=i.bottomRightStack[i.bottomRightStack.length-1].trailingComments,delete i.bottomRightStack[i.bottomRightStack.length-1].trailingComments);i.bottomRightStack.length>0&&i.bottomRightStack[i.bottomRightStack.length-1].range[0]>=e.range[0];)t=i.bottomRightStack.pop();if(t)t.leadingComments&&t.leadingComments[t.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=t.leadingComments,delete t.leadingComments);else if(i.leadingComments.length>0)if(i.leadingComments[i.leadingComments.length-1].range[1]<=e.range[0])e.leadingComments=i.leadingComments,i.leadingComments=[];else{for(o=0;oe.range[0]);o++);e.leadingComments=i.leadingComments.slice(0,o),0===e.leadingComments.length&&delete e.leadingComments,n=i.leadingComments.slice(o),0===n.length&&(n=null)}n&&(e.trailingComments=n),i.bottomRightStack.push(e)}}}},{"./ast-node-types":2}],4:[function(e,t,n){"use strict";t.exports={arrowFunctions:!1,blockBindings:!0,destructuring:!1,regexUFlag:!1,regexYFlag:!1,templateStrings:!1,binaryLiterals:!1,octalLiterals:!1,unicodeCodePointEscapes:!0,defaultParams:!1,restParams:!1,forOf:!1,objectLiteralComputedProperties:!1,objectLiteralShorthandMethods:!1,objectLiteralShorthandProperties:!1,objectLiteralDuplicateProperties:!1,generators:!1,spread:!1,superInFunctions:!1,classes:!1,modules:!1,jsx:!1,globalReturn:!1}},{}],5:[function(e,t,n){"use strict";t.exports={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",InvalidRegExpFlag:"Invalid regular expression flag",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInFormalsList:"Invalid left-hand side in formals list",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",NoUnintializedConst:"Const must be initialized",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",IllegalYield:"Illegal yield expression",IllegalSpread:"Illegal spread element",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",DefaultRestParameter:"Rest parameter can not have a default value",ElementAfterSpreadElement:"Spread must be the final element of an element list",ObjectPatternAsRestParameter:"Invalid rest parameter",ObjectPatternAsSpread:"Invalid spread argument",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",DuplicatePrototypeProperty:"Duplicate '__proto__' property in object literal are not allowed",ConstructorSpecialMethod:"Class constructor may not be an accessor",DuplicateConstructor:"A class may only have one constructor",StaticPrototype:"Classes may not have static property named prototype",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",InvalidJSXAttributeValue:"JSX value should be either an expression or a quoted JSX text",ExpectedJSXClosingTag:"Expected corresponding JSX closing tag for %0",AdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag",MissingFromClause:"Missing from clause",NoAsAfterImportNamespace:"Missing as after import *",InvalidModuleSpecifier:"Invalid module specifier",IllegalImportDeclaration:"Illegal import declaration",IllegalExportDeclaration:"Illegal export declaration"}},{}],6:[function(e,t,n){"use strict";function r(){this.$data={}}r.prototype.get=function(e){return e="$"+e,this.$data[e]},r.prototype.set=function(e,t){return e="$"+e,this.$data[e]=t,this},r.prototype.has=function(e){return e="$"+e,Object.prototype.hasOwnProperty.call(this.$data,e)},r.prototype.delete=function(e){return e="$"+e,delete this.$data[e]},t.exports=r},{}],7:[function(e,t,n){"use strict";var r={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"), LeadingZeros:new RegExp("^0+(?!$)")};t.exports={Regex:r,isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return"0123456789abcdefABCDEF".indexOf(e)>=0},isOctalDigit:function(e){return"01234567".indexOf(e)>=0},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&r.NonAsciiIdentifierStart.test(String.fromCharCode(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&r.NonAsciiIdentifierPart.test(String.fromCharCode(e))},isFutureReservedWord:function(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}},isStrictModeReservedWord:function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},isRestrictedWord:function(e){return"eval"===e||"arguments"===e},isKeyword:function(e,t,n){if(t&&this.isStrictModeReservedWord(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||!n.generators&&"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},isJSXIdentifierStart:function(e){return 92!==e&&this.isIdentifierStart(e)},isJSXIdentifierPart:function(e){return 92!==e&&(45===e||this.isIdentifierPart(e))}}},{}],8:[function(e,t,n){"use strict";var r={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9,Template:10,JSXIdentifier:11,JSXText:12},i={};i[r.BooleanLiteral]="Boolean",i[r.EOF]="",i[r.Identifier]="Identifier",i[r.Keyword]="Keyword",i[r.NullLiteral]="Null",i[r.NumericLiteral]="Numeric",i[r.Punctuator]="Punctuator",i[r.StringLiteral]="String",i[r.RegularExpression]="RegularExpression",i[r.Template]="Template",i[r.JSXIdentifier]="JSXIdentifier",i[r.JSXText]="JSXText";var o=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="];t.exports={Token:r,TokenName:i,FnExprTokens:o}},{}],9:[function(e,t,n){"use strict";t.exports={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},{}],10:[function(e,t,n){t.exports={name:"espree",description:"An actively-maintained fork of Esprima, the ECMAScript parsing infrastructure for multipurpose analysis",author:{name:"Nicholas C. Zakas",email:"nicholas+npm@nczconsulting.com"},homepage:"https://github.com/eslint/espree",main:"espree.js",bin:{esparse:"./bin/esparse.js",esvalidate:"./bin/esvalidate.js"},version:"2.0.3",files:["bin","lib","test/run.js","test/runner.js","test/test.js","test/compat.js","test/reflect.js","espree.js"],engines:{node:">=0.10.0"},repository:{type:"git",url:"git+ssh://git@github.com/eslint/espree.git"},bugs:{url:"http://github.com/eslint/espree.git"},licenses:[{type:"BSD",url:"http://github.com/nzakas/espree/raw/master/LICENSE"}],devDependencies:{browserify:"^7.0.0",chai:"^1.10.0","complexity-report":"~0.6.1",dateformat:"^1.0.11",eslint:"^0.9.2",esprima:"git://github.com/jquery/esprima.git","esprima-fb":"^8001.2001.0-dev-harmony-fb",istanbul:"~0.2.6","json-diff":"~0.3.1",leche:"^1.0.1",mocha:"^2.0.1","npm-license":"^0.2.3",optimist:"~0.6.0",regenerate:"~0.5.4",semver:"^4.1.1",shelljs:"^0.3.0","shelljs-nodecli":"^0.1.1","unicode-6.3.0":"~0.1.0"},keywords:["ast","ecmascript","javascript","parser","syntax"],scripts:{"generate-regex":"node tools/generate-identifier-regex.js",test:"npm run-script lint && node Makefile.js test && node test/run.js",lint:"node Makefile.js lint",patch:"node Makefile.js patch",minor:"node Makefile.js minor",major:"node Makefile.js major",browserify:"node Makefile.js browserify",coverage:"npm run-script analyze-coverage && npm run-script check-coverage","analyze-coverage":"node node_modules/istanbul/lib/cli.js cover test/runner.js","check-coverage":"node node_modules/istanbul/lib/cli.js check-coverage --statement 99 --branch 99 --function 99",complexity:"npm run-script analyze-complexity && npm run-script check-complexity","analyze-complexity":"node tools/list-complexity.js","check-complexity":"node node_modules/complexity-report/src/cli.js --maxcc 14 --silent -l -w espree.js",benchmark:"node test/benchmarks.js","benchmark-quick":"node test/benchmarks.js quick"},dependencies:{},gitHead:"b60b597cfe4834aacd16c90179ce73e22705c132",_id:"espree@2.0.3",_shasum:"1fbdff60a410bd0d416b1ab3d6230d34b7a450e1",_from:"espree@>=2.0.1 <3.0.0",_npmVersion:"1.4.28",_npmUser:{name:"nzakas",email:"nicholas@nczconsulting.com"},maintainers:[{name:"nzakas",email:"nicholas@nczconsulting.com"}],dist:{shasum:"1fbdff60a410bd0d416b1ab3d6230d34b7a450e1",tarball:"http://registry.npmjs.org/espree/-/espree-2.0.3.tgz"},directories:{},_resolved:"https://registry.npmjs.org/espree/-/espree-2.0.3.tgz",readme:"ERROR: No README data found!"}},{}],espree:[function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error("ASSERT: "+t)}function i(e,t,n,i,o){var a;r("number"==typeof n,"Comment must have valid position"),tn.lastCommentStart>=n||(tn.lastCommentStart=n,a={type:e,value:t},nn.range&&(a.range=[n,i]),nn.loc&&(a.loc=o),nn.comments.push(a),nn.attachComment&&fn.addComment(a))}function o(e){var t,n,r,o;for(t=Kt-e,n={start:{line:Jt,column:Kt-Yt-e}};Kt=Zt&&re({},cn.UnexpectedToken,"ILLEGAL");else if(42===n){if(47===$t.charCodeAt(Kt+1))return++Kt,++Kt,void(nn.comments&&(r=$t.slice(e+2,Kt-2),t.end={line:Jt,column:Kt-Yt},i("Block",r,e,Kt,t)));++Kt}else++Kt;re({},cn.UnexpectedToken,"ILLEGAL")}function s(){var e,t;for(t=0===Kt;Kt1114111||"}"!==e)&&re({},cn.UnexpectedToken,"ILLEGAL"),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,r=(t-65536&1023)+56320,String.fromCharCode(n,r))}function l(){var e,t;for(e=$t.charCodeAt(Kt++),t=String.fromCharCode(e),92===e&&(117!==$t.charCodeAt(Kt)&&re({},cn.UnexpectedToken,"ILLEGAL"),++Kt,e=u("u"),e&&"\\"!==e&&rn.isIdentifierStart(e.charCodeAt(0))||re({},cn.UnexpectedToken,"ILLEGAL"),t=e);Kttn.curlyLastIndex&&(tn.curlyLastIndex=Kt,123===o?tn.curlyStack.push("{"):tn.curlyStack.pop()),{type:dn.Punctuator,value:String.fromCharCode(o),lineNumber:Jt,lineStart:Yt,range:[i,Kt]};default:if(e=$t.charCodeAt(Kt+1),61===e)switch(o){case 37:case 38:case 42:case 43:case 45:case 47:case 60:case 62:case 94:case 124:return Kt+=2,{type:dn.Punctuator,value:String.fromCharCode(o)+String.fromCharCode(e),lineNumber:Jt,lineStart:Yt,range:[i,Kt]};case 33:case 61:return Kt+=2,61===$t.charCodeAt(Kt)&&++Kt,{type:dn.Punctuator,value:$t.slice(i,Kt),lineNumber:Jt,lineStart:Yt,range:[i,Kt]}}}return t=$t[Kt+1],n=$t[Kt+2],r=$t[Kt+3],">"===a&&">"===t&&">"===n&&"="===r?(Kt+=4,{type:dn.Punctuator,value:">>>=",lineNumber:Jt,lineStart:Yt,range:[i,Kt]}):">"===a&&">"===t&&">"===n?(Kt+=3,{type:dn.Punctuator,value:">>>",lineNumber:Jt,lineStart:Yt,range:[i,Kt]}):"<"===a&&"<"===t&&"="===n?(Kt+=3,{type:dn.Punctuator,value:"<<=",lineNumber:Jt,lineStart:Yt,range:[i,Kt]}):">"===a&&">"===t&&"="===n?(Kt+=3,{type:dn.Punctuator,value:">>=",lineNumber:Jt,lineStart:Yt,range:[i,Kt]}):(nn.ecmaFeatures.spread||nn.ecmaFeatures.restParams||nn.ecmaFeatures.jsx&&tn.inJSXSpreadAttribute)&&"."===a&&"."===t&&"."===n?(Kt+=3,{type:dn.Punctuator,value:"...",lineNumber:Jt,lineStart:Yt,range:[i,Kt]}):a===t&&"+-<>&|".indexOf(a)>=0?(Kt+=2,{type:dn.Punctuator,value:a+t,lineNumber:Jt,lineStart:Yt,range:[i,Kt]}):nn.ecmaFeatures.arrowFunctions&&"="===a&&">"===t?(Kt+=2,{type:dn.Punctuator,value:"=>",lineNumber:Jt,lineStart:Yt,range:[i,Kt]}):"<>=!+-*%&|^/".indexOf(a)>=0?(++Kt,{type:dn.Punctuator,value:a,lineNumber:Jt,lineStart:Yt,range:[i,Kt]}):"."===a?(++Kt,{type:dn.Punctuator,value:a,lineNumber:Jt,lineStart:Yt,range:[i,Kt]}):void re({},cn.UnexpectedToken,"ILLEGAL")}function h(e){for(var t="";Kt=0&&Kttn.curlyLastIndex&&(tn.curlyLastIndex=Kt,o||tn.curlyStack.push("template"),a||tn.curlyStack.pop()),{type:dn.Template,value:{cooked:n,raw:$t.slice(r+1,Kt-(o?1:2))},head:a,tail:o,lineNumber:Jt,lineStart:Yt,range:[r,Kt]}}function _(e,t){var n=e,r="gmsi";nn.ecmaFeatures.regexYFlag&&(r+="y"),nn.ecmaFeatures.regexUFlag&&(r+="u"),RegExp("^["+r+"]*$").test(t)||re({},cn.InvalidRegExpFlag),t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t){return parseInt(t,16)<=1114111?"x":void re({},cn.InvalidRegExp)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{RegExp(n)}catch(e){re({},cn.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}}function w(){var e,t,n,i,o;for(e=$t[Kt],r("/"===e,"Regular expression literal must start with a slash"),t=$t[Kt++],n=!1,i=!1;Kt0&&(r=nn.tokens[nn.tokens.length-1],r.range[0]===e&&"Punctuator"===r.type&&("/"!==r.value&&"/="!==r.value||nn.tokens.pop())),nn.tokens.push({type:"RegularExpression",value:n.literal,regex:n.regex,range:[e,Kt],loc:t})),n}function T(e){return e.type===dn.Identifier||e.type===dn.Keyword||e.type===dn.BooleanLiteral||e.type===dn.NullLiteral}function D(){var e,t;if(e=nn.tokens[nn.tokens.length-1],!e)return C();if("Punctuator"===e.type){if("]"===e.value)return d();if(")"===e.value)return t=nn.tokens[nn.openParenToken-1],!t||"Keyword"!==t.type||"if"!==t.value&&"while"!==t.value&&"for"!==t.value&&"with"!==t.value?d():C();if("}"===e.value){if(nn.tokens[nn.openCurlyToken-3]&&"Keyword"===nn.tokens[nn.openCurlyToken-3].type){if(t=nn.tokens[nn.openCurlyToken-4],!t)return d()}else{if(!nn.tokens[nn.openCurlyToken-4]||"Keyword"!==nn.tokens[nn.openCurlyToken-4].type)return d();if(t=nn.tokens[nn.openCurlyToken-5],!t)return C()}return mn.indexOf(t.value)>=0?d():C()}return C()}return"Keyword"===e.type?C():d()}function A(){var e,t=nn.ecmaFeatures.jsx,n=nn.ecmaFeatures.templateStrings;return t&&tn.inJSXChild||s(),Kt>=Zt?{type:dn.EOF,lineNumber:Jt,lineStart:Yt,range:[Kt,Kt]}:t&&tn.inJSXChild?M():(e=$t.charCodeAt(Kt),40===e||41===e||59===e?d():39===e||34===e?t&&tn.inJSXTag?L():x():t&&tn.inJSXTag&&rn.isJSXIdentifierStart(e)?N():n&&(96===e||125===e&&"template"===tn.curlyStack[tn.curlyStack.length-1])?b():rn.isIdentifierStart(e)?f():46===e?rn.isDecimalDigit($t.charCodeAt(Kt+1))?v():d():rn.isDecimalDigit(e)?v():nn.tokenize&&47===e?D():d())}function P(){var e,t,n,r,i,o=nn.ecmaFeatures.jsx;return o&&tn.inJSXChild||s(),e={start:{line:Jt,column:Kt-Yt}},t=A(),e.end={line:Jt,column:Kt-Yt},t.type!==dn.EOF&&(n=[t.range[0],t.range[1]],r=$t.slice(t.range[0],t.range[1]),i={type:hn[t.type],value:r,range:n,loc:e},t.regex&&(i.regex={pattern:t.regex.pattern,flags:t.regex.flags}),nn.tokens.push(i)),t}function k(){var e;return e=en,Kt=e.range[1],Jt=e.lineNumber,Yt=e.lineStart,en="undefined"!=typeof nn.tokens?P():A(),Kt=e.range[1],Jt=e.lineNumber,Yt=e.lineStart,e}function I(){var e,t,n;e=Kt,t=Jt,n=Yt,en="undefined"!=typeof nn.tokens?P():A(),Kt=e,Jt=t,Yt=n}function F(){var e,t,n,r,i;return e="function"==typeof nn.advance?nn.advance:A,t=Kt,n=Jt,r=Yt,null===en&&(en=e()),Kt=en.range[1],Jt=en.lineNumber,Yt=en.lineStart,i=e(),Kt=t,Jt=n,Yt=r,i}function O(e){return e.type===an.JSXIdentifier?e.name:e.type===an.JSXNamespacedName?e.namespace.name+":"+e.name.name:e.type===an.JSXMemberExpression?O(e.object)+"."+O(e.property):void oe(e)}function N(){var e,t,n="";for(t=Kt;Kt"),Z(r,sn.createJSXClosingElement(e))}function J(){var e,t,n,r=[],i=!1,o=ee();for(t=tn.inJSXChild,n=tn.inJSXTag,tn.inJSXChild=!1,tn.inJSXTag=!0,ae("<"),e=G();Kt"!==en.value;)r.push($());return tn.inJSXTag=n,"/"===en.value?(ae("/"),tn.inJSXChild=t,ae(">"),i=!0):(tn.inJSXChild=!0,ae(">")),Z(o,sn.createJSXOpeningElement(e,r,i))}function Y(){var e,t,n,r=null,i=[],o=ee();if(t=tn.inJSXChild,n=tn.inJSXTag,e=J(),!e.selfClosing){for(;Kt>="===e||">>>="===e||"&="===e||"^="===e||"|="===e)}function fe(){var e;return 59===$t.charCodeAt(Kt)||ue(";")?void k():(e=Jt,s(),void(Jt===e&&(en.type===dn.EOF||ue("}")||oe(en))))}function de(e){return e.type===an.Identifier||e.type===an.MemberExpression}function he(){var e,t=[],n=ee();for(ae("[");!ue("]");)ue(",")?(k(),t.push(null)):(e=Pe(),t.push(e),ue("]")||ae(","));return ae("]"),Z(n,sn.createArrayExpression(t))}function me(e,t){var n,r=Xt,i=tn.yieldAllowed,o=!!t&&t.generator;return tn.yieldAllowed=o,n=bt(),Xt&&e.firstRestricted&&ie(e.firstRestricted,cn.StrictParamName),Xt&&e.stricted&&ie(e.stricted,e.message),Xt=r,tn.yieldAllowed=i,Z(t.marker,sn.createFunctionExpression(null,e.params,n,o,n.type!==an.BlockStatement))}function ge(e){var t,n,r=Xt,i=ee();return Xt=!0,t=Et(),t.stricted&&ie(t.stricted,t.message),n=me(t,{generator:!!e&&e.generator,marker:i}),Xt=r,n}function ve(){var e,t,n=ee(),r=k(),i=nn.ecmaFeatures.objectLiteralComputedProperties;switch(r.type){case dn.StringLiteral:case dn.NumericLiteral:return Xt&&r.octal&&ie(r,cn.StrictOctalLiteral),Z(n,sn.createLiteralFromSource(r,$t));case dn.Identifier:case dn.BooleanLiteral:case dn.NullLiteral:case dn.Keyword:return Z(n,sn.createIdentifier(r.value));case dn.Punctuator:if((!tn.inObjectLiteral||i)&&"["===r.value)return n=ee(),e=ze(),t=Z(n,e),ae("]"),t}oe(r)}function ye(){switch(en.type){case dn.Identifier:case dn.StringLiteral:case dn.BooleanLiteral:case dn.NullLiteral:case dn.NumericLiteral:case dn.Keyword:return!0;case dn.Punctuator:return"["===en.value}return!1}function xe(e,t,n,r){var i,o,a;if(e.type===dn.Identifier){if("get"===e.value&&ye())return n=ue("["),t=ve(),a=ee(),ae("("),ae(")"),i=me({params:[],stricted:null,firstRestricted:null,message:null},{marker:a}),Z(r,sn.createProperty("get",t,i,!1,!1,n));if("set"===e.value&&ye())return n=ue("["),t=ve(),a=ee(),ae("("),o={params:[],defaultCount:0,stricted:null,firstRestricted:null,paramSet:new pn},ue(")")?ie(en,cn.UnexpectedToken,en.value):wt(o),ae(")"),i=me(o,{marker:a}),Z(r,sn.createProperty("set",t,i,!1,!1,n))}return ue("(")?(i=ge(),Z(r,sn.createProperty("init",t,i,!0,!1,n))):null}function be(e,t){var n=en.type===dn.Punctuator&&"["===en.value;return ue("(")||oe(k()),Z(t,sn.createProperty("init",e,ge({generator:!0}),!0,!1,n))}function _e(){var e,t,n,r,i,o,a=nn.ecmaFeatures.objectLiteralComputedProperties,s=nn.ecmaFeatures.objectLiteralShorthandMethods,u=nn.ecmaFeatures.objectLiteralShorthandProperties,c=nn.ecmaFeatures.generators,l=nn.ecmaFeatures.destructuring,p=ee();if(e=en,r="["===e.value&&e.type===dn.Punctuator,e.type===dn.Identifier||a&&r){if(n=ve(),"get"===e.value&&!(ue(":")||ue("(")||ue(",")||ue("}")))return r="["===en.value,t=ve(),i=ee(),ae("("),ae(")"),Z(p,sn.createProperty("get",t,me({generator:!1},{marker:i}),!1,!1,r));if("set"===e.value&&!(ue(":")||ue("(")||ue(",")||ue("}")))return r="["===en.value,t=ve(),i=ee(),ae("("),o={params:[],defaultCount:0,stricted:null,firstRestricted:null,paramSet:new pn},ue(")")?ie(en,cn.UnexpectedToken,en.value):wt(o),ae(")"),Z(p,sn.createProperty("set",t,me(o,{marker:i}),!1,!1,r));if(ue(":"))return k(),Z(p,sn.createProperty("init",n,ze(),!1,!1,r));if(s&&ue("("))return Z(p,sn.createProperty("init",n,ge({generator:!1}),!0,!1,r));if(l&&ue("=")){k();var f=ze(),d=Z(p,sn.createAssignmentExpression("=",n,f));d.type=an.AssignmentPattern;var h=sn.createProperty("init",n,d,!1,!0,r);return Z(p,h)}return(r||!u&&!l)&&oe(en),Z(p,sn.createProperty("init",n,n,!1,!0,!1))}return e.type===dn.EOF||e.type===dn.Punctuator?(c&&ue("*")&&s||oe(e),k(),n=ve(),be(n,p)):(t=ve(),ue(":")?(k(),Z(p,sn.createProperty("init",t,ze(),!1,!1,!1))):s&&ue("(")?Z(p,sn.createProperty("init",t,ge(),!0,!1,!1)):void oe(k()))}function we(e){var t=String;return e.type===an.Identifier?e.name:t(e.value)}function Ee(){var e,t,n,r,i,o=ee(),a=nn.ecmaFeatures.objectLiteralDuplicateProperties,s=[],u=tn.inObjectLiteral,c=new pn;for(tn.inObjectLiteral=!0,ae("{");!ue("}");)e=_e(),e.computed||(t=we(e.key),n="get"===e.kind?qt.Get:qt.Set,r="init"===e.kind?qt.Data:n,c.has(t)?(i=c.get(t),i===qt.Data?r===qt.Data&&"__proto__"===t&&a?ie({},cn.DuplicatePrototypeProperty):Xt&&r===qt.Data&&!a?ie({},cn.StrictDuplicateProperty):r!==qt.Data&&ie({},cn.AccessorDataProperty):r===qt.Data?ie({},cn.AccessorDataProperty):i&r&&ie({},cn.AccessorGetSet),c.set(t,i|r)):c.set(t,r)),s.push(e),ue("}")||ae(",");return ae("}"),tn.inObjectLiteral=u,Z(o,sn.createObjectExpression(s))}function Se(e){var t,n;return(en.type!==dn.Template||e.head&&!en.head)&&re({},cn.UnexpectedToken,"ILLEGAL"),t=ee(),n=k(),Z(t,sn.createTemplateElement({raw:n.value.raw,cooked:n.value.cooked},n.tail))}function Ce(){var e,t,n,r=ee();for(e=Se({head:!0}),t=[e],n=[];!e.tail;)n.push(qe()),e=Se({head:!1}),t.push(e);return Z(r,sn.createTemplateLiteral(t,n))}function Te(){var e;return ae("("),++tn.parenthesisCount,e=qe(),ae(")"),e}function De(){var e,t,n,r,i=nn.ecmaFeatures.jsx,o=nn.ecmaFeatures.classes,a=o||nn.ecmaFeatures.superInFunctions;if(ue("("))return Te();if(ue("["))return he();if(ue("{"))return Ee();if(i&&ue("<"))return Y();if(e=en.type,r=ee(),e===dn.Identifier)n=sn.createIdentifier(k().value);else if(e===dn.StringLiteral||e===dn.NumericLiteral)Xt&&en.octal&&ie(en,cn.StrictOctalLiteral),n=sn.createLiteralFromSource(k(),$t);else if(e===dn.Keyword){if(ce("function"))return Ct();if(a&&ce("super")&&tn.inFunctionBody)return r=ee(),k(),Z(r,sn.createSuper()); if(ce("this"))return r=ee(),k(),Z(r,sn.createThisExpression());if(o&&ce("class"))return Bt();oe(k())}else if(e===dn.BooleanLiteral)t=k(),t.value="true"===t.value,n=sn.createLiteralFromSource(t,$t);else if(e===dn.NullLiteral)t=k(),t.value=null,n=sn.createLiteralFromSource(t,$t);else if(ue("/")||ue("/="))n="undefined"!=typeof nn.tokens?sn.createLiteralFromSource(C(),$t):sn.createLiteralFromSource(S(),$t),I();else{if(e===dn.Template)return Ce();oe(k())}return Z(r,n)}function Ae(){var e,t=[];if(ae("("),!ue(")"))for(;Kt":case"<=":case">=":case"instanceof":n=7;break;case"in":n=t?7:0;break;case"<<":case">>":case">>>":n=8;break;case"+":case"-":n=9;break;case"*":case"/":case"%":n=11}return n}function Be(){var e,t,n,r,i,o,a,s,u,c,l;if(r=tn.allowIn,tn.allowIn=!0,c=ee(),s=Le(),t=en,n=Me(t,r),0===n)return s;for(t.prec=n,k(),l=[c,ee()],o=Le(),i=[s,t,o];(n=Me(en,r))>0;){for(;i.length>2&&n<=i[i.length-2].prec;)o=i.pop(),a=i.pop().value,s=i.pop(),e=sn.createBinaryExpression(a,s,o),l.pop(),c=l.pop(),Z(c,e),i.push(e),l.push(c);t=k(),t.prec=n,i.push(t),l.push(ee()),e=Le(),i.push(e)}for(tn.allowIn=r,u=i.length-1,e=i[u],l.pop();u>1;)e=sn.createBinaryExpression(i[u-1].value,i[u-2],e),u-=2,c=l.pop(),Z(c,e);return e}function Ue(){var e,t,n,r,i=ee();return e=Be(),ue("?")&&(k(),t=tn.allowIn,tn.allowIn=!0,n=ze(),tn.allowIn=t,ae(":"),r=ze(),e=sn.createConditionalExpression(e,n,r),Z(i,e)),e}function Ve(){return ue("{")?bt():ze()}function Ge(e){var t,n,i,o,a,s=nn.ecmaFeatures.restParams;for(o=[],a={paramSet:new pn},t=0,n=e.length;t"),n=Xt,r=Ve(),Xt&&e.firstRestricted&&re(e.firstRestricted,e.message),Xt&&e.stricted&&ie(e.stricted,e.message),Xt=n,Z(t,sn.createArrowFunctionExpression(e.params,r,r.type!==an.BlockStatement))}function Qe(e){var t,n,r,i,o=nn.ecmaFeatures.destructuring;if(o||oe(k()),e.type===an.ObjectExpression)for(e.type=an.ObjectPattern,t=0,n=e.properties.length;t")||oe(k()),We(i,o);a=!0}return e=en,r=t=Ue(),ue("=>")&&(tn.parenthesisCount===s||tn.parenthesisCount===s+1)&&(r.type===an.Identifier?i=Ge([r]):r.type===an.AssignmentExpression||r.type===an.ArrayExpression||r.type===an.ObjectExpression?(a||oe(k()),i=Ge([r])):r.type===an.SequenceExpression&&(i=Ge(r.expressions)),i)?We(i,o):(pe()&&(Xt&&t.type===an.Identifier&&rn.isRestrictedWord(t.name)&&ie(e,cn.StrictLHSAssignment),!ue("=")||r.type!==an.ObjectExpression&&r.type!==an.ArrayExpression?de(r)||ie({},cn.InvalidLHSInAssignment):Qe(r),e=k(),n=ze(),r=Z(o,sn.createAssignmentExpression(e.value,t,n))),r)}function qe(){var e,t,n=ee(),r=ze(),i=[r];if(ue(",")){for(;Kt"!==F().value&&re({},cn.IllegalSpread),e||r}function $e(){for(var e,t=[];Kt0?1:0,Yt=0,Zt=$t.length,en=null,tn={allowIn:!0,labelSet:{},parenthesisCount:0,inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1,yieldAllowed:!1,curlyStack:[],curlyLastIndex:0,inJSXSpreadAttribute:!1,inJSXChild:!1,inJSXTag:!1},nn={ecmaFeatures:un},t=t||{},t.tokens=!0,nn.tokens=[],nn.tokenize=!0,nn.openParenToken=-1,nn.openCurlyToken=-1,nn.range="boolean"==typeof t.range&&t.range,nn.loc="boolean"==typeof t.loc&&t.loc,"boolean"==typeof t.comment&&t.comment&&(nn.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(nn.errors=[]),t.ecmaFeatures&&"object"==typeof t.ecmaFeatures&&(nn.ecmaFeatures=t.ecmaFeatures);try{if(I(),en.type===dn.EOF)return nn.tokens;for(k();en.type!==dn.EOF;)try{k()}catch(e){if(nn.errors){nn.errors.push(e);break}throw e}Qt(),r=nn.tokens,"undefined"!=typeof nn.comments&&(r.comments=nn.comments),"undefined"!=typeof nn.errors&&(r.errors=nn.errors)}catch(e){throw e}finally{nn={}}return r}function zt(e,t){var n,r;r=String,"string"==typeof e||e instanceof String||(e=r(e)),$t=e,Kt=0,Jt=$t.length>0?1:0,Yt=0,Zt=$t.length,en=null,tn={allowIn:!0,labelSet:new pn,parenthesisCount:0,inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1,yieldAllowed:!1,curlyStack:[],curlyLastIndex:0,inJSXSpreadAttribute:!1,inJSXChild:!1,inJSXTag:!1},nn={ecmaFeatures:Object.create(un)},tn.curlyStack=[],"undefined"!=typeof t&&(nn.range="boolean"==typeof t.range&&t.range,nn.loc="boolean"==typeof t.loc&&t.loc,nn.attachComment="boolean"==typeof t.attachComment&&t.attachComment,nn.loc&&null!==t.source&&void 0!==t.source&&(nn.source=r(t.source)),"boolean"==typeof t.tokens&&t.tokens&&(nn.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(nn.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(nn.errors=[]),nn.attachComment&&(nn.range=!0,nn.comments=[],fn.reset()),"module"===t.sourceType&&(nn.ecmaFeatures={arrowFunctions:!0,blockBindings:!0,regexUFlag:!0,regexYFlag:!0,templateStrings:!0,binaryLiterals:!0,octalLiterals:!0,unicodeCodePointEscapes:!0,superInFunctions:!0,defaultParams:!0,restParams:!0,forOf:!0,objectLiteralComputedProperties:!0,objectLiteralShorthandMethods:!0,objectLiteralShorthandProperties:!0,objectLiteralDuplicateProperties:!0,generators:!0,destructuring:!0,classes:!0,modules:!0}),t.ecmaFeatures&&"object"==typeof t.ecmaFeatures&&("module"===t.sourceType?Object.keys(t.ecmaFeatures).forEach(function(e){nn.ecmaFeatures[e]=t.ecmaFeatures[e]}):nn.ecmaFeatures=t.ecmaFeatures));try{n=Wt(),"undefined"!=typeof nn.comments&&(n.comments=nn.comments),"undefined"!=typeof nn.tokens&&(Qt(),n.tokens=nn.tokens),"undefined"!=typeof nn.errors&&(n.errors=nn.errors)}catch(e){throw e}finally{nn={}}return n}var qt,$t,Xt,Kt,Jt,Yt,Zt,en,tn,nn,rn=e("./lib/syntax"),on=e("./lib/token-info"),an=e("./lib/ast-node-types"),sn=e("./lib/ast-node-factory"),un=e("./lib/features"),cn=e("./lib/messages"),ln=e("./lib/xhtml-entities"),pn=e("./lib/string-map"),fn=e("./lib/comment-attachment"),dn=on.Token,hn=on.TokenName,mn=on.FnExprTokens,gn=rn.Regex;qt={Data:1,Get:2,Set:4},n.version=e("./package.json").version,n.tokenize=Ht,n.parse=zt,n.Syntax=function(){var e,t={};"function"==typeof Object.create&&(t=Object.create(null));for(e in an)an.hasOwnProperty(e)&&(t[e]=an[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()},{"./lib/ast-node-factory":1,"./lib/ast-node-types":2,"./lib/comment-attachment":3,"./lib/features":4,"./lib/messages":5,"./lib/string-map":6,"./lib/syntax":7,"./lib/token-info":8,"./lib/xhtml-entities":9,"./package.json":10}]},{},[]);!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("sap.watt.saptoolsets.fiori.editor.fioriJsValidator/lib/eslint/eslint",[],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.eslint=e()}}(function(){return function t(n,r,i){function o(s,u){if(!r[s]){if(!n[s]){var c="function"==typeof e&&e;if(!u&&c)return c(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var p=r[s]={exports:{}};n[s][0].call(p.exports,function(e){var t=n[s][1][e];return o(t?t:e)},p,p.exports,t,n,r,i)}return r[s].exports}for(var a="function"==typeof e&&e,s=0;s=0;o--)if(a[o]!=s[o])return!1;for(o=a.length-1;o>=0;o--)if(i=a[o], !u(e[i],t[i]))return!1;return!0}function p(e,t){return!(!e||!t)&&("[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t||t.call({},e)===!0)}function f(e,t,n,r){var i;d.isString(n)&&(r=n,n=null);try{t()}catch(e){i=e}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&a(i,n,"Missing expected exception"+r),!e&&p(i,n)&&a(i,n,"Got unwanted exception"+r),e&&i&&n&&!p(i,n)||!e&&i)throw i}var d=e("util/"),h=Array.prototype.slice,m=Object.prototype.hasOwnProperty,g=t.exports=s;g.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=o(this),this.generatedMessage=!0);var t=e.stackStartFunction||a;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=t.name,s=r.indexOf("\n"+i);if(s>=0){var u=r.indexOf("\n",s+1);r=r.substring(u+1)}this.stack=r}}},d.inherits(g.AssertionError,Error),g.fail=a,g.ok=s,g.equal=function(e,t,n){e!=t&&a(e,t,n,"==",g.equal)},g.notEqual=function(e,t,n){e==t&&a(e,t,n,"!=",g.notEqual)},g.deepEqual=function(e,t,n){u(e,t)||a(e,t,n,"deepEqual",g.deepEqual)},g.notDeepEqual=function(e,t,n){u(e,t)&&a(e,t,n,"notDeepEqual",g.notDeepEqual)},g.strictEqual=function(e,t,n){e!==t&&a(e,t,n,"===",g.strictEqual)},g.notStrictEqual=function(e,t,n){e===t&&a(e,t,n,"!==",g.notStrictEqual)},g.throws=function(e,t,n){f.apply(this,[!0].concat(h.call(arguments)))},g.doesNotThrow=function(e,t){f.apply(this,[!1].concat(h.call(arguments)))},g.ifError=function(e){if(e)throw e};var v=Object.keys||function(e){var t=[];for(var n in e)m.call(e,n)&&t.push(n);return t}},{"util/":10}],4:[function(e,t,n){(function(n){function r(){}function i(){f.log.apply(f,arguments)}function o(){f.log.apply(f,arguments)}function a(){f.warn.apply(f,arguments)}function s(e){v[e]=m()}function u(e){var t=v[e];if(!t)throw new Error("No such label: "+e);var n=m()-t;f.log(e+": "+n+"ms")}function c(){var e=new Error;e.name="Trace",e.message=d.format.apply(null,arguments),f.error(e.stack)}function l(e){f.log(d.inspect(e)+"\n")}function p(e){if(!e){var t=g.call(arguments,1);h.ok(!1,d.format.apply(null,t))}}var f,d=e("util"),h=e("assert"),m=e("date-now"),g=Array.prototype.slice,v={};f="undefined"!=typeof n&&n.console?n.console:"undefined"!=typeof window&&window.console?window.console:{};for(var y=[[r,"log"],[i,"info"],[o,"warn"],[a,"error"],[s,"time"],[u,"timeEnd"],[c,"trace"],[l,"dir"],[p,"assert"]],x=0;x0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,o,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],i(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.listenerCount=function(e,t){var n;return n=e._events&&e._events[t]?i(e._events[t])?1:e._events[t].length:0}},{}],7:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],8:[function(e,t,n){function r(){if(!s){s=!0;for(var e,t=a.length;t;){e=a,a=[];for(var n=-1;++n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(t)?r.showHidden=t:t&&n._extend(r,t),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,t,r){if(e.customInspect&&t&&T(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return x(i)||(i=u(e,i,r)),i}var o=c(e,t);if(o)return o;var a=Object.keys(t),m=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),C(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(t);if(0===a.length){if(T(t)){var g=t.name?": "+t.name:"";return e.stylize("[Function"+g+"]","special")}if(w(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(S(t))return e.stylize(Date.prototype.toString.call(t),"date");if(C(t))return l(t)}var v="",y=!1,b=["{","}"];if(h(t)&&(y=!0,b=["[","]"]),T(t)){var _=t.name?": "+t.name:"";v=" [Function"+_+"]"}if(w(t)&&(v=" "+RegExp.prototype.toString.call(t)),S(t)&&(v=" "+Date.prototype.toUTCString.call(t)),C(t)&&(v=" "+l(t)),0===a.length&&(!y||0==t.length))return b[0]+v+b[1];if(r<0)return w(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var E;return E=y?p(e,t,r,m,a):a.map(function(n){return f(e,t,r,m,n,y)}),e.seen.pop(),d(E,v,b)}function c(e,t){if(_(t))return e.stylize("undefined","undefined");if(x(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i){for(var o=[],a=0,s=t.length;a-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),_(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function h(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function v(e){return null==e}function y(e){return"number"==typeof e}function x(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function _(e){return void 0===e}function w(e){return E(e)&&"[object RegExp]"===A(e)}function E(e){return"object"==typeof e&&null!==e}function S(e){return E(e)&&"[object Date]"===A(e)}function C(e){return E(e)&&("[object Error]"===A(e)||e instanceof Error)}function T(e){return"function"==typeof e}function D(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function A(e){return Object.prototype.toString.call(e)}function P(e){return e<10?"0"+e.toString(10):e.toString(10)}function k(){var e=new Date,t=[P(e.getHours()),P(e.getMinutes()),P(e.getSeconds())].join(":");return[e.getDate(),j[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var F=/%[sdj%]/g;n.format=function(e){if(!x(e)){for(var t=[],n=0;n=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}function o(e){return"param"===e||"argument"===e||"arg"===e}function a(e){return"property"===e||"prop"===e}function s(e){return o(e)||a(e)||"alias"===e||"this"===e||"mixes"===e||"requires"===e}function u(e){return s(e)||"const"===e||"constant"===e}function c(e){return a(e)||o(e)}function l(e){return o(e)||"define"===e||"enum"===e||"implements"===e||"return"===e||"this"===e||"type"===e||"typedef"===e||"returns"===e||a(e)}function p(e){return l(e)||"throws"===e||"const"===e||"constant"===e||"namespace"===e||"member"===e||"var"===e||"module"===e||"constructor"===e||"class"===e||"extends"===e||"augments"===e||"public"===e||"private"===e||"protected"===e}function f(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")}function d(e){var t,n,r,i,o,a=0,s=1,u=2;for(e=e.replace(/^\/\*\*?/,"").replace(/\*\/$/,""),t=0,n=e.length,r=a,i="";t=e)return null;if(t&&91===F.charCodeAt(P)&&(i=!0,o=n()),!y.code.isIdentifierStart(F.charCodeAt(P)))return null;if(o+=b(e),r)for(58!==F.charCodeAt(P)||"module"!==o&&"external"!==o&&"event"!==o||(o+=n(),o+=b(e));46===F.charCodeAt(P)||35===F.charCodeAt(P)||126===F.charCodeAt(P);)o+=n(),o+=b(e);if(i){if(61===F.charCodeAt(P))for(o+=n();P=e||93!==F.charCodeAt(P))return null;o+=n()}return o}function E(){for(;P=I)&&(m.assert(64===F.charCodeAt(P)),!0)}function S(e,t){this._options=e,this._title=t,this._tag={title:t,description:null},this._options.lineNumbers&&(this._tag.lineNumber=k),this._last=0,this._extra={}}function C(e){var t,n;return E()?(t=r(),n=new S(e,t),n.parse()):null}function T(){var e,t,r="";for(t=!0;P<(){}[],:*|?!=".indexOf(String.fromCharCode(e))===-1&&!B.code.isWhiteSpace(e)&&!B.code.isLineTerminator(e)}function r(e,t,n,r){this._previous=e,this._index=t,this._token=n,this._value=r}function i(){var e=O.charAt(j);return j+=1,e}function o(e){var t,n,r,o=0;for(n="u"===e?4:2,t=0;t=0&&j=N)return F.ILLEGAL;if(n=O.charCodeAt(j+1),60===n)break}M+=i()}return F.NAME}function c(){var e;for(R=j;j=N)return L=F.EOF;switch(e=O.charCodeAt(j)){case 39:case 34:return L=a();case 58:return i(),L=F.COLON;case 44:return i(),L=F.COMMA;case 40:return i(),L=F.LPAREN;case 41:return i(),L=F.RPAREN;case 91:return i(),L=F.LBRACK;case 93:return i(),L=F.RBRACK;case 123:return i(),L=F.LBRACE;case 125:return i(),L=F.RBRACE;case 46:if(j+1=48&&e<=57}function n(t){return e(t)||97<=t&&t<=102||65<=t&&t<=70}function r(e){return e>=48&&e<=55}function i(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&c.indexOf(e)>=0}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e){return e>=97&&e<=122||e>=65&&e<=90||36===e||95===e||92===e||e>=128&&u.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function s(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||36===e||95===e||92===e||e>=128&&u.NonAsciiIdentifierPart.test(String.fromCharCode(e))}var u,c;u={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},c=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],t.exports={isDecimalDigit:e,isHexDigit:n,isOctalDigit:r,isWhiteSpace:i,isLineTerminator:o,isIdentifierStart:a,isIdentifierPart:s}}()},{}],16:[function(e,t,n){!function(){"use strict";function n(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function r(e,t){return!(!t&&"yield"===e)&&i(e,t)}function i(e,t){if(t&&n(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function o(e,t){return"null"===e||"true"===e||"false"===e||r(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||i(e,t)}function s(e){return"eval"===e||"arguments"===e}function u(e){var t,n,r;if(0===e.length)return!1;if(r=e.charCodeAt(0),!p.isIdentifierStart(r)||92===r)return!1;for(t=1,n=e.length;t=0.10.0"},directories:{lib:"./lib"},maintainers:[{name:"constellation",email:"utatane.tea@gmail.com"}],repository:{type:"git",url:"git+ssh://git@github.com/Constellation/doctrine.git"},devDependencies:{coveralls:"^2.11.2",gulp:"^3.8.10","gulp-bump":"^0.1.13","gulp-eslint":"^0.5.0","gulp-filter":"^2.0.2","gulp-git":"^1.0.0","gulp-istanbul":"^0.6.0","gulp-jshint":"^1.9.0","gulp-mocha":"^2.0.0","gulp-tag-version":"^1.2.1","jshint-stylish":"^1.0.0",should:"^5.0.1"},licenses:[{type:"BSD",url:"http://github.com/Constellation/doctrine/raw/master/LICENSE.BSD"}],scripts:{test:"gulp","unit-test":"gulp test",lint:"gulp lint",coveralls:"cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"},dependencies:{esutils:"^1.1.6",isarray:"0.0.1"},gitHead:"0835299b485ecdfa908d20628d6c8900144590ff",bugs:{url:"https://github.com/Constellation/doctrine/issues"},_id:"doctrine@0.6.4",_shasum:"81428491a942ef18b0492056eda3800eee57d61d",_from:"doctrine@>=0.6.2 <0.7.0",_npmVersion:"1.4.28",_npmUser:{name:"constellation",email:"utatane.tea@gmail.com"},dist:{shasum:"81428491a942ef18b0492056eda3800eee57d61d",tarball:"http://registry.npmjs.org/doctrine/-/doctrine-0.6.4.tgz"},_resolved:"https://registry.npmjs.org/doctrine/-/doctrine-0.6.4.tgz",readme:"ERROR: No README data found!"}},{}],20:[function(e,t,n){"use strict";var r=/[|\\{}()[\]^$+*?.]/g;t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(r,"\\$&")}},{}],21:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e.default:e},i=function e(t,n,r){var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i&&i.writable)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(n,"__esModule",{value:!0});var s=r(e("./variable")),u=function e(t,n,r,i,o,s){a(this,e),this.type=t,this.name=n,this.node=r,this.parent=i,this.index=o,this.kind=s};n.default=u;var c=function(e){function t(e,n,r,o){a(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,s.Parameter,e,n,null,r,null),this.rest=o}return o(t,e),t}(u);n.ParameterDefinition=c,n.Definition=u},{"./variable":27}],22:[function(e,t,n){"use strict";function r(){return{optimistic:!1,directive:!1,nodejsScope:!1,sourceType:"script",ecmaVersion:5}}function i(e,t){function n(e){return"object"==typeof e&&e instanceof Object&&!(e instanceof RegExp)}var r,o;for(r in t)t.hasOwnProperty(r)&&(o=t[r],n(o)?n(e[r])?i(e[r],o):e[r]=i({},o):e[r]=o);return e}function o(e,t){var n,o,a;return a=i(r(),t),n=new u(a),o=new c(n),o.visit(e),s(null===n.__currentScope,"currentScope should be null."),n}var a=function(e){return e&&e.__esModule?e.default:e};n.analyze=o,Object.defineProperty(n,"__esModule",{value:!0});var s=a(e("assert")),u=a(e("./scope-manager")),c=a(e("./referencer")),l=a(e("./reference")),p=a(e("./variable")),f=a(e("./scope")),d=e("../package.json").version;n.version=d,n.Reference=l,n.Variable=p,n.Scope=f,n.ScopeManager=u},{"../package.json":130,"./reference":23,"./referencer":24,"./scope":26,"./scope-manager":25,"./variable":27,assert:3}],23:[function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=1,a=2,s=o|a,u=function(){function e(t,n,r,o,a,s,u){i(this,e),this.identifier=t,this.from=n,this.tainted=!1,this.resolved=null,this.flag=r,this.isWrite()&&(this.writeExpr=o,this.partial=s,this.init=u),this.__maybeImplicitGlobal=a}return r(e,{isStatic:{value:function(){return!this.tainted&&this.resolved&&this.resolved.scope.isStatic()}},isWrite:{value:function(){return!!(this.flag&e.WRITE)}},isRead:{value:function(){return!!(this.flag&e.READ)}},isReadOnly:{value:function(){return this.flag===e.READ}},isWriteOnly:{value:function(){return this.flag===e.WRITE}},isReadWrite:{value:function(){return this.flag===e.RW}}}),e}();t.exports=u,u.READ=o,u.WRITE=a,u.RW=s},{}],24:[function(e,t,n){"use strict";function r(e){return e[e.length-1]||null}function i(e,t,n){var r=new x(e,n);r.visit(e),null!=t&&r.rightHandNodes.forEach(t.visit,t)}function o(e){var t=e.type;return t===p.Identifier||t===p.ObjectPattern||t===p.ArrayPattern||t===p.SpreadElement||t===p.RestElement||t===p.AssignmentPattern}var a=function(e){return e&&e.__esModule?e.default:e},s=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i&&i.writable)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},p=e("estraverse").Syntax,f=a(e("esrecurse")),d=a(e("./reference")),h=a(e("./variable")),m=e("./definition"),g=m.ParameterDefinition,v=m.Definition,y=a(e("assert")),x=function(e){function t(e,n){l(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.rootPattern=e,this.callback=n,this.assignments=[],this.rightHandNodes=[],this.restElements=[]}return c(t,e),s(t,{Identifier:{value:function(e){var t=r(this.restElements);this.callback(e,{topLevel:e===this.rootPattern,rest:null!=t&&t.argument===e,assignments:this.assignments})}},ObjectPattern:{value:function(e){var t,n,r;for(t=0,n=e.properties.length;t=0;--o)if(i=r[o],n(i))return i}else for(o=0,a=r.length;o=6}}}),e}();t.exports=b},{"./scope":26,assert:3,"es6-weak-map":83}],26:[function(e,t,n){"use strict";function r(e,t,n,r){var i,o,a,s,u;if(e.upper&&e.upper.isStrict)return!0;if(t.type===p.ArrowFunctionExpression)return!0;if(n)return!0;if("class"===e.type||"module"===e.type)return!0;if("block"===e.type||"switch"===e.type)return!1;if("function"===e.type)i="Program"===t.type?t:t.body;else{if("global"!==e.type)return!1;i=t}if(r){for(o=0,a=i.body.length;o0&&r.every(o)}},__staticCloseRef:{value:function(e){this.__resolve(e)||this.__delegateToUpperScope(e)}},__dynamicCloseRef:{value:function(e){var t=this;do t.through.push(e),t=t.upper;while(t)}},__globalCloseRef:{value:function(e){this.__shouldStaticallyCloseForGlobal(e)?this.__staticCloseRef(e):this.__dynamicCloseRef(e)}},__close:{value:function(e){var t;t=this.__shouldStaticallyClose(e)?this.__staticCloseRef:"global"!==this.type?this.__dynamicCloseRef:this.__globalCloseRef;for(var n=0,r=this.__left.length;n=0?u(c):r(this.length)-u(s(c)),t=c;t0?1:-1}},{}],40:[function(e,t,n){"use strict";var r=e("../math/sign"),i=Math.abs,o=Math.floor;t.exports=function(e){return isNaN(e)?0:(e=Number(e),0!==e&&isFinite(e)?r(e)*o(i(e)):e)}},{"../math/sign":37}],41:[function(e,t,n){"use strict";var r=e("./to-integer"),i=Math.max;t.exports=function(e){return i(0,r(e))}},{"./to-integer":40}],42:[function(e,t,n){"use strict";var r=e("./is-callable"),i=e("./valid-callable"),o=e("./valid-value"),a=Function.prototype.call,s=Object.keys,u=Object.prototype.propertyIsEnumerable;t.exports=function(e,t){return function(n,c){var l,p=arguments[2],f=arguments[3];return n=Object(o(n)),i(c),l=s(n),f&&l.sort(r(f)?f.bind(n):void 0),l[e](function(e,r){return u.call(n,e)?a.call(c,p,n[e],e,n,r):t})}}},{"./is-callable":49,"./valid-callable":60,"./valid-value":61}],43:[function(e,t,n){"use strict";t.exports=e("./is-implemented")()?Object.assign:e("./shim")},{"./is-implemented":44,"./shim":45}],44:[function(e,t,n){"use strict";t.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(e={foo:"raz"},t(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},{}],45:[function(e,t,n){"use strict";var r=e("../keys"),i=e("../valid-value"),o=Math.max;t.exports=function(e,t){var n,a,s,u=o(arguments.length,2);for(e=Object(i(e)),s=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},a=1;a-1}},{}],65:[function(e,t,n){"use strict";var r=Object.prototype.toString,i=r.call("");t.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||r.call(e)===i)||!1}},{}],66:[function(e,t,n){"use strict";var r,i=e("es5-ext/object/set-prototype-of"),o=e("es5-ext/string/#/contains"),a=e("d"),s=e("./"),u=Object.defineProperty;r=t.exports=function(e,t){return this instanceof r?(s.call(this,e),t=t?o.call(t,"key+value")?"key+value":o.call(t,"key")?"key":"value":"value",void u(this,"__kind__",a("",t))):new r(e,t)},i&&i(r,s),r.prototype=Object.create(s.prototype,{constructor:a(r),_resolve:a(function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e}),toString:a(function(){return"[object Array Iterator]"})})},{"./":69,d:34,"es5-ext/object/set-prototype-of":57,"es5-ext/string/#/contains":62}],67:[function(e,t,n){"use strict";var r=e("es5-ext/object/valid-callable"),i=e("es5-ext/string/is-string"),o=e("./get"),a=Array.isArray,s=Function.prototype.call;t.exports=function(e,t){var n,u,c,l,p,f,d,h,m=arguments[2];if(a(e)?n="array":i(e)?n="string":e=o(e),r(t),c=function(){l=!0},"array"===n)return void e.some(function(e){if(s.call(t,m,e,c),l)return!0});if("string"!==n)for(u=e.next();!u.done;){if(s.call(t,m,u.value,c),l)return;u=e.next()}else for(f=e.length,p=0;p=55296&&h<=56319&&(d+=e[++p])),s.call(t,m,d,c),!l);++p);}},{"./get":68,"es5-ext/object/valid-callable":60,"es5-ext/string/is-string":65}],68:[function(e,t,n){"use strict";var r=e("es5-ext/string/is-string"),i=e("./array"),o=e("./string"),a=e("./valid-iterable"),s=e("es6-symbol").iterator;t.exports=function(e){return"function"==typeof a(e)[s]?e[s]():r(e)?new o(e):new i(e)}},{"./array":66,"./string":76,"./valid-iterable":77,"es5-ext/string/is-string":65,"es6-symbol":71}],69:[function(e,t,n){"use strict";var r,i=e("es5-ext/array/#/clear"),o=e("es5-ext/object/assign"),a=e("es5-ext/object/valid-callable"),s=e("es5-ext/object/valid-value"),u=e("d"),c=e("d/auto-bind"),l=e("es6-symbol"),p=Object.defineProperty,f=Object.defineProperties;t.exports=r=function(e,t){return this instanceof r?(f(this,{__list__:u("w",s(e)),__context__:u("w",t),__nextIndex__:u("w",0)}),void(t&&(a(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear)))):new r(e,t)},f(r.prototype,o({constructor:u(r),_next:u(function(){var e;if(this.__list__)return this.__redo__&&(e=this.__redo__.shift(),void 0!==e)?e:this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void p(this,"__redo__",u("c",[e]));this.__redo__.forEach(function(t,n){t>=e&&(this.__redo__[n]=++t)},this),this.__redo__.push(e)}}),_onDelete:u(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(t,n){t>e&&(this.__redo__[n]=--t)},this)))}),_onClear:u(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),p(r.prototype,l.iterator,u(function(){return this})),p(r.prototype,l.toStringTag,u("","Iterator"))},{d:34,"d/auto-bind":33,"es5-ext/array/#/clear":35,"es5-ext/object/assign":43,"es5-ext/object/valid-callable":60,"es5-ext/object/valid-value":61,"es6-symbol":71}],70:[function(e,t,n){"use strict";var r=e("es5-ext/string/is-string"),i=e("es6-symbol").iterator,o=Array.isArray;t.exports=function(e){return null!=e&&(!!o(e)||(!!r(e)||"function"==typeof e[i]))}},{"es5-ext/string/is-string":65,"es6-symbol":71}],71:[function(e,t,n){"use strict";t.exports=e("./is-implemented")()?Symbol:e("./polyfill")},{"./is-implemented":72,"./polyfill":74}],72:[function(e,t,n){"use strict";t.exports=function(){var e;if("function"!=typeof Symbol)return!1;e=Symbol("test symbol");try{String(e)}catch(e){return!1}return"symbol"==typeof Symbol.iterator||"object"==typeof Symbol.isConcatSpreadable&&("object"==typeof Symbol.iterator&&("object"==typeof Symbol.toPrimitive&&("object"==typeof Symbol.toStringTag&&"object"==typeof Symbol.unscopables)))}},{}],73:[function(e,t,n){"use strict";t.exports=function(e){return e&&("symbol"==typeof e||"Symbol"===e["@@toStringTag"])||!1}},{}],74:[function(e,t,n){"use strict";var r,i,o=e("d"),a=e("./validate-symbol"),s=Object.create,u=Object.defineProperties,c=Object.defineProperty,l=Object.prototype,p=s(null),f=function(){var e=s(null);return function(t){for(var n,r=0;e[t+(r||"")];)++r;return t+=r||"",e[t]=!0,n="@@"+t,c(l,n,o.gs(null,function(e){c(this,n,o(e))})),n}}();i=function e(t){if(this instanceof i)throw new TypeError("TypeError: Symbol is not a constructor");return e(t)},t.exports=r=function e(t){var n;if(this instanceof e)throw new TypeError("TypeError: Symbol is not a constructor");return n=s(i.prototype),t=void 0===t?"":String(t),u(n,{__description__:o("",t),__name__:o("",f(t))})},u(r,{for:o(function(e){return p[e]?p[e]:p[e]=r(String(e))}),keyFor:o(function(e){var t;a(e);for(t in p)if(p[t]===e)return t}),hasInstance:o("",r("hasInstance")),isConcatSpreadable:o("",r("isConcatSpreadable")),iterator:o("",r("iterator")),match:o("",r("match")),replace:o("",r("replace")),search:o("",r("search")),species:o("",r("species")),split:o("",r("split")),toPrimitive:o("",r("toPrimitive")),toStringTag:o("",r("toStringTag")),unscopables:o("",r("unscopables"))}),u(i.prototype,{constructor:o(r),toString:o("",function(){return this.__name__})}),u(r.prototype,{toString:o(function(){return"Symbol ("+a(this).__description__+")"}),valueOf:o(function(){return a(this)})}),c(r.prototype,r.toPrimitive,o("",function(){return a(this)})),c(r.prototype,r.toStringTag,o("c","Symbol")),c(i.prototype,r.toPrimitive,o("c",r.prototype[r.toPrimitive])),c(i.prototype,r.toStringTag,o("c",r.prototype[r.toStringTag]))},{"./validate-symbol":75,d:34}],75:[function(e,t,n){"use strict";var r=e("./is-symbol");t.exports=function(e){if(!r(e))throw new TypeError(e+" is not a symbol");return e}},{"./is-symbol":73}],76:[function(e,t,n){"use strict";var r,i=e("es5-ext/object/set-prototype-of"),o=e("d"),a=e("./"),s=Object.defineProperty;r=t.exports=function(e){return this instanceof r?(e=String(e),a.call(this,e),void s(this,"__length__",o("",e.length))):new r(e)},i&&i(r,a),r.prototype=Object.create(a.prototype,{constructor:o(r),_next:o(function(){if(this.__list__)return this.__nextIndex__=55296&&t<=56319?n+this.__list__[this.__nextIndex__++]:n)}),toString:o(function(){return"[object String Iterator]"})})},{"./":69,d:34,"es5-ext/object/set-prototype-of":57}],77:[function(e,t,n){"use strict";var r=e("./is-iterable");t.exports=function(e){if(!r(e))throw new TypeError(e+" is not iterable");return e}},{"./is-iterable":70}],78:[function(e,t,n){arguments[4][71][0].apply(n,arguments)},{"./is-implemented":79,"./polyfill":80,dup:71}],79:[function(e,t,n){"use strict";t.exports=function(){var e;if("function"!=typeof Symbol)return!1;e=Symbol("test symbol");try{String(e)}catch(e){return!1}return"symbol"==typeof Symbol.iterator||"object"==typeof Symbol.isConcatSpreadable&&("object"==typeof Symbol.isRegExp&&("object"==typeof Symbol.iterator&&("object"==typeof Symbol.toPrimitive&&("object"==typeof Symbol.toStringTag&&"object"==typeof Symbol.unscopables))))}},{}],80:[function(e,t,n){"use strict";var r,i,o=e("d"),a=Object.create,s=Object.defineProperties;r=function(){var e=a(null);return function(t){for(var n=0;e[t+(n||"")];)++n;return t+=n||"",e[t]=!0,"@@"+t}}(),t.exports=i=function(e){var t;if(this instanceof i)throw new TypeError("TypeError: Symbol is not a constructor");return t=a(i.prototype),e=void 0===e?"":String(e),s(t,{__description__:o("",e),__name__:o("",r(e))})},Object.defineProperties(i,{create:o("",i("create")),hasInstance:o("",i("hasInstance")),isConcatSpreadable:o("",i("isConcatSpreadable")),isRegExp:o("",i("isRegExp")),iterator:o("",i("iterator")),toPrimitive:o("",i("toPrimitive")),toStringTag:o("",i("toStringTag")),unscopables:o("",i("unscopables"))}),s(i.prototype,{properToString:o(function(){return"Symbol ("+this.__description__+")"}),toString:o("",function(){return this.__name__})}),Object.defineProperty(i.prototype,i.toPrimitive,o("",function(e){throw new TypeError("Conversion of symbol objects is not allowed")})),Object.defineProperty(i.prototype,i.toStringTag,o("c","Symbol"))},{d:34}],81:[function(e,t,n){"use strict";var r,i,o,a,s,u,c,l=e("d"),p=e("es5-ext/object/valid-callable"),f=Function.prototype.apply,d=Function.prototype.call,h=Object.create,m=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var n;return p(t),v.call(this,"__ee__")?n=this.__ee__:(n=y.value=h(null),m(this,"__ee__",y),y.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},i=function(e,t){var n,i;return p(t),i=this,r.call(this,e,n=function(){o.call(i,e,n),f.call(t,this,arguments)}),n.__eeOnceListener__=t,this},o=function(e,t){var n,r,i,o;if(p(t),!v.call(this,"__ee__"))return this;if(n=this.__ee__,!n[e])return this;if(r=n[e],"object"==typeof r)for(o=0;i=r[o];++o)i!==t&&i.__eeOnceListener__!==t||(2===r.length?n[e]=r[o?0:1]:r.splice(o,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},a=function(e){var t,n,r,i,o;if(v.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"==typeof i){for(n=arguments.length,o=new Array(n-1),t=1;t=0.10.0"},maintainers:[{name:"constellation",email:"utatane.tea@gmail.com"},{name:"michaelficarra",email:"npm@michael.ficarra.me"}],repository:{type:"git",url:"git+ssh://git@github.com/estools/esrecurse.git"},dependencies:{estraverse:"~3.1.0"},devDependencies:{chai:"^2.1.1","coffee-script":"^1.9.1",esprima:"^2.1.0",gulp:"~3.8.10","gulp-bump":"^0.2.2","gulp-eslint":"^0.6.0","gulp-filter":"^2.0.2","gulp-git":"^1.1.0","gulp-mocha":"~2.0.0","gulp-tag-version":"^1.2.1",jsdoc:"~3.3.0-alpha10",minimist:"^1.1.0"},licenses:[{type:"BSD",url:"http://github.com/estools/esrecurse/raw/master/LICENSE.BSD"}],scripts:{test:"gulp travis","unit-test":"gulp test",lint:"gulp lint"},gitHead:"600a8aac5e7b313875a873134fd110b47a76fc77",bugs:{url:"https://github.com/estools/esrecurse/issues"},_id:"esrecurse@3.1.1",_shasum:"8feb963699d4d1b2d65a576cd4b1296672a0f0e9",_from:"esrecurse@>=3.1.1 <4.0.0",_npmVersion:"2.0.0-alpha-5",_npmUser:{name:"constellation",email:"utatane.tea@gmail.com"},dist:{shasum:"8feb963699d4d1b2d65a576cd4b1296672a0f0e9",tarball:"http://registry.npmjs.org/esrecurse/-/esrecurse-3.1.1.tgz"},directories:{},_resolved:"https://registry.npmjs.org/esrecurse/-/esrecurse-3.1.1.tgz",readme:"ERROR: No README data found!"}},{}],128:[function(e,t,n){!function t(n){"use strict";function r(){}function i(e){var t,n,r={};for(t in e)e.hasOwnProperty(t)&&(n=e[t],"object"==typeof n&&null!==n?r[t]=i(n):r[t]=n);return r}function o(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function a(e,t){var n,r,i,o;for(r=e.length,i=0;r;)n=r>>>1,o=i+n,t(e[o])?r=n:(i=o+1,r-=n+1);return i}function s(e,t){var n,r,i,o;for(r=e.length,i=0;r;)n=r>>>1,o=i+n,t(e[o])?(i=o+1,r-=n+1):r=n;return i}function u(e,t){var n,r,i,o=E(t);for(r=0,i=o.length;re.range[0]}),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),n-=1,n>=0&&(e.extendedRange[0]=t[n].range[1]),e}function v(e,t,n){var r,o,a,s,u=[];if(!e.range)throw new Error("attachComments needs range information");if(!n.length){if(t.length){for(a=0,o=t.length;ae.range[0]));)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),u.splice(s,1)):s+=1;return s===u.length?b.Break:u[s].extendedRange[0]>e.range[1]?b.Skip:void 0}}),s=0,h(e,{leave:function(e){for(var t;se.range[1]?b.Skip:void 0}}),e}var y,x,b,_,w,E,S,C,T;return x=Array.isArray,x||(x=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),r(o),r(s),w=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}(),E=Object.keys||function(e){var t,n=[];for(t in e)n.push(t);return n},y={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",SuperExpression:"SuperExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},_={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SuperExpression:["super"],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},S={},C={},T={},b={Break:S,Skip:C,Remove:T},c.prototype.replace=function(e){this.parent[this.key]=e},c.prototype.remove=function(){return x(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},p.prototype.path=function(){function e(e,t){if(x(t))for(r=0,i=t.length;r=0;)if(u=h[c],m=o[u])if(x(m)){for(p=m.length;(p-=1)>=0;)if(m[p]){if(d(a,h[c]))i=new l(m[p],[u,p],"Property",null);else{if(!f(m[p]))continue;i=new l(m[p],[u,p],null,null)}n.push(i)}}else f(m)&&n.push(new l(m,u,null,null))}}else if(i=r.pop(),s=this.__execute(t.leave,i),this.__state===S||s===S)return},p.prototype.replace=function(e,t){function n(e){var t,n,i,o;if(e.ref.remove())for(n=e.ref.key,o=e.ref.parent,t=r.length;t--;)if(i=r[t],i.ref&&i.ref.parent===o){if(i.ref.key=0;)if(b=m[p],g=o[b])if(x(g)){for(h=g.length;(h-=1)>=0;)if(g[h]){if(d(a,m[p]))u=new l(g[h],[b,h],"Property",new c(g,h));else{if(!f(g[h]))continue;u=new l(g[h],[b,h],null,new c(g,h))}r.push(u)}}else f(g)&&r.push(new l(g,b,null,new c(o,b)))}}else if(u=i.pop(),s=this.__execute(t.leave,u),void 0!==s&&s!==S&&s!==C&&s!==T&&u.ref.replace(s),this.__state!==T&&s!==T||n(u),this.__state===S||s===S)return y.root;return y.root},n.version=e("./package.json").version,n.Syntax=y,n.traverse=h,n.replace=m,n.attachComments=v,n.VisitorKeys=_,n.VisitorOption=b,n.Controller=p,n.cloneEnvironment=function(){return t({})},n}(n)},{"./package.json":129}],129:[function(e,t,n){t.exports={name:"estraverse",description:"ECMAScript JS AST traversal functions",homepage:"https://github.com/estools/estraverse",main:"estraverse.js",version:"3.1.0",engines:{node:">=0.10.0"},maintainers:[{name:"constellation",email:"utatane.tea@gmail.com"},{name:"michaelficarra",email:"npm@michael.ficarra.me"}],repository:{type:"git",url:"git+ssh://git@github.com/estools/estraverse.git"},devDependencies:{chai:"^2.1.1","coffee-script":"^1.8.0",espree:"^1.11.0",gulp:"^3.8.10","gulp-bump":"^0.2.2","gulp-filter":"^2.0.0","gulp-git":"^1.0.1","gulp-tag-version":"^1.2.1",jshint:"^2.5.6",mocha:"^2.1.0"},licenses:[{type:"BSD",url:"http://github.com/estools/estraverse/raw/master/LICENSE.BSD"}],scripts:{test:"npm run-script lint && npm run-script unit-test",lint:"jshint estraverse.js","unit-test":"mocha --compilers coffee:coffee-script/register"},gitHead:"166ebbe0a8d45ceb2391b6f5ef5d1bab6bfb267a",bugs:{url:"https://github.com/estools/estraverse/issues"},_id:"estraverse@3.1.0",_shasum:"15e28a446b8b82bc700ccc8b96c78af4da0d6cba",_from:"estraverse@>=3.1.0 <4.0.0",_npmVersion:"2.0.0-alpha-5",_npmUser:{name:"constellation",email:"utatane.tea@gmail.com"},dist:{shasum:"15e28a446b8b82bc700ccc8b96c78af4da0d6cba",tarball:"http://registry.npmjs.org/estraverse/-/estraverse-3.1.0.tgz"},directories:{},_resolved:"https://registry.npmjs.org/estraverse/-/estraverse-3.1.0.tgz",readme:"ERROR: No README data found!"}},{}],130:[function(e,t,n){t.exports={name:"escope",description:"ECMAScript scope analyzer",homepage:"http://github.com/estools/escope",main:"lib/index.js",version:"3.1.0",engines:{node:">=0.4.0"},maintainers:[{name:"constellation",email:"utatane.tea@gmail.com"},{name:"michaelficarra",email:"npm@michael.ficarra.me"}],repository:{type:"git",url:"git+https://github.com/estools/escope.git"},dependencies:{"es6-map":"^0.1.1","es6-weak-map":"^0.1.2",esrecurse:"^3.1.1",estraverse:"^3.1.0"},devDependencies:{acorn:"^0.12.0",babel:"^4.7.12",browserify:"^9.0.3",chai:"^2.1.1","coffee-script":"^1.9.1",espree:"^2.0.2",esprima:"^2.1.0",gulp:"~3.8.10","gulp-babel":"^4.0.0","gulp-bump":"^0.3.0","gulp-coffee":"^2.2.0","gulp-eslint":"^0.6.0","gulp-espower":"^0.10.0","gulp-filter":"^2.0.0","gulp-git":"^1.0.1","gulp-mocha":"~2.0.0","gulp-plumber":"^1.0.0","gulp-sourcemaps":"^1.3.0","gulp-tag-version":"^1.2.1",jsdoc:"=3.3.0-alpha13",lazypipe:"^0.2.2",minimist:"^1.1.0","vinyl-source-stream":"^1.0.0"},license:"BSD-2-Clause",scripts:{test:"gulp travis","unit-test":"gulp test",lint:"gulp lint",jsdoc:"jsdoc src/*.js README.md"},gitHead:"f237eefd4bfadfcf397e451219c3079e9bc3bb81",bugs:{url:"https://github.com/estools/escope/issues"},_id:"escope@3.1.0",_shasum:"92ca48f6286b380e4388e09188a904b0fa1d9b7e",_from:"escope@>=3.1.0 <4.0.0",_npmVersion:"2.10.1",_nodeVersion:"2.1.0",_npmUser:{name:"constellation",email:"utatane.tea@gmail.com"},dist:{shasum:"92ca48f6286b380e4388e09188a904b0fa1d9b7e",tarball:"http://registry.npmjs.org/escope/-/escope-3.1.0.tgz"},directories:{},_resolved:"https://registry.npmjs.org/escope/-/escope-3.1.0.tgz",readme:"ERROR: No README data found!"}},{}],131:[function(e,t,n){var r=t.exports=e("estraverse"),i=e("./keys");for(var o in i){r.Syntax[o]=o;var a=i[o];a&&(r.VisitorKeys[o]=a)}},{"./keys":132,estraverse:133}],132:[function(e,t,n){var r={Identifier:[],NamespacedName:["namespace","name"],MemberExpression:["object","property"],EmptyExpression:[],ExpressionContainer:["expression"],Element:["openingElement","closingElement","children"],ClosingElement:["name"],OpeningElement:["name","attributes"],Attribute:["name","value"],Text:null,SpreadAttribute:["argument"]},i={Type:[],AnyTypeAnnotation:[],VoidTypeAnnotation:[],NumberTypeAnnotation:[],StringTypeAnnotation:[],StringLiteralTypeAnnotation:["value","raw"],BooleanTypeAnnotation:[],TypeAnnotation:["typeAnnotation"],NullableTypeAnnotation:["typeAnnotation"],FunctionTypeAnnotation:["params","returnType","rest","typeParameters"],FunctionTypeParam:["name","typeAnnotation","optional"],ObjectTypeAnnotation:["properties"],ObjectTypeProperty:["key","value","optional"],ObjectTypeIndexer:["id","key","value"],ObjectTypeCallProperty:["value"],QualifiedTypeIdentifier:["qualification","id"],GenericTypeAnnotation:["id","typeParameters"],MemberTypeAnnotation:["object","property"],UnionTypeAnnotation:["types"],IntersectionTypeAnnotation:["types"],TypeofTypeAnnotation:["argument"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],ClassProperty:["key","typeAnnotation"],ClassImplements:[],InterfaceDeclaration:["id","body","extends"],InterfaceExtends:["id"],TypeAlias:["id","typeParameters","right"],TupleTypeAnnotation:["types"],DeclareVariable:["id"],DeclareFunction:["id"],DeclareClass:["id"],DeclareModule:["id","body"]};for(var o in r)n["XJS"+o]=n["JSX"+o]=r[o];for(var o in i)n[o]=i[o]},{}],133:[function(e,t,n){!function t(n){"use strict";function r(){}function i(e){var t,n,r={};for(t in e)e.hasOwnProperty(t)&&(n=e[t],"object"==typeof n&&null!==n?r[t]=i(n):r[t]=n);return r}function o(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function a(e,t){var n,r,i,o;for(r=e.length,i=0;r;)n=r>>>1,o=i+n,t(e[o])?r=n:(i=o+1,r-=n+1);return i}function s(e,t){var n,r,i,o;for(r=e.length,i=0;r;)n=r>>>1,o=i+n,t(e[o])?(i=o+1,r-=n+1):r=n;return i}function u(e,t){var n,r,i,o=E(t);for(r=0,i=o.length;re.range[0]}),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),n-=1,n>=0&&(e.extendedRange[0]=t[n].range[1]),e}function v(e,t,n){var r,o,a,s,u=[];if(!e.range)throw new Error("attachComments needs range information");if(!n.length){if(t.length){for(a=0,o=t.length;ae.range[0]));)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),u.splice(s,1)):s+=1;return s===u.length?b.Break:u[s].extendedRange[0]>e.range[1]?b.Skip:void 0}}),s=0,h(e,{leave:function(e){for(var t;se.range[1]?b.Skip:void 0}}),e}var y,x,b,_,w,E,S,C,T;return x=Array.isArray,x||(x=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),r(o),r(s),w=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}(),E=Object.keys||function(e){var t,n=[];for(t in e)n.push(t);return n},y={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},_={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","defaults","rest","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","defaults","rest","body"],FunctionExpression:["id","params","defaults","rest","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},S={},C={},T={},b={Break:S,Skip:C,Remove:T},c.prototype.replace=function(e){this.parent[this.key]=e},c.prototype.remove=function(){return x(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},p.prototype.path=function(){function e(e,t){if(x(t))for(r=0,i=t.length;r=0;)if(u=h[c],m=o[u])if(x(m)){for(p=m.length;(p-=1)>=0;)if(m[p]){if(d(a,h[c]))i=new l(m[p],[u,p],"Property",null);else{if(!f(m[p]))continue;i=new l(m[p],[u,p],null,null)}n.push(i)}}else f(m)&&n.push(new l(m,u,null,null))}}else if(i=r.pop(),s=this.__execute(t.leave,i),this.__state===S||s===S)return},p.prototype.replace=function(e,t){function n(e){var t,n,i,o;if(e.ref.remove())for(n=e.ref.key,o=e.ref.parent,t=r.length;t--;)if(i=r[t],i.ref&&i.ref.parent===o){if(i.ref.key=0;)if(b=m[p],g=o[b])if(x(g)){for(h=g.length;(h-=1)>=0;)if(g[h]){if(d(a,m[p]))u=new l(g[h],[b,h],"Property",new c(g,h));else{if(!f(g[h]))continue;u=new l(g[h],[b,h],null,new c(g,h))}r.push(u)}}else f(g)&&r.push(new l(g,b,null,new c(o,b)))}}else if(u=i.pop(),s=this.__execute(t.leave,u),void 0!==s&&s!==S&&s!==C&&s!==T&&u.ref.replace(s),this.__state!==T&&s!==T||n(u),this.__state===S||s===S)return y.root;return y.root},n.version=e("./package.json").version,n.Syntax=y,n.traverse=h,n.replace=m,n.attachComments=v,n.VisitorKeys=_,n.VisitorOption=b,n.Controller=p,n.cloneEnvironment=function(){return t({})},n}(n)},{"./package.json":134}],134:[function(e,t,n){t.exports={name:"estraverse",description:"ECMAScript JS AST traversal functions",homepage:"https://github.com/estools/estraverse",main:"estraverse.js",version:"2.0.0",engines:{node:">=0.10.0"},maintainers:[{name:"constellation",email:"utatane.tea@gmail.com"}],repository:{type:"git",url:"git+ssh://git@github.com/estools/estraverse.git"},devDependencies:{chai:"^2.1.1","coffee-script":"^1.8.0",espree:"^1.11.0",gulp:"^3.8.10","gulp-bump":"^0.2.2","gulp-filter":"^2.0.0","gulp-git":"^1.0.1","gulp-tag-version":"^1.2.1",jshint:"^2.5.6",mocha:"^2.1.0"},licenses:[{type:"BSD",url:"http://github.com/estools/estraverse/raw/master/LICENSE.BSD"}],scripts:{test:"npm run-script lint && npm run-script unit-test",lint:"jshint estraverse.js","unit-test":"mocha --compilers coffee:coffee-script/register"},gitHead:"d8bc726f126817cc03c7a4e751528edb19db0ffb",bugs:{url:"https://github.com/estools/estraverse/issues"},_id:"estraverse@2.0.0",_shasum:"5ae46963243600206674ccb24a09e16674fcdca1",_from:"estraverse@>=2.0.0 <3.0.0",_npmVersion:"2.0.0-alpha-5",_npmUser:{name:"constellation",email:"utatane.tea@gmail.com"},dist:{shasum:"5ae46963243600206674ccb24a09e16674fcdca1",tarball:"http://registry.npmjs.org/estraverse/-/estraverse-2.0.0.tgz"},directories:{},_resolved:"https://registry.npmjs.org/estraverse/-/estraverse-2.0.0.tgz",readme:"ERROR: No README data found!"}},{}],135:[function(e,t,n){t.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,applicationCache:!1,atob:!1,Audio:!1,AudioProcessingEvent:!1,BeforeUnloadEvent:!1,Blob:!1,blur:!1,btoa:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,crypto:!1,CSS:!1,CustomEvent:!1,Debug:!1,defaultStatus:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DOMParser:!1,DragEvent:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,FileList:!1,FileReader:!1,fetch:!1,find:!1,focus:!1,FocusEvent:!1,FormData:!1,frameElement:!1,frames:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1, Headers:!1,history:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,Intl:!1,KeyboardEvent:!1,length:!1,localStorage:!1,location:!1,matchMedia:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,navigator:!1,Node:!1,NodeFilter:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProgressEvent:!1,prompt:!1,Range:!1,Request:!1,Response:!1,removeEventListener:!1,requestAnimationFrame:!1,resizeBy:!1,resizeTo:!1,screen:!1,screenX:!1,screenY:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,self:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,showModalDialog:!1,status:!1,stop:!1,StorageEvent:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TimeEvent:!1,top:!1,TouchEvent:!1,UIEvent:!1,URL:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},worker:{importScripts:!0,postMessage:!0,self:!0},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,module:!1,process:!1,require:!1,root:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,target:!1,tempdir:!1,test:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,ObjectId:!1,PlanCache:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1}}},{}],136:[function(e,t,n){t.exports=e("./globals.json")},{"./globals.json":135}],137:[function(e,t,n){n["date-time"]=/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}[tT ]\d{2}:\d{2}:\d{2}(\.\d+)?([zZ]|[+-]\d{2}:\d{2})$/,n.date=/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}$/,n.time=/^\d{2}:\d{2}:\d{2}$/,n.email=/^\S+@\S+$/,n["ip-address"]=n.ipv4=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,n.ipv6=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,n.uri=/^[a-zA-Z][a-zA-Z0-9+-.]*:[^\s]*$/,n.color=/(#?([0-9A-Fa-f]{3,6})\b)|(aqua)|(black)|(blue)|(fuchsia)|(gray)|(green)|(lime)|(maroon)|(navy)|(olive)|(orange)|(purple)|(red)|(silver)|(teal)|(white)|(yellow)|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\))/,n.hostname=/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$/,n.alpha=/^[a-zA-Z]+$/,n.alphanumeric=/^[a-zA-Z0-9]+$/,n.style=/\s*(.+?):\s*([^;]+);?/g,n.phone=/^\+(?:[0-9] ?){6,14}[0-9]$/,n["utc-millisec"]=/^[0-9]+(\.?[0-9]+)?$/},{}],138:[function(e,t,n){var r=e("generate-object-property"),i=e("generate-function"),o=e("jsonpointer"),a=e("xtend"),s=e("./formats"),u=function(e,t,n){if(/^https?:\/\//.test(n))return null;var r=function(e){return e&&e.id===n?e:"object"==typeof e&&e?Object.keys(e).reduce(function(t,n){return t||r(e[n])},null):null},i=r(e);if(i)return i;n=n.replace(/^#/,""),n=n.replace(/\/$/,"");try{return o.get(e,decodeURI(n))}catch(e){var a,s=n.indexOf("#");if(0!==s)if(s===-1)a=t[n];else{var u=n.slice(0,s);a=t[u];var c=n.slice(s).replace(/^#/,"");try{return o.get(a,c)}catch(e){}}else a=t[n];return a||null}},c=function(e){e=JSON.stringify(e);for(var t=/\[([^\[\]"]+)\]/;t.test(e);)e=e.replace(t,'."+$1+"');return e},l={};l.any=function(){return"true"},l.null=function(e){return e+" === null"},l.boolean=function(e){return"typeof "+e+' === "boolean"'},l.array=function(e){return"Array.isArray("+e+")"},l.object=function(e){return"typeof "+e+' === "object" && '+e+" && !Array.isArray("+e+")"},l.number=function(e){return"typeof "+e+' === "number"'},l.integer=function(e){return"typeof "+e+' === "number" && (Math.floor('+e+") === "+e+" || "+e+" > 9007199254740992 || "+e+" < -9007199254740992)"},l.string=function(e){return"typeof "+e+' === "string"'};var p=function(e){for(var t=[],n=0;n %d) {",e,i.items.length),T("has additional items"),C("}");else if(i.additionalItems){var A=E();C("for (var %s = %d; %s < %s.length; %s++) {",A,i.items.length,A,e,A),S(e+"["+A+"]",i.additionalItems,o,a),C("}")}if(i.format&&h[i.format]){"string"!==y&&s[i.format]&&C("if (%s) {",l.string(e));var P=x("format");m[P]=h[i.format],"function"==typeof m[P]?C("if (!%s(%s)) {",P,e):C("if (!%s.test(%s)) {",P,e),T("must be "+i.format+" format"),C("}"),"string"!==y&&s[i.format]&&C("}")}if(Array.isArray(i.required)){var k=function(t){var n=r(e,t);C("if (%s === undefined) {",n),T("is required",n),C("missing++"),C("}")};C("if ((%s)) {","object"!==y?l.object(e):"true"),C("var missing = 0"),i.required.map(k),C("}"),v||(C("if (missing === 0) {"),w++)}if(i.uniqueItems&&("array"!==y&&C("if (%s) {",l.array(e)),C("if (!(unique(%s))) {",e),T("must be unique"),C("}"),"array"!==y&&C("}")),i.enum){var I=i.enum.some(function(e){return"object"==typeof e}),F=I?function(t){return"JSON.stringify("+e+") !== JSON.stringify("+JSON.stringify(t)+")"}:function(t){return e+" !== "+JSON.stringify(t)};C("if (%s) {",i.enum.map(F).join(" && ")||"false"),T("must be an enum value"),C("}")}if(i.dependencies&&("object"!==y&&C("if (%s) {",l.object(e)),Object.keys(i.dependencies).forEach(function(t){var n=i.dependencies[t];"string"==typeof n&&(n=[n]);var s=function(t){return r(e,t)+" !== undefined"};Array.isArray(n)&&(C("if (%s !== undefined && !(%s)) {",r(e,t),n.map(s).join(" && ")||"true"),T("dependencies not set"),C("}")),"object"==typeof n&&(C("if (%s !== undefined) {",r(e,t)),S(e,n,o,a),C("}"))}),"object"!==y&&C("}")),i.additionalProperties||i.additionalProperties===!1){"object"!==y&&C("if (%s) {",l.object(e));var A=E(),O=x("keys"),N=function(e){return O+"["+A+"] !== "+JSON.stringify(e)},j=function(e){return"!"+_(e)+".test("+O+"["+A+"])"},R=Object.keys(p||{}).map(N).concat(Object.keys(i.patternProperties||{}).map(j)).join(" && ")||"true";C("var %s = Object.keys(%s)",O,e)("for (var %s = 0; %s < %s.length; %s++) {",A,A,O,A)("if (%s) {",R),i.additionalProperties===!1?(a&&C("delete %s",e+"["+O+"["+A+"]]"),T("has additional properties",null,JSON.stringify(e+".")+" + "+O+"["+A+"]")):S(e+"["+O+"["+A+"]]",i.additionalProperties,o,a),C("}")("}"),"object"!==y&&C("}")}if(i.$ref){var L=u(n,d&&d.schemas||{},i.$ref);if(L){var M=t[i.$ref];M||(t[i.$ref]=function(e){return M(e)},M=f(L,t,n,!1,d));var P=x("ref");m[P]=M,C("if (!(%s(%s))) {",P,e),T("referenced schema does not match"),C("}")}}if(i.not){var B=x("prev");C("var %s = errors",B),S(e,i.not,!1,a),C("if (%s === errors) {",B),T("negative schema matches"),C("} else {")("errors = %s",B)("}")}if(i.items&&!b){"array"!==y&&C("if (%s) {",l.array(e));var A=E();C("for (var %s = 0; %s < %s.length; %s++) {",A,A,e,A),S(e+"["+A+"]",i.items,o,a),C("}"),"array"!==y&&C("}")}if(i.patternProperties){"object"!==y&&C("if (%s) {",l.object(e));var O=x("keys"),A=E();C("var %s = Object.keys(%s)",O,e)("for (var %s = 0; %s < %s.length; %s++) {",A,A,O,A),Object.keys(i.patternProperties).forEach(function(t){var n=_(t);C("if (%s.test(%s)) {",n,O+"["+A+"]"),S(e+"["+O+"["+A+"]]",i.patternProperties[t],o,a),C("}")}),C("}"),"object"!==y&&C("}")}if(i.pattern){var U=_(i.pattern);"string"!==y&&C("if (%s) {",l.string(e)),C("if (!(%s.test(%s))) {",U,e),T("pattern mismatch"),C("}"),"string"!==y&&C("}")}if(i.allOf&&i.allOf.forEach(function(t){S(e,t,o,a)}),i.anyOf&&i.anyOf.length){var B=x("prev");i.anyOf.forEach(function(t,n){0===n?C("var %s = errors",B):C("if (errors !== %s) {",B)("errors = %s",B),S(e,t,!1,!1)}),i.anyOf.forEach(function(e,t){t&&C("}")}),C("if (%s !== errors) {",B),T("no schemas match"),C("}")}if(i.oneOf&&i.oneOf.length){var B=x("prev"),V=x("passes");C("var %s = errors",B)("var %s = 0",V),i.oneOf.forEach(function(t,n){S(e,t,!1,!1),C("if (%s === errors) {",B)("%s++",V)("} else {")("errors = %s",B)("}")}),C("if (%s !== 1) {",V),T("no (or more than one) schemas match"),C("}")}if(void 0!==i.multipleOf){"number"!==y&&"integer"!==y&&C("if (%s) {",l.number(e));var G=(0|i.multipleOf)!==i.multipleOf?Math.pow(10,i.multipleOf.toString().split(".").pop().length):1;G>1?C("if ((%d*%s) % %d) {",G,e,G*i.multipleOf):C("if (%s % %d) {",e,i.multipleOf),T("has a remainder"),C("}"),"number"!==y&&"integer"!==y&&C("}")}for(void 0!==i.maxProperties&&("object"!==y&&C("if (%s) {",l.object(e)),C("if (Object.keys(%s).length > %d) {",e,i.maxProperties),T("has more properties than allowed"),C("}"),"object"!==y&&C("}")),void 0!==i.minProperties&&("object"!==y&&C("if (%s) {",l.object(e)),C("if (Object.keys(%s).length < %d) {",e,i.minProperties),T("has less properties than allowed"),C("}"),"object"!==y&&C("}")),void 0!==i.maxItems&&("array"!==y&&C("if (%s) {",l.array(e)),C("if (%s.length > %d) {",e,i.maxItems),T("has more items than allowed"),C("}"),"array"!==y&&C("}")),void 0!==i.minItems&&("array"!==y&&C("if (%s) {",l.array(e)),C("if (%s.length < %d) {",e,i.minItems),T("has less items than allowed"),C("}"),"array"!==y&&C("}")),void 0!==i.maxLength&&("string"!==y&&C("if (%s) {",l.string(e)),C("if (%s.length > %d) {",e,i.maxLength),T("has longer length than allowed"),C("}"),"string"!==y&&C("}")),void 0!==i.minLength&&("string"!==y&&C("if (%s) {",l.string(e)),C("if (%s.length < %d) {",e,i.minLength),T("has less length than allowed"),C("}"),"string"!==y&&C("}")),void 0!==i.minimum&&(C("if (%s %s %d) {",e,i.exclusiveMinimum?"<=":"<",i.minimum),T("is less than minimum"),C("}")),void 0!==i.maximum&&(C("if (%s %s %d) {",e,i.exclusiveMaximum?">=":">",i.maximum),T("is more than maximum"),C("}")),p&&Object.keys(p).forEach(function(t){S(r(e,t),p[t],o,a)});w--;)C("}")},C=i("function validate(data) {")("validate.errors = null")("var errors = 0");return S("data",e,o,d&&d.filter),C("return errors === 0")("}"),C=C.toFunction(m),C.errors=null,C.__defineGetter__("error",function(){return C.errors?C.errors.map(function(e){return e.field+" "+e.message}).join("\n"):""}),C.toJSON=function(){return e},C};t.exports=function(e,t){return"string"==typeof e&&(e=JSON.parse(e)),f(e,{},e,!0,t)},t.exports.filter=function(e,n){var r=t.exports(e,a(n,{filter:!0}));return function(e){return r(e),e}}},{"./formats":137,"generate-function":139,"generate-object-property":140,jsonpointer:142,xtend:143}],139:[function(e,t,n){var r=e("util"),i=/[\{\[]/,o=/[\}\]]/;t.exports=function(){var e=[],t=0,n=function(n){for(var r="";r.length<2*t;)r+=" ";e.push(r+n)},a=function(e){return e?o.test(e.trim()[0])&&i.test(e[e.length-1])?(t--,n(r.format.apply(r,arguments)),t++,a):i.test(e[e.length-1])?(n(r.format.apply(r,arguments)),t++,a):o.test(e.trim()[0])?(t--,n(r.format.apply(r,arguments)),a):(n(r.format.apply(r,arguments)),a):a};return a.toString=function(){return e.join("\n")},a.toFunction=function(e){var t="return ("+a.toString()+")",n=Object.keys(e||{}).map(function(e){return e}),r=n.map(function(t){return e[t]});return Function.apply(null,n.concat(t)).apply(null,r)},arguments.length&&a.apply(null,arguments),a}},{util:10}],140:[function(e,t,n){var r=e("is-property"),i=function(e,t){return r(t)?e+"."+t:e+"["+JSON.stringify(t)+"]"};i.valid=r,i.property=function(e){return r(e)?e:JSON.stringify(e)},t.exports=i},{"is-property":141}],141:[function(e,t,n){"use strict";function r(e){return/^[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/.test(e); }t.exports=r},{}],142:[function(e,t,n){var r=(e("console"),function(e){return e.replace(/~./g,function(e){switch(e){case"~0":return"~";case"~1":return"/"}throw"Invalid tilde escape: "+e})}),i=function(e,t,n){var o=r(t.shift());if("undefined"==typeof e[o])throw"Value for pointer '"+t+"' not found.";if(0!==t.length)return i(e[o],t,n);if("undefined"==typeof n)return e[o];var a=e[o];return null===n?delete e[o]:e[o]=n,a},o=function(e,t){if("object"!=typeof e)throw"Invalid input object.";if(""===t)return[];if(!t)throw"Invalid JSON pointer.";t=t.split("/");var n=t.shift();if(""!==n)throw"Invalid JSON pointer.";return t},a=function(e,t){return t=o(e,t),0===t.length?e:i(e,t)},s=function(e,t,n){if(t=o(e,t),0===t.length)throw"Invalid JSON pointer for set.";return i(e,t,n)};n.get=a,n.set=s},{console:4}],143:[function(e,t,n){function r(){for(var e={},t=0;t=0;r--)if(!e[r].end&&e[r].rule===n){e[r].end=t;break}});else{var i;for(r=e.length-1;r>=0&&(!i||i===e[r].start);r--)e[r].end||(e[r].end=t,i=e[r].start)}}function l(e,t,n,a,s){var l={astGlobals:{},rules:{},env:{}},p={};t.comments.forEach(function(t){var n=t.value.trim(),f=/^(eslint-\w+|eslint-\w+-\w+|eslint|globals?)(\s|$)/.exec(n);if(f)if(n=n.substring(f.index+f[1].length),"Block"===t.type)switch(f[1]){case"globals":case"global":g(l.astGlobals,r(n));break;case"eslint-env":g(l.env,o(n));break;case"eslint-disable":u(a,t.loc.start,Object.keys(o(n)));break;case"eslint-enable":c(a,t.loc.start,Object.keys(o(n)));break;case"eslint":var d=i(n,t.loc,s);Object.keys(d).forEach(function(n){var r=d[n];S.validateRuleOptions(n,r,e+" line "+t.loc.start.line),p[n]=r})}else"eslint-disable-line"===f[1]&&(u(a,{line:t.loc.start.line,column:0},Object.keys(o(n))),c(a,t.loc.end,Object.keys(o(n))))}),Object.keys(l.env).forEach(function(e){m[e]&&y.mergeConfigs(l,m[e])}),g(l.rules,p),y.mergeConfigs(n,l)}function p(e,t,n){for(var r=0,i=e.length;ro.start.line||n.line===o.start.line&&n.column>=o.start.column)&&(!o.end||n.line=0?t.splice(t.indexOf(e.loc),1):(t.push(e.loc),u.emit(e.type+n,e))})}function r(e){n(e,I,"Comment")}function i(e){n(e,F,"Comment:exit")}function o(e){return"number"==typeof e?e:Array.isArray(e)?e[0]:0}function a(e){return Array.isArray(e)?e.slice(1):[]}var u=Object.create(new w),c=[],m=null,g=[],y=null,S=null,C=null,T=null,D=null,A=null,P=null,k=[],I=[],F=[],O=null;u.setMaxListeners(0),u.reset=function(){this.removeAllListeners(),c=[],O=null,y=null,m=null,g=[],S=null,C=null,T=null,D=null,P=null,k=[],I=[],F=[]},u.verify=function(e,n,p,w){var E,I,F,N;return A=p,w||this.reset(),0===e.trim().length?(m=e,c):(n=f(n||{}),E=t(e.replace(/^#!([^\r\n]+)/,function(e,t){return I=t,"//"+t}),n),E&&(O=E,l(p,E,n,k,c),Object.keys(n.rules).filter(function(e){return o(n.rules[e])>0}).forEach(function(e){var t,r=v.get(e),i=o(n.rules[e]),s=a(n.rules[e]);if(!r)throw new Error("Definition for rule '"+e+"' was not found.");try{t=r(new x(e,u,i,s,n.settings,n.ecmaFeatures)),Object.keys(t).forEach(function(n){u.on(n,b.enabled?b.time(e,t[n]):t[n])})}catch(t){throw t.message="Error while loading rule '"+e+"': "+t.message,t}}),y=n,m=e,P=new d.Controller,F=y.ecmaFeatures,N=F.blockBindings||F.classes||F.modules||F.defaultParams||F.destructuring?6:5,D=h.analyze(E,{ignoreEval:!0,nodejsScope:F.globalReturn,ecmaVersion:N,sourceType:F.modules?"module":"script"}),C=D.scopes,T=[],C.forEach(function(e,t){var n=e.block.range[0];T[n]||(T[n]=t)}),g=m.split(/\r\n|\r|\n|\u2028|\u2029/g),Object.freeze(g),S=_(E.tokens),Object.keys(S).forEach(function(e){u[e]=S[e]}),s(E,C[0],y),I&&E.comments.length&&E.comments[0].value===I&&(E.comments.splice(0,1),E.body.length&&E.body[0].leadingComments&&E.body[0].leadingComments[0].value===I&&E.body[0].leadingComments.splice(0,1)),P.traverse(E,{enter:function(e,t){var n=u.getComments(e);r(n.leading),e.parent=t,u.emit(e.type,e),r(n.trailing)},leave:function(e){var t=u.getComments(e);i(t.trailing),u.emit(e.type+":exit",e),i(t.leading)}})),c.sort(function(e,t){var n=e.line-t.line;return 0===n?e.column-t.column:n}),c)},u.report=function(e,t,n,r,i,o){"string"==typeof r&&(o=i,i=r,r=n.loc.start),Object.keys(o||{}).forEach(function(e){var t=new RegExp(E("{{"+e+"}}"),"g");i=i.replace(t,o[e])}),p(k,e,r)||c.push({ruleId:e,severity:t,message:i,line:r.line,column:r.column,nodeType:n.type,source:g[r.line-1]||""})},u.getSource=function(e,t,n){return e?null!==m?m.slice(Math.max(e.range[0]-(t||0),0),e.range[1]+(n||0)):null:m},u.getSourceLines=function(){return g},u.getAllComments=function(){return O.comments},u.getComments=function(e){var t=e.leadingComments||[],n=e.trailingComments||[];return"Program"===e.type&&0===e.body.length&&(t=e.comments),{leading:t,trailing:n}},u.getJSDocComment=function(e){function t(e){if(e)for(var t=e.length-1;t>=0;t--)if("Block"===e[t].type&&"*"===e[t].value.charAt(0)){if(i-e[t].loc.end.line<=1)return e[t];break}return null}function n(e){return"ExportDefaultDeclaration"===e.type||"ExportNamedDeclaration"===e.type||"ExportAllDeclaration"===e.type||"ExportSpecifier"===e.type}var r=e.parent,i=e.loc.start.line;switch(e.type){case"FunctionDeclaration":return t(n(r)?r.leadingComments:e.leadingComments);case"ArrowFunctionExpression":case"FunctionExpression":if("CallExpression"!==r.type||r.callee!==e){for(;r&&!r.leadingComments&&!/Function/.test(r.type);)r=r.parent;return r&&"FunctionDeclaration"!==r.type?t(r.leadingComments):null}default:return null}},u.getAncestors=function(){return P.parents()},u.getNodeByRangeIndex=function(e){var t=null;return d.traverse(P.root,{enter:function(n){n.range[0]<=e&&e=0&&e.push(n);for(var r=e.length-1;r>=0;--r)if(t=D.acquire(e[r]))return"function-expression-name"===t.type?t.childScopes[0]:t}return C[0]},u.markVariableAsUsed=function(e){var t,n,r,i=this.getScope(),o=y.ecmaFeatures.globalReturn||y.ecmaFeatures.modules;"global"===i.type&&o&&(i=i.childScopes[0]);do for(t=i.variables,n=0,r=t.length;n"};var N=u.defineRule=function(e,t){v.define(e,t)};return u.defineRules=function(e){Object.getOwnPropertyNames(e).forEach(function(t){N(t,e[t])})},u.defaults=function(){return e("../conf/eslint.json")},u}()},{"../conf/environments":1,"../conf/eslint.json":2,"./config-validator":145,"./rule-context":148,"./rules":149,"./timing":318,"./token-store.js":319,"./util":320,"escape-string-regexp":20,escope:22,"estraverse-fb":131,events:6,"object-assign":144}],147:[function(e,t,n){t.exports=function(){var t=Object.create(null);return t["accessor-pairs"]=e("./rules/accessor-pairs"),t["array-bracket-spacing"]=e("./rules/array-bracket-spacing"),t["block-scoped-var"]=e("./rules/block-scoped-var"),t["brace-style"]=e("./rules/brace-style"),t.camelcase=e("./rules/camelcase"),t["comma-dangle"]=e("./rules/comma-dangle"),t["comma-spacing"]=e("./rules/comma-spacing"),t["comma-style"]=e("./rules/comma-style"),t.complexity=e("./rules/complexity"),t["computed-property-spacing"]=e("./rules/computed-property-spacing"),t["consistent-return"]=e("./rules/consistent-return"),t["consistent-this"]=e("./rules/consistent-this"),t.curly=e("./rules/curly"),t["default-case"]=e("./rules/default-case"),t["dot-location"]=e("./rules/dot-location"),t["dot-notation"]=e("./rules/dot-notation"),t["eol-last"]=e("./rules/eol-last"),t.eqeqeq=e("./rules/eqeqeq"),t["func-names"]=e("./rules/func-names"),t["func-style"]=e("./rules/func-style"),t["generator-star-spacing"]=e("./rules/generator-star-spacing"),t["generator-star"]=e("./rules/generator-star"),t["global-strict"]=e("./rules/global-strict"),t["guard-for-in"]=e("./rules/guard-for-in"),t["handle-callback-err"]=e("./rules/handle-callback-err"),t.indent=e("./rules/indent"),t["key-spacing"]=e("./rules/key-spacing"),t["linebreak-style"]=e("./rules/linebreak-style"),t["lines-around-comment"]=e("./rules/lines-around-comment"),t["max-depth"]=e("./rules/max-depth"),t["max-len"]=e("./rules/max-len"),t["max-nested-callbacks"]=e("./rules/max-nested-callbacks"),t["max-params"]=e("./rules/max-params"),t["max-statements"]=e("./rules/max-statements"),t["new-cap"]=e("./rules/new-cap"),t["new-parens"]=e("./rules/new-parens"),t["newline-after-var"]=e("./rules/newline-after-var"),t["no-alert"]=e("./rules/no-alert"),t["no-array-constructor"]=e("./rules/no-array-constructor"),t["no-bitwise"]=e("./rules/no-bitwise"),t["no-caller"]=e("./rules/no-caller"),t["no-catch-shadow"]=e("./rules/no-catch-shadow"),t["no-comma-dangle"]=e("./rules/no-comma-dangle"),t["no-cond-assign"]=e("./rules/no-cond-assign"),t["no-console"]=e("./rules/no-console"),t["no-constant-condition"]=e("./rules/no-constant-condition"),t["no-continue"]=e("./rules/no-continue"),t["no-control-regex"]=e("./rules/no-control-regex"),t["no-debugger"]=e("./rules/no-debugger"),t["no-delete-var"]=e("./rules/no-delete-var"),t["no-div-regex"]=e("./rules/no-div-regex"),t["no-dupe-args"]=e("./rules/no-dupe-args"),t["no-dupe-keys"]=e("./rules/no-dupe-keys"),t["no-duplicate-case"]=e("./rules/no-duplicate-case"),t["no-else-return"]=e("./rules/no-else-return"),t["no-empty-character-class"]=e("./rules/no-empty-character-class"),t["no-empty-class"]=e("./rules/no-empty-class"),t["no-empty-label"]=e("./rules/no-empty-label"),t["no-empty"]=e("./rules/no-empty"),t["no-eq-null"]=e("./rules/no-eq-null"),t["no-eval"]=e("./rules/no-eval"),t["no-ex-assign"]=e("./rules/no-ex-assign"),t["no-extend-native"]=e("./rules/no-extend-native"),t["no-extra-bind"]=e("./rules/no-extra-bind"),t["no-extra-boolean-cast"]=e("./rules/no-extra-boolean-cast"),t["no-extra-parens"]=e("./rules/no-extra-parens"),t["no-extra-semi"]=e("./rules/no-extra-semi"),t["no-extra-strict"]=e("./rules/no-extra-strict"),t["no-fallthrough"]=e("./rules/no-fallthrough"),t["no-floating-decimal"]=e("./rules/no-floating-decimal"),t["no-func-assign"]=e("./rules/no-func-assign"),t["no-implied-eval"]=e("./rules/no-implied-eval"),t["no-inline-comments"]=e("./rules/no-inline-comments"),t["no-inner-declarations"]=e("./rules/no-inner-declarations"),t["no-invalid-regexp"]=e("./rules/no-invalid-regexp"),t["no-irregular-whitespace"]=e("./rules/no-irregular-whitespace"),t["no-iterator"]=e("./rules/no-iterator"),t["no-label-var"]=e("./rules/no-label-var"),t["no-labels"]=e("./rules/no-labels"),t["no-lone-blocks"]=e("./rules/no-lone-blocks"),t["no-lonely-if"]=e("./rules/no-lonely-if"),t["no-loop-func"]=e("./rules/no-loop-func"),t["no-mixed-requires"]=e("./rules/no-mixed-requires"),t["no-mixed-spaces-and-tabs"]=e("./rules/no-mixed-spaces-and-tabs"),t["no-multi-spaces"]=e("./rules/no-multi-spaces"),t["no-multi-str"]=e("./rules/no-multi-str"),t["no-multiple-empty-lines"]=e("./rules/no-multiple-empty-lines"),t["no-native-reassign"]=e("./rules/no-native-reassign"),t["no-negated-in-lhs"]=e("./rules/no-negated-in-lhs"),t["no-nested-ternary"]=e("./rules/no-nested-ternary"),t["no-new-func"]=e("./rules/no-new-func"),t["no-new-object"]=e("./rules/no-new-object"),t["no-new-require"]=e("./rules/no-new-require"),t["no-new-wrappers"]=e("./rules/no-new-wrappers"),t["no-new"]=e("./rules/no-new"),t["no-obj-calls"]=e("./rules/no-obj-calls"),t["no-octal-escape"]=e("./rules/no-octal-escape"),t["no-octal"]=e("./rules/no-octal"),t["no-param-reassign"]=e("./rules/no-param-reassign"),t["no-path-concat"]=e("./rules/no-path-concat"),t["no-plusplus"]=e("./rules/no-plusplus"),t["no-process-env"]=e("./rules/no-process-env"),t["no-process-exit"]=e("./rules/no-process-exit"),t["no-proto"]=e("./rules/no-proto"),t["no-redeclare"]=e("./rules/no-redeclare"),t["no-regex-spaces"]=e("./rules/no-regex-spaces"),t["no-reserved-keys"]=e("./rules/no-reserved-keys"),t["no-restricted-modules"]=e("./rules/no-restricted-modules"),t["no-return-assign"]=e("./rules/no-return-assign"),t["no-script-url"]=e("./rules/no-script-url"),t["no-self-compare"]=e("./rules/no-self-compare"),t["no-sequences"]=e("./rules/no-sequences"),t["no-shadow-restricted-names"]=e("./rules/no-shadow-restricted-names"),t["no-shadow"]=e("./rules/no-shadow"),t["no-space-before-semi"]=e("./rules/no-space-before-semi"),t["no-spaced-func"]=e("./rules/no-spaced-func"),t["no-sparse-arrays"]=e("./rules/no-sparse-arrays"),t["no-sync"]=e("./rules/no-sync"),t["no-ternary"]=e("./rules/no-ternary"),t["no-throw-literal"]=e("./rules/no-throw-literal"),t["no-trailing-spaces"]=e("./rules/no-trailing-spaces"),t["no-undef-init"]=e("./rules/no-undef-init"),t["no-undef"]=e("./rules/no-undef"),t["no-undefined"]=e("./rules/no-undefined"),t["no-underscore-dangle"]=e("./rules/no-underscore-dangle"),t["no-unneeded-ternary"]=e("./rules/no-unneeded-ternary"),t["no-unreachable"]=e("./rules/no-unreachable"),t["no-unused-expressions"]=e("./rules/no-unused-expressions"),t["no-unused-vars"]=e("./rules/no-unused-vars"),t["no-use-before-define"]=e("./rules/no-use-before-define"),t["no-var"]=e("./rules/no-var"),t["no-void"]=e("./rules/no-void"),t["no-warning-comments"]=e("./rules/no-warning-comments"),t["no-with"]=e("./rules/no-with"),t["no-wrap-func"]=e("./rules/no-wrap-func"),t["object-curly-spacing"]=e("./rules/object-curly-spacing"),t["object-shorthand"]=e("./rules/object-shorthand"),t["one-var"]=e("./rules/one-var"),t["operator-assignment"]=e("./rules/operator-assignment"),t["operator-linebreak"]=e("./rules/operator-linebreak"),t["padded-blocks"]=e("./rules/padded-blocks"),t["prefer-const"]=e("./rules/prefer-const"),t["quote-props"]=e("./rules/quote-props"),t.quotes=e("./rules/quotes"),t.radix=e("./rules/radix"),t["semi-spacing"]=e("./rules/semi-spacing"),t.semi=e("./rules/semi"),t["sort-vars"]=e("./rules/sort-vars"),t["space-after-function-name"]=e("./rules/space-after-function-name"),t["space-after-keywords"]=e("./rules/space-after-keywords"),t["space-before-blocks"]=e("./rules/space-before-blocks"),t["space-before-function-paren"]=e("./rules/space-before-function-paren"),t["space-before-function-parentheses"]=e("./rules/space-before-function-parentheses"),t["space-in-brackets"]=e("./rules/space-in-brackets"),t["space-in-parens"]=e("./rules/space-in-parens"),t["space-infix-ops"]=e("./rules/space-infix-ops"),t["space-return-throw-case"]=e("./rules/space-return-throw-case"),t["space-unary-ops"]=e("./rules/space-unary-ops"),t["spaced-comment"]=e("./rules/spaced-comment"),t["spaced-line-comment"]=e("./rules/spaced-line-comment"),t.strict=e("./rules/strict"),t["use-isnan"]=e("./rules/use-isnan"),t["valid-jsdoc"]=e("./rules/valid-jsdoc"),t["valid-typeof"]=e("./rules/valid-typeof"),t["vars-on-top"]=e("./rules/vars-on-top"),t["wrap-iife"]=e("./rules/wrap-iife"),t["wrap-regex"]=e("./rules/wrap-regex"),t.yoda=e("./rules/yoda"),t}},{"./rules/accessor-pairs":150,"./rules/array-bracket-spacing":151,"./rules/block-scoped-var":152,"./rules/brace-style":153,"./rules/camelcase":154,"./rules/comma-dangle":155,"./rules/comma-spacing":156,"./rules/comma-style":157,"./rules/complexity":158,"./rules/computed-property-spacing":159,"./rules/consistent-return":160,"./rules/consistent-this":161,"./rules/curly":162,"./rules/default-case":163,"./rules/dot-location":164,"./rules/dot-notation":165,"./rules/eol-last":166,"./rules/eqeqeq":167,"./rules/func-names":168,"./rules/func-style":169,"./rules/generator-star":171,"./rules/generator-star-spacing":170,"./rules/global-strict":172,"./rules/guard-for-in":173,"./rules/handle-callback-err":174,"./rules/indent":175,"./rules/key-spacing":176,"./rules/linebreak-style":177,"./rules/lines-around-comment":178,"./rules/max-depth":179,"./rules/max-len":180,"./rules/max-nested-callbacks":181,"./rules/max-params":182,"./rules/max-statements":183,"./rules/new-cap":184,"./rules/new-parens":185,"./rules/newline-after-var":186,"./rules/no-alert":187,"./rules/no-array-constructor":188,"./rules/no-bitwise":189,"./rules/no-caller":190,"./rules/no-catch-shadow":191,"./rules/no-comma-dangle":192,"./rules/no-cond-assign":193,"./rules/no-console":194,"./rules/no-constant-condition":195,"./rules/no-continue":196,"./rules/no-control-regex":197,"./rules/no-debugger":198,"./rules/no-delete-var":199,"./rules/no-div-regex":200,"./rules/no-dupe-args":201,"./rules/no-dupe-keys":202,"./rules/no-duplicate-case":203,"./rules/no-else-return":204,"./rules/no-empty":208,"./rules/no-empty-character-class":205,"./rules/no-empty-class":206,"./rules/no-empty-label":207,"./rules/no-eq-null":209,"./rules/no-eval":210,"./rules/no-ex-assign":211,"./rules/no-extend-native":212,"./rules/no-extra-bind":213,"./rules/no-extra-boolean-cast":214,"./rules/no-extra-parens":215,"./rules/no-extra-semi":216,"./rules/no-extra-strict":217,"./rules/no-fallthrough":218,"./rules/no-floating-decimal":219,"./rules/no-func-assign":220,"./rules/no-implied-eval":221,"./rules/no-inline-comments":222,"./rules/no-inner-declarations":223,"./rules/no-invalid-regexp":224,"./rules/no-irregular-whitespace":225,"./rules/no-iterator":226,"./rules/no-label-var":227,"./rules/no-labels":228,"./rules/no-lone-blocks":229,"./rules/no-lonely-if":230,"./rules/no-loop-func":231,"./rules/no-mixed-requires":232,"./rules/no-mixed-spaces-and-tabs":233,"./rules/no-multi-spaces":234,"./rules/no-multi-str":235,"./rules/no-multiple-empty-lines":236,"./rules/no-native-reassign":237,"./rules/no-negated-in-lhs":238,"./rules/no-nested-ternary":239,"./rules/no-new":244,"./rules/no-new-func":240,"./rules/no-new-object":241,"./rules/no-new-require":242,"./rules/no-new-wrappers":243,"./rules/no-obj-calls":245,"./rules/no-octal":247,"./rules/no-octal-escape":246,"./rules/no-param-reassign":248,"./rules/no-path-concat":249,"./rules/no-plusplus":250,"./rules/no-process-env":251,"./rules/no-process-exit":252,"./rules/no-proto":253,"./rules/no-redeclare":254,"./rules/no-regex-spaces":255,"./rules/no-reserved-keys":256,"./rules/no-restricted-modules":257,"./rules/no-return-assign":258,"./rules/no-script-url":259,"./rules/no-self-compare":260,"./rules/no-sequences":261,"./rules/no-shadow":263,"./rules/no-shadow-restricted-names":262,"./rules/no-space-before-semi":264,"./rules/no-spaced-func":265,"./rules/no-sparse-arrays":266,"./rules/no-sync":267,"./rules/no-ternary":268,"./rules/no-throw-literal":269,"./rules/no-trailing-spaces":270,"./rules/no-undef":272,"./rules/no-undef-init":271,"./rules/no-undefined":273,"./rules/no-underscore-dangle":274,"./rules/no-unneeded-ternary":275,"./rules/no-unreachable":276,"./rules/no-unused-expressions":277,"./rules/no-unused-vars":278,"./rules/no-use-before-define":279,"./rules/no-var":280,"./rules/no-void":281,"./rules/no-warning-comments":282,"./rules/no-with":283,"./rules/no-wrap-func":284,"./rules/object-curly-spacing":285,"./rules/object-shorthand":286,"./rules/one-var":287,"./rules/operator-assignment":288,"./rules/operator-linebreak":289,"./rules/padded-blocks":290,"./rules/prefer-const":291,"./rules/quote-props":292,"./rules/quotes":293,"./rules/radix":294,"./rules/semi":296,"./rules/semi-spacing":295,"./rules/sort-vars":297,"./rules/space-after-function-name":298,"./rules/space-after-keywords":299,"./rules/space-before-blocks":300,"./rules/space-before-function-paren":301,"./rules/space-before-function-parentheses":302,"./rules/space-in-brackets":303,"./rules/space-in-parens":304,"./rules/space-infix-ops":305,"./rules/space-return-throw-case":306,"./rules/space-unary-ops":307,"./rules/spaced-comment":308,"./rules/spaced-line-comment":309,"./rules/strict":310,"./rules/use-isnan":311,"./rules/valid-jsdoc":312,"./rules/valid-typeof":313,"./rules/vars-on-top":314,"./rules/wrap-iife":315,"./rules/wrap-regex":316,"./rules/yoda":317}],148:[function(e,t,n){"use strict";function r(e,t,n,r,o,a){Object.defineProperty(this,"id",{value:e}),Object.defineProperty(this,"options",{value:r}),Object.defineProperty(this,"settings",{value:o}),Object.defineProperty(this,"ecmaFeatures",{value:Object.create(a)}),Object.freeze(this.ecmaFeatures),i.forEach(function(e){this[e]=function(){return t[e].apply(t,arguments)}},this),this.report=function(r,i,o,a){t.report(e,n,r,i,o,a)}}var i=["getAllComments","getAncestors","getComments","getFilename","getFirstToken","getFirstTokens","getJSDocComment","getLastToken","getLastTokens","getNodeByRangeIndex","getScope","getSource","getSourceLines","getTokenAfter","getTokenBefore","getTokenByRangeStart","getTokens","getTokensAfter","getTokensBefore","getTokensBetween","markVariableAsUsed","isMarkedAsUsed"];r.prototype={constructor:r},t.exports=r},{}],149:[function(e,t,n){"use strict";function r(e,t){a[e]=t}function i(e){var t=o(e);Object.keys(t).forEach(function(e){r(e,t[e])})}var o=e("./load-rules"),a=Object.create(null);n.define=r,n.load=i,n.import=function(e,t){Object.keys(e).forEach(function(n){var i=t+"/"+n,o=e[n];r(i,o)})},n.get=function(e){return a[e]},n.testClear=function(){a=Object.create(null)},i()},{"./load-rules":147}],150:[function(e,t,n){"use strict";t.exports=function(e){function t(t){for(var n=!1,o=!1,a=t.properties.length,s=0;s-1||e===t.id;case"VariableDeclarator":return e===t.id;case"CatchClause":return e===t.param;default:return!1}}function n(e,t){switch(t.type){case"MemberExpression":return e===t.property&&!t.computed;case"Property":return e===t.key;default:return!1}}function r(){h.push([])}function i(){h.pop()}function o(e){[].push.apply(h[h.length-1],e)}function a(e){o([e.local.name]),e.imported&&e.imported.name!==e.local.name&&o([e.imported.name])}function s(e){e.id&&o([e.id.name]),r()}function u(e){r(),o([e.key.name])}function c(e){var t=[];switch(e.type){case"Identifier":t.push(e.name);break;case"ObjectPattern":e.properties.forEach(function(e){t.push(e.key.name),e.value&&t.push(e.value.name)});break;case"ArrayPattern":e.elements.forEach(function(e){e&&t.push(e.name)});break;case"AssignmentPattern":c(e.left);break;case"RestElement":c(e.argument)}o(t)}function l(e){r(),e.params.forEach(function(e){c(e)}),o(e.rest?[e.rest.name]:[]),o(["arguments"])}function p(e){o(e.id?[e.id.name]:[]),l(e)}function f(e){l(e),o(e.id?[e.id.name]:[])}function d(e){e.declarations.forEach(function(e){c(e.id)})}var h=[];return{Program:function(){var t=e.getScope();h=[t.variables.map(function(e){return e.name})],e.ecmaFeatures.globalReturn&&(t=t.childScopes[0],h.push(t.variables.map(function(e){return e.name})))},ImportSpecifier:a,ImportDefaultSpecifier:a,ImportNamespaceSpecifier:a,BlockStatement:function(e){var t=e.body;r(),t.forEach(function(e){"VariableDeclaration"===e.type?d(e):"FunctionDeclaration"===e.type&&o([e.id.name])})},VariableDeclaration:function(e){d(e)},"BlockStatement:exit":i,CatchClause:function(e){r(),o([e.param.name])},"CatchClause:exit":i,FunctionDeclaration:p,"FunctionDeclaration:exit":i,ClassDeclaration:s,"ClassDeclaration:exit":i,ClassExpression:s,"ClassExpression:exit":i,MethodDefinition:u,"MethodDefinition:exit":i,FunctionExpression:f,"FunctionExpression:exit":i,ArrowFunctionExpression:l,"ArrowFunctionExpression:exit":i,ForStatement:function(){r()},"ForStatement:exit":i,ForInStatement:function(){r()},"ForInStatement:exit":i,ForOfStatement:function(){r()},"ForOfStatement:exit":i,Identifier:function(r){var i=e.getAncestors().pop();if(!t(r,i)&&!n(r,i)&&"LabeledStatement"!==i.type){for(var o=0,a=h.length;o-1)return;e.report(r,'"'+r.name+'" used outside of binding context.')}}}},t.exports.schema=[]},{}],153:[function(e,t,n){"use strict";t.exports=function(e){function t(e){return e&&"BlockStatement"===e.type}function n(e){return"{"===e.value||"}"===e.value}function r(){var n=arguments;return function(r){[].forEach.call(n,function(n){var i,o,a,s,u=r[n];u=r[n],t(u)&&(i=e.getTokenBefore(u),o=e.getFirstToken(u),a=e.getLastToken(u),s=o.loc.start.line===a.loc.start.line,i.loc.start.line!==o.loc.start.line?e.report(r,l):u.body.length&&c.allowSingleLine?o.loc.start.line!==u.body[0].loc.start.line||s?a.loc.start.line!==u.body[u.body.length-1].loc.start.line||s||e.report(u.body[u.body.length-1],d):e.report(u.body[0],p):u.body.length&&o.loc.start.line===u.body[0].loc.start.line&&e.report(u.body[0],p))})}}function i(i){var o,a=!1,s=!1;r("consequent","alternate")(i),i.alternate&&(a=t(i.alternate),s="IfStatement"===i.alternate.type&&t(i.alternate.consequent),(a||s)&&(o=e.getTokensBefore(i.alternate,2),"1tbs"===u?o[0].loc.start.line!==o[1].loc.start.line&&n(o[0])&&e.report(i.alternate,f):"stroustrup"===u&&o[0].loc.start.line===o[1].loc.start.line&&e.report(i.alternate,h)))}function o(n){var i;r("block","finalizer")(n),t(n.finalizer)&&(i=e.getTokensBefore(n.finalizer,2),"1tbs"===u?i[0].loc.start.line!==i[1].loc.start.line&&e.report(n.finalizer,f):"stroustrup"===u&&i[0].loc.start.line===i[1].loc.start.line&&e.report(n.finalizer,h))}function a(n){var i=e.getTokenBefore(n),o=e.getFirstToken(n);r("body")(n),t(n.body)&&("1tbs"===u?i.loc.start.line!==o.loc.start.line&&e.report(n,f):"stroustrup"===u&&i.loc.start.line===o.loc.start.line&&e.report(n,h))}function s(t){var n;t.cases&&t.cases.length?(n=e.getTokensBefore(t.cases[0],2),n[0].loc.start.line!==n[1].loc.start.line&&e.report(t,l)):(n=e.getLastTokens(t,3),n[0].loc.start.line!==n[1].loc.start.line&&e.report(t,l))}var u=e.options[0]||"1tbs",c=e.options[1]||{},l="Opening curly brace does not appear on the same line as controlling statement.",p="Statement inside of curly braces should be on next line.",f="Closing curly brace does not appear on the same line as the subsequent block.",d="Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",h="Closing curly brace appears on the same line as the subsequent block.";return{FunctionDeclaration:r("body"),FunctionExpression:r("body"),ArrowFunctionExpression:r("body"),IfStatement:i,TryStatement:o,CatchClause:a, DoWhileStatement:r("body"),WhileStatement:r("body"),WithStatement:r("body"),ForStatement:r("body"),ForInStatement:r("body"),ForOfStatement:r("body"),SwitchStatement:s}},t.exports.schema=[{enum:["1tbs","stroustrup"]},{type:"object",properties:{allowSingleLine:{type:"boolean"}},additionalProperties:!1}]},{}],154:[function(e,t,n){"use strict";t.exports=function(e){function t(e){return e.indexOf("_")>-1&&e!==e.toUpperCase()}function n(t){e.report(t,"Identifier '{{name}}' is not in camel case.",{name:t.name})}var r=e.options[0]||{},i=r.properties||"";return"always"!==i&&"never"!==i&&(i="always"),{Identifier:function(e){var r=e.name.replace(/^_+|_+$/g,""),o="MemberExpression"===e.parent.type?e.parent.parent:e.parent;if("MemberExpression"===e.parent.type){if("never"===i)return;"Identifier"===e.parent.object.type&&e.parent.object.name===e.name&&t(r)?n(e):"AssignmentExpression"===o.type&&t(r)&&("MemberExpression"!==o.right.type||"MemberExpression"===o.left.type&&o.left.property.name===e.name)&&n(e)}else if("Property"===e.parent.type){if("never"===i)return;t(r)&&"CallExpression"!==o.type&&n(e)}else t(r)&&"CallExpression"!==o.type&&n(e)}}},t.exports.schema=[{type:"object",properties:{properties:{enum:["always","never"]}},additionalProperties:!1}]},{}],155:[function(e,t,n){"use strict";t.exports=function(e){function t(t){var a,s,u,c,l=t.properties||t.elements,p=l.length;p&&(s=l[p-1],s&&(u=e.getLastToken(t,1),c=","===u.value,r&&c?e.report(s,u.loc.start,i):"always-multiline"===n?(a=t.loc.end.line!==u.loc.end.line,c&&!a?e.report(s,u.loc.start,i):!c&&a&&e.report(s,u.loc.end,o)):"always"!==n||c||e.report(s,s.loc.end,o)))}var n=e.options[0],r="always-multiline"!==n&&"always"!==n,i="Unexpected trailing comma.",o="Missing trailing comma.";return{ObjectExpression:t,ArrayExpression:t}},t.exports.schema=[{enum:["always","always-multiline","never"]}]},{}],156:[function(e,t,n){"use strict";t.exports=function(e){function t(e,t){return u.reduce(function(n,r){return e.range[1]<=r.range[0]&&r.range[1]<=t.range[0]&&(n=n+r.range[1]-r.range[0]),n},0)}function n(n,r){var i=e.getTokensBetween(n,r).length,o=t(n,r);return n.range[1]+i+on.range[1]))break;l++}return!1}var u,c={before:!!e.options[0]&&!!e.options[0].before,after:!e.options[0]||!!e.options[0].after},l=0;return{Program:function(){var t,n,r,o=e.getSource(),c=/,/g;for(u=e.getAllComments();c.test(o);)s(c.lastIndex,u)||(t=e.getTokenByRangeStart(c.lastIndex-1),t&&"JSXText"!==t.type&&(n=e.getTokenBefore(t),r=e.getTokenAfter(t),a({comma:t,left:i(n)?null:n,right:i(r)?null:r},t)))}}},t.exports.schema=[{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]},{}],157:[function(e,t,n){"use strict";t.exports=function(e){function t(e,t){return e.loc.end.line===t.loc.start.line}function n(e){return!!e&&"Punctuator"===e.type&&","===e.value}function r(n,r,i,a){t(r,i)&&t(n,r)||(t(r,i)||t(n,r)?"first"!==o||t(r,i)?"last"===o&&t(r,i)&&e.report(a,{line:r.loc.end.line,column:r.loc.end.column},"',' should be placed last."):e.report(a,"',' should be placed first."):e.report(a,{line:r.loc.end.line,column:r.loc.start.column},"Bad line breaking before and after ','."))}function i(t,i){var o,a=t[i],s="ArrayExpression"===t.type;if((a.length>1||s)&&(o=e.getFirstToken(t),a.forEach(function(t){var i=t?e.getTokenBefore(t):o,a=t?e.getFirstToken(t):e.getTokenAfter(i),s=t||a;n(i)&&r(o,i,a,s),o=t?e.getLastToken(t):o}),s)){var u=e.getLastToken(t),c=e.getTokenBefore(u);n(c)&&r(e.getTokenBefore(c),c,u,u)}}var o=e.options[0]||"last",a={};2===e.options.length&&e.options[1].hasOwnProperty("exceptions")&&(a=e.options[1].exceptions);var s={};return a.VariableDeclaration||(s.VariableDeclaration=function(e){i(e,"declarations")}),a.ObjectExpression||(s.ObjectExpression=function(e){i(e,"properties")}),a.ArrayExpression||(s.ArrayExpression=function(e){i(e,"elements")}),s},t.exports.schema=[{enum:["first","last"]},{type:"object",properties:{exceptions:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}]},{}],158:[function(e,t,n){"use strict";t.exports=function(e){function t(){s.push(1)}function n(t){var n=s.pop(),r="anonymous";t.id?r=t.id.name:"MethodDefinition"===t.parent.type&&(r=t.parent.key.name),n>a&&e.report(t,"Function '{{name}}' has a complexity of {{complexity}}.",{name:r,complexity:n})}function r(){s.length&&s[s.length-1]++}function i(e){e.test&&r(e)}function o(e){"||"===e.operator&&r(e)}var a=e.options[0],s=[];return{FunctionDeclaration:t,FunctionExpression:t,ArrowFunctionExpression:t,"FunctionDeclaration:exit":n,"FunctionExpression:exit":n,"ArrowFunctionExpression:exit":n,CatchClause:r,ConditionalExpression:r,LogicalExpression:o,ForStatement:r,ForInStatement:r,ForOfStatement:r,IfStatement:r,SwitchCase:i,WhileStatement:r,DoWhileStatement:r}},t.exports.schema=[{type:"integer"}]},{}],159:[function(e,t,n){"use strict";t.exports=function(e){function t(e,t){return e.range[1]=e.getTokenAfter(r).range[0])&&e.report(t,"Expected spaces around *.")))}var n=e.options[0]||"end";return{FunctionDeclaration:t,FunctionExpression:t}},t.exports.schema=[{enum:["start","middle","end"]}]},{}],172:[function(e,t,n){"use strict";t.exports=function(e){var t=e.options[0];return"always"===t?{Program:function(t){if(t.body.length>0){var n=t.body[0];"ExpressionStatement"===n.type&&"use strict"===n.expression.value||e.report(t,'Use the global form of "use strict".')}}}:{ExpressionStatement:function(t){var n=e.getAncestors().pop();"use strict"===t.expression.value&&"Program"===n.type&&e.report(t,'Use the function form of "use strict".')}}},t.exports.schema=[{enum:["always","never"]}]},{}],173:[function(e,t,n){"use strict";t.exports=function(e){return{ForInStatement:function(t){var n="BlockStatement"===t.body.type?t.body.body[0]:t.body;n&&"IfStatement"!==n.type&&e.report(t,"The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype.")}}},t.exports.schema=[]},{}],174:[function(e,t,n){"use strict";t.exports=function(e){function t(e){var t=e[0];return"^"===t}function n(e){if(t(a)){var n=new RegExp(a);return n.test(e)}return e===a}function r(e){u++;var t=e.params&&e.params[0];t&&n(t.name)&&s.push({handled:!1,depth:u,errorVariableName:t.name})}function i(t){var n=s[s.length-1]||{};n.depth===u&&(s.pop(),n.handled||e.report(t,"Expected error to be handled.")),u--}function o(e){if(s.length>0){var t=s[s.length-1]||{},n=e.name===t.errorVariableName,r=["FunctionDeclaration","ArrowFunctionExpression","FunctionExpression","CatchClause"],i=r.indexOf(e.parent.type)===-1;n&&i&&(t.handled=!0)}}var a=e.options[0]||"err",s=[],u=0;return{FunctionDeclaration:r,FunctionExpression:r,ArrowFunctionExpression:r,Identifier:o,"FunctionDeclaration:exit":i,"FunctionExpression:exit":i,"ArrowFunctionExpression:exit":i}},t.exports.schema=[{type:"string"}]},{}],175:[function(e,t,n){"use strict";t.exports=function(e){function t(e){E[e].check=!0}function n(e){t(e.loc.start.line-1)}function r(e,t){E[e.loc.start.line-1].push.push(t)}function i(e,t){E[e.loc.end.line-1].pop.push(t)}function o(e){E[e.loc.start.line-1].pushAltLine.push(e.loc.end.line-1)}function a(e,n){r(e,n),t(e.loc.end.line-1)}function s(e,t){var n=p(t);n?(null===S&&(S=e.loc.start.column===n.loc.start.column?1:0),i(n,S)):i(e,0)}function u(e){d(e).forEach(function(t){t.loc.start.line===e.loc.start.line&&"Program"!==e.type||n(t)})}function c(e,t){var r=e[t];r&&"BlockStatement"===r.type&&n(r)}function l(e){return e.loc.start.line!==e.loc.end.line}function p(e){var t;return e.some(function(e){if("BreakStatement"===e.type)return t=e,!0}),t}function f(e){var t=e.parent;return"IfStatement"===t.type&&t.alternate===e?e:"DoWhileStatement"===t.type?e:T.indexOf(t.type)===-1?e:t}function d(e){var t=D[e.type];return e[t]}function h(e){var t=new RegExp("[^"+y+"]"),n=_[e].search(t);return n===-1&&(n=_[e].length),n}function m(t){E.forEach(function(n,r){var i=h(r),o=g(n,i);n.check&&i!==o&&(e.report(t,{line:r+1,column:o},"Expected indentation of "+o+" characters."),i=o),n.push.length&&v(n,i)})}function g(e,t){var n=x*Math.max.apply(null,e.pop),r=w.length-1,i=w[r];return Array.isArray(i)||(i=[i]),i=i.map(function(t){return e.pop.length&&(t-=n),t}).reduce(function(e,n){return t===n?n:e}),w[r]=i,e.pop.forEach(function(){w.pop()}),i}function v(e,t){var n=Math.max.apply(null,e.push),r=t+x*n;e.pushAltLine.length&&(r=[r],e.pushAltLine.forEach(function(e){r.push(h(e)+x*n)})),e.push.forEach(function(){w.push(r)})}var y=" ",x=4,b={indentSwitchCase:!1},_=null,w=[0],E=null,S=null;if(e.options.length&&("tab"===e.options[0]?(y="\t",x=1):"number"==typeof e.options[0]&&(x=e.options[0]),e.options[1])){var C=e.options[1];b.indentSwitchCase=C.indentSwitchCase===!0}var T=["IfStatement","WhileStatement","DoWhileStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","ArrowExpression","CatchClause","WithStatement"],D={BlockStatement:"body",Program:"body",ObjectExpression:"properties",ArrayExpression:"elements",SwitchStatement:"cases"};return b.indentSwitchCase&&(D.SwitchCase="consequent"),{Program:function(t){_=e.getSourceLines(),E=_.map(function(){return{push:[],pushAltLine:[],pop:[],check:!1}}),l(t)&&u(t)},"Program:exit":function(e){m(e)},BlockStatement:function(e){l(e)&&(u(e),i(e,1),a(f(e),1))},IfStatement:function(e){c(e,"alternate")},TryStatement:function(e){c(e,"handler"),c(e,"finalizer")},SwitchStatement:function(e){if(l(e)){var t=1,n=d(e);n.length&&e.loc.start.column===n[0].loc.start.column&&(t=0),u(e),i(e,t),a(e,t)}},SwitchCase:function(e){if(b.indentSwitchCase&&l(e)){var t=d(e);1===t.length&&"BlockStatement"===t[0].type||(r(e,1),n(e),u(e),s(e,t))}},FunctionDeclaration:function(e){o(e)},FunctionExpression:function(e){o(e)}}},t.exports.schema=[{oneOf:[{enum:["tab"]},{type:"integer"}]},{type:"object",properties:{indentSwitchCase:{type:"boolean"}},additionalProperties:!1}]},{}],176:[function(e,t,n){"use strict";function r(e){return/[\n\r\u2028\u2029]/.test(e)}function i(e){return e[e.length-1]}function o(e,t){var n,r,o=e.loc.start.line,a=t.loc.start.line;if(a-o<=1)return!0;if(n=t.leadingComments,n&&n[0].loc.start.line-o<=1&&a-i(n).loc.end.line<=1){for(r=1;r1)return!1;return!0}return!1}function a(e){return e.loc.end.line===e.loc.start.line}var s={key:'{{error}} space after {{computed}}key "{{key}}".',value:'{{error}} space before value for {{computed}}key "{{key}}".'};t.exports=function(e){function t(t){var n=t.key;return t.computed?e.getSource().slice(n.range[0],n.range[1]):t.key.name||t.key.value}function n(n,i,o,a){var u=o.length-a,c=n.key,l=e.getTokenAfter(c,1),p="key"===i?c.loc.start:l.loc.start;!u||a&&r(o)||e.report(n[i],p,s[i],{error:u>0?"Extra":"Missing",computed:n.computed?"computed ":"",key:t(n)})}function u(t){var n,r,i=t.key;return t.computed?(n=e.getTokenBefore(i),r=e.getTokenAfter(i),r.range[1]-n.range[0]):"Identifier"===i.type?i.name.length:"Literal"===i.type?i.raw.length:void 0}function c(t){var n=/(\s*):(\s*)/.exec(e.getSource().slice(t.key.range[1],t.value.range[0]));if(n)return{beforeColon:n[1],afterColon:n[2]}}function l(e){return 1===e.properties.length?[e.properties]:e.properties.reduce(function(e,t){var n=i(e),r=i(n);return!r||o(r,t)?n.push(t):e.push([t]),e},[[]])}function p(e){var t,r,i,o,a=e.length,s=e.map(u),l=Math.max.apply(null,s);for(l+="colon"===g?v:y,t=0;t-1}t.exports=function(e){function t(t){var n=e.getSourceLines(),r=n[t.loc.start.line-1],i=n[t.loc.end.line-1],o=r.slice(0,t.loc.start.column).trim(),a=i.slice(t.loc.end.column).trim();return!(!o&&!a)}function n(t){var n,r=e.getAncestors();return r.length&&(n=r.pop()),n&&("BlockStatement"===n.type||"BlockStatement"===n.body.type)&&t.loc.start.line-n.loc.start.line===1}function a(t){var n,r=e.getAncestors();return r.length&&(n=r.pop()),n&&("BlockStatement"===n.type||"BlockStatement"===n.body.type)&&n.loc.end.line-t.loc.end.line===1}function s(s,c){var l=e.getSourceLines(),p=l.length+1,f=e.getAllComments(),d=i(f),h=r(l),m=d.concat(h),g=c.after,v=c.before,y=s.loc.start.line-1,x=s.loc.end.line+1,b=t(s),_=u.allowBlockStart&&n(s),w=u.allowBlockEnd&&a(s);y<1&&(v=!1),x>=p&&(g=!1),b||(_||!v||o(y,m)||e.report(s,"Expected line before comment."),w||!g||o(x,m)||e.report(s,"Expected line after comment."))}var u=e.options[0]||{};return u.beforeLineComment=u.beforeLineComment||!1,u.afterLineComment=u.afterLineComment||!1,u.beforeBlockComment="undefined"==typeof u.beforeBlockComment||u.beforeBlockComment,u.afterBlockComment=u.afterBlockComment||!1,u.allowBlockStart=u.allowBlockStart||!1,u.allowBlockEnd=u.allowBlockEnd||!1,{LineComment:function(e){(u.beforeLineComment||u.afterLineComment)&&s(e,{after:u.afterLineComment,before:u.beforeLineComment})},BlockComment:function(e){(u.beforeBlockComment||u.afterBlockComment)&&s(e,{after:u.afterBlockComment,before:u.beforeBlockComment})}}},t.exports.schema=[{type:"object",properties:{beforeBlockComment:{type:"boolean"},afterBlockComment:{type:"boolean"},beforeLineComment:{type:"boolean"},afterLineComment:{type:"boolean"},allowBlockStart:{type:"boolean"},allowBlockEnd:{type:"boolean"}},additionalProperties:!1}]},{}],179:[function(e,t,n){"use strict";t.exports=function(e){function t(){o.push(0)}function n(){o.pop()}function r(t){var n=++o[o.length-1];n>a&&e.report(t,"Blocks are nested too deeply ({{depth}}).",{depth:n})}function i(){o[o.length-1]--}var o=[],a=e.options[0]||4;return{Program:t,FunctionDeclaration:t,FunctionExpression:t,ArrowFunctionExpression:t,IfStatement:function(e){"IfStatement"!==e.parent.type&&r(e)},SwitchStatement:r,TryStatement:r,DoWhileStatement:r,WhileStatement:r,WithStatement:r,ForStatement:r,ForInStatement:r,ForOfStatement:r,"IfStatement:exit":i,"SwitchStatement:exit":i,"TryStatement:exit":i,"DoWhileStatement:exit":i,"WhileStatement:exit":i,"WithStatement:exit":i,"ForStatement:exit":i,"ForInStatement:exit":i,"ForOfStatement:exit":i,"FunctionDeclaration:exit":n,"FunctionExpression:exit":n,"ArrowFunctionExpression:exit":n,"Program:exit":n}},t.exports.schema=[{type:"integer"}]},{}],180:[function(e,t,n){"use strict";t.exports=function(e){function t(e,t){var n="";for(t|=0;t>0;t>>>=1,e+=e)1&t&&(n+=e);return n}function n(t){var n=e.getSourceLines();n.forEach(function(n,r){n.replace(/\t/g,o).length>i&&e.report(t,{line:r+1,col:1},"Line "+(r+1)+" exceeds the maximum line length of "+i+".")})}var r=e.options[1]||4,i=e.options[0]||80,o=t(" ",r);return{Program:n}},t.exports.schema=[{type:"integer",minimum:0},{type:"integer",minimum:0}]},{}],181:[function(e,t,n){"use strict";t.exports=function(e){function t(t){var n=t.parent;if("CallExpression"===n.type&&i.push(t),i.length>r){var o={num:i.length,max:r};e.report(t,"Too many nested callbacks ({{num}}). Maximum allowed is {{max}}.",o)}}function n(){i.pop()}var r=e.options[0],i=[];return{ArrowFunctionExpression:t,"ArrowFunctionExpression:exit":n,FunctionExpression:t,"FunctionExpression:exit":n}},t.exports.schema=[{type:"integer"}]},{}],182:[function(e,t,n){"use strict";t.exports=function(e){function t(t){t.params.length>n&&e.report(t,"This function has too many parameters ({{count}}). Maximum allowed is {{max}}.",{count:t.params.length,max:n})}var n=e.options[0]||3;return{FunctionDeclaration:t,ArrowFunctionExpression:t,FunctionExpression:t}},t.exports.schema=[{type:"integer"}]},{}],183:[function(e,t,n){"use strict";t.exports=function(e){function t(){i.push(0)}function n(t){var n=i.pop();n>o&&e.report(t,"This function has too many statements ({{count}}). Maximum allowed is {{max}}.",{count:n,max:o})}function r(e){i[i.length-1]+=e.body.length}var i=[],o=e.options[0]||10;return{FunctionDeclaration:t,FunctionExpression:t,ArrowFunctionExpression:t,BlockStatement:r,"FunctionDeclaration:exit":n,"FunctionExpression:exit":n,"ArrowFunctionExpression:exit":n}},t.exports.schema=[{type:"integer"}]},{}],184:[function(e,t,n){"use strict";function r(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)&&!Array.isArray(e[t]))throw new TypeError(t+", if provided, must be an Array");return e[t]||n}function i(e,t){return e[t]=!0,e}function o(e){var t=r(e,"capIsNewExceptions",a);return t!==a&&(t=t.concat(a)),t.reduce(i,{})}var a=["Array","Boolean","Date","Error","Function","Number","Object","RegExp","String","Symbol"];t.exports=function(e){function t(e){var t,n="";return"MemberExpression"===e.callee.type?(t=e.callee.property,"Literal"===t.type&&"string"==typeof t.value?n=t.value:"Identifier"!==t.type||e.callee.computed||(n=t.name)):n=e.callee.name,n}function n(e){var t=e.charAt(0),n=t.toLowerCase(),r=t.toUpperCase();return n===r?"non-alpha":t===n?"lower":"upper"}function a(e,t,n){return!!e[n]||"UTC"===n&&"MemberExpression"===t.callee.type&&("Identifier"===t.callee.object.type&&"Date"===t.callee.object.name)}function s(t,n){var r=t.callee;"MemberExpression"===r.type&&(r=r.property),e.report(t,r.loc.start,n)}var u=e.options[0]||{};u.newIsCap=u.newIsCap!==!1,u.capIsNew=u.capIsNew!==!1;var c=r(u,"newIsCapExceptions",[]).reduce(i,{}),l=o(u),p={};return u.newIsCap&&(p.NewExpression=function(e){var r=t(e);if(r){var i=n(r),o="lower"!==i||a(c,e,r);o||s(e,"A constructor name should not start with a lowercase letter.")}}),u.capIsNew&&(p.CallExpression=function(e){var r=t(e);if(r){var i=n(r),o="upper"!==i||a(l,e,r);o||s(e,"A function with a name starting with an uppercase letter should only be used as a constructor.")}}),p},t.exports.schema=[{type:"object",properties:{newIsCap:{type:"boolean"},capIsNew:{type:"boolean"},newIsCapExceptions:{type:"array",items:{type:"string"}},capIsNewExceptions:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},{}],185:[function(e,t,n){"use strict";t.exports=function(e){return{NewExpression:function(t){var n=e.getTokens(t),r=n.filter(function(e){return"("===e.value||")"===e.value});r.length<2&&e.report(t,"Missing '()' invoking a constructor")}}},t.exports.schema=[]},{}],186:[function(e,t,n){"use strict";t.exports=function(e){function t(e){return"var"===e||"let"===e||"const"===e}function n(e){return"ForStatement"===e||"ForInStatement"===e||"ForOfStatement"===e}function r(e){return"ExportNamedDeclaration"===e||"ExportSpecifier"===e||"ExportDefaultDeclaration"===e||"ExportAllDeclaration"===e}function i(i){var c,l,p=e.getLastToken(i),f=e.getTokenAfter(i),d=p.loc.end.line+1;f&&(n(i.parent.type)||r(i.parent.type)||"Keyword"===f.type&&t(f.value)||(c=f.loc.start.line>d,l=u.indexOf(d)>=0,"never"===s&&c&&!l&&e.report(i,a,{identifier:i.name}),"always"!==s||c&&!l||e.report(i,o,{identifier:i.name})))}var o="Expected blank line after variable declarations.",a="Unexpected blank line after variable declarations.",s="never"===e.options[0]?"never":"always",u=e.getAllComments().map(function(e){return e.loc.start.line});return{VariableDeclaration:i}},t.exports.schema=[{enum:["never","always"]}]},{}],187:[function(e,t,n){"use strict";function r(e){return/^(alert|confirm|prompt)$/.test(e)}function i(e,t,n){e.report(t,"Unexpected {{name}}.",{name:n})}function o(e){return e.computed?"Literal"===e.property.type?e.property.value:void 0:e.property.name}function a(e,t){var n=e.references.filter(function(e){return e.identifier.range[0]===t.range[0]&&e.identifier.range[1]===t.range[1]});if(1===n.length)return n[0]}function s(e,t){return e.variables.some(function(e){return e.name===t&&e.defs.length>0})}function u(e,t,n){var r=a(e,n),i=n.name;return!(!r||!r.resolved&&!s(t,i))}function c(e,t,n){return"global"===e.type&&"ThisExpression"===n.type||"window"===n.name&&!u(e,t,n)}t.exports=function(e){var t;return{Program:function(){t=e.getScope()},CallExpression:function(n){var a,s=n.callee,l=e.getScope();"Identifier"===s.type?(a=s.name,!u(l,t,s)&&r(s.name)&&i(e,n,a)):"MemberExpression"===s.type&&c(l,t,s.object)&&(a=o(s),r(a)&&i(e,n,a))}}},t.exports.schema=[]},{}],188:[function(e,t,n){"use strict";t.exports=function(e){function t(t){1!==t.arguments.length&&"Identifier"===t.callee.type&&"Array"===t.callee.name&&e.report(t,"The array literal notation [] is preferrable.")}return{CallExpression:t,NewExpression:t}},t.exports.schema=[]},{}],189:[function(e,t,n){"use strict";t.exports=function(e){function t(t){e.report(t,"Unexpected use of '{{operator}}'.",{operator:t.operator})}function n(e){return i.indexOf(e.operator)!==-1}function r(e){n(e)&&t(e)}var i=["^","|","&","<<",">>",">>>","^=","|=","&=","<<=",">>=",">>>=","~"];return{AssignmentExpression:r,BinaryExpression:r,UnaryExpression:r}},t.exports.schema=[]},{}],190:[function(e,t,n){"use strict";t.exports=function(e){return{MemberExpression:function(t){var n=t.object.name,r=t.property.name;"arguments"===n&&!t.computed&&r&&r.match(/^calle[er]$/)&&e.report(t,"Avoid arguments.{{property}}.",{property:r})}}},t.exports.schema=[]},{}],191:[function(e,t,n){"use strict";t.exports=function(e){function t(e,n){var r=e.variables.some(function(e){return e.name===n});return!!r||!!e.upper&&t(e.upper,n)}return{CatchClause:function(n){var r=e.getScope();t(r,n.param.name)&&e.report(n,"Value of '{{name}}' may be overwritten in IE 8 and earlier.",{name:n.param.name})}}},t.exports.schema=[]},{}],192:[function(e,t,n){"use strict";t.exports=function(e){function t(t){var n,r,i=t.properties||t.elements,o=i.length;o&&(n=i[o-1],n&&(r=e.getLastToken(t,1),","===r.value&&e.report(n,r.loc.start,"Trailing comma.")))}return{ObjectExpression:t,ArrayExpression:t}},t.exports.schema=[]},{}],193:[function(e,t,n){"use strict";var r={DoWhileStatement:"a 'do...while' statement",ForStatement:"a 'for' statement",IfStatement:"an 'if' statement",WhileStatement:"a 'while' statement"};t.exports=function(e){function t(e){return e.parent&&e.parent.test&&e===e.parent.test}function n(e){for(var n=e;n=n.parent;)if(t(n))return n.parent; return null}function i(t){var n=e.getTokenBefore(t),r=e.getTokenAfter(t);return"("===n.value&&n.range[1]<=t.range[0]&&")"===r.value&&r.range[0]>=t.range[1]}function o(t){var n=e.getTokenBefore(t,1),r=e.getTokenAfter(t,1);return i(t)&&"("===n.value&&n.range[1]<=t.range[0]&&")"===r.value&&r.range[0]>=t.range[1]}function a(t){t.test&&"AssignmentExpression"===t.test.type&&!o(t.test)&&e.report(t,"Expected a conditional expression and instead saw an assignment.")}function s(t){var i=n(t);i&&e.report(i,"Unexpected assignment within {{type}}.",{type:r[i.type]||i.type})}var u=e.options[0]||"except-parens";return"always"===u?{AssignmentExpression:s}:{DoWhileStatement:a,ForStatement:a,IfStatement:a,WhileStatement:a}},t.exports.schema=[{enum:["except-parens","always"]}]},{}],194:[function(e,t,n){"use strict";t.exports=function(e){return{MemberExpression:function(t){"console"===t.object.name&&e.report(t,"Unexpected console statement.")}}},t.exports.schema=[]},{}],195:[function(e,t,n){"use strict";t.exports=function(e){function t(e){switch(e.type){case"Literal":case"ArrowFunctionExpression":case"FunctionExpression":case"ObjectExpression":case"ArrayExpression":return!0;case"UnaryExpression":return t(e.argument);case"BinaryExpression":case"LogicalExpression":return t(e.left)&&t(e.right);case"AssignmentExpression":return"="===e.operator&&t(e.right);case"SequenceExpression":return t(e.expressions[e.expressions.length-1])}return!1}function n(n){n.test&&t(n.test)&&e.report(n,"Unexpected constant condition.")}return{ConditionalExpression:n,IfStatement:n,WhileStatement:n,DoWhileStatement:n,ForStatement:n}},t.exports.schema=[]},{}],196:[function(e,t,n){"use strict";t.exports=function(e){return{ContinueStatement:function(t){e.report(t,"Unexpected use of continue statement")}}},t.exports.schema=[]},{}],197:[function(e,t,n){"use strict";t.exports=function(e){function t(t){if(t.value instanceof RegExp)return t.value;if("string"!=typeof t.value)return null;var n=e.getAncestors().pop();if(("NewExpression"===n.type||"CallExpression"===n.type)&&"Identifier"===n.callee.type&&"RegExp"===n.callee.name)try{return new RegExp(t.value)}catch(e){return null}}return{Literal:function(n){var r,i=t(n);i&&(r=i.toString(),/[\x00-\x1f]/.test(r)&&e.report(n,"Unexpected control character in regular expression."))}}},t.exports.schema=[]},{}],198:[function(e,t,n){"use strict";t.exports=function(e){return{DebuggerStatement:function(t){e.report(t,"Unexpected 'debugger' statement.")}}},t.exports.schema=[]},{}],199:[function(e,t,n){"use strict";t.exports=function(e){return{UnaryExpression:function(t){"delete"===t.operator&&"Identifier"===t.argument.type&&e.report(t,"Variables should not be deleted.")}}},t.exports.schema=[]},{}],200:[function(e,t,n){"use strict";t.exports=function(e){return{Literal:function(t){var n=e.getFirstToken(t);"RegularExpression"===n.type&&"="===n.value[1]&&e.report(t,"A regular expression literal can be confused with '/='.")}}},t.exports.schema=[]},{}],201:[function(e,t,n){"use strict";t.exports=function(e){function t(t){function n(e){r.hasOwnProperty(e)?i[e]=1:r[e]=1}var r={},i={};t.params.forEach(function(e){switch(e.type){case"Identifier":n(e.name);break;case"ObjectPattern":e.properties.forEach(function(e){n(e.key.name)});break;case"ArrayPattern":e.elements.forEach(function(e){n(e.name)})}}),Object.keys(i).forEach(function(n){e.report(t,"Duplicate param '{{key}}'.",{key:n})})}return{FunctionDeclaration:t,FunctionExpression:t}},t.exports.schema=[]},{}],202:[function(e,t,n){"use strict";t.exports=function(e){return{ObjectExpression:function(t){var n=Object.create(null);t.properties.forEach(function(r){var i=r.key.name||r.key.value,o=r.kind+"-"+i,a=!r.computed||"Literal"===r.key.type;a&&(n[o]?e.report(t,"Duplicate key '{{key}}'.",{key:i}):n[o]=!0)})}}},t.exports.schema=[]},{}],203:[function(e,t,n){"use strict";t.exports=function(e){function t(e){return"Literal"===e.type?e.type+typeof e.value+e.value:"Identifier"===e.type?e.type+typeof e.name+e.name:"MemberExpression"===e.type?e.type+t(e.object)+t(e.property):"CallExpression"===e.type?e.type+t(e.callee)+e.arguments.map(t).join(""):"BinaryExpression"===e.type?e.type+t(e.left)+e.operator+t(e.right):"ConditionalExpression"===e.type?e.type+t(e.test)+t(e.consequent)+t(e.alternate):void 0}var n=[];return{SwitchStatement:function(){n.push({})},"SwitchStatement:exit":function(){n.pop()},SwitchCase:function(r){var i,o=n[n.length-1];r.test&&(i=t(r.test),"undefined"!=typeof i&&o.hasOwnProperty(i)?e.report(r,"Duplicate case label."):o[i]=!0)}}},t.exports.schema=[]},{}],204:[function(e,t,n){"use strict";t.exports=function(e){function t(t){e.report(t,"Unexpected 'else' after 'return'.")}function n(e){return"ReturnStatement"===e.type}function r(e){if("BlockStatement"===e.type){var t=e.body,r=t[t.length-1];return r&&n(r)}return n(e)}function i(e){return e.alternate&&e.consequent&&"IfStatement"!==e.alternate.type}function o(e){return"IfStatement"===e.type&&i(e)&&r(e.alternate)&&r(e.consequent)}function a(e,r){(n(e)||o(e))&&t(r)}return{IfStatement:function(e){if(i(e)){var t=e.consequent,n=e.alternate;if("BlockStatement"===t.type){var r=t.body;r.forEach(function(e){a(e,n)})}else a(t,n)}}}},t.exports.schema=[]},{}],205:[function(e,t,n){"use strict";var r=/^\/([^\\[]|\\.|\[([^\\\]]|\\.)+\])*\/[gimuy]*$/;t.exports=function(e){return{Literal:function(t){var n=e.getFirstToken(t);"RegularExpression"!==n.type||r.test(n.value)||e.report(t,"Empty class.")}}}},{}],206:[function(e,t,n){"use strict";var r=/^\/([^\\[]|\\.|\[([^\\\]]|\\.)+\])*\/[gimy]*$/;t.exports=function(e){return{Literal:function(t){var n=e.getFirstToken(t);"RegularExpression"!==n.type||r.test(n.value)||e.report(t,"Empty class.")}}},t.exports.schema=[]},{}],207:[function(e,t,n){"use strict";t.exports=function(e){return{LabeledStatement:function(t){var n=t.body.type;"ForStatement"!==n&&"WhileStatement"!==n&&"DoWhileStatement"!==n&&"SwitchStatement"!==n&&"ForInStatement"!==n&&"ForOfStatement"!==n&&e.report(t,"Unexpected label {{l}}",{l:t.label.name})}}},t.exports.schema=[]},{}],208:[function(e,t,n){"use strict";t.exports=function(e){return{BlockStatement:function(t){var n=t.parent,r=n.type;0===t.body.length&&"FunctionDeclaration"!==r&&"FunctionExpression"!==r&&"ArrowFunctionExpression"!==r&&(e.getComments(t).trailing.length>0||e.report(t,"Empty block statement."))},SwitchStatement:function(t){"undefined"!=typeof t.cases&&0!==t.cases.length||e.report(t,"Empty switch statement.")}}},t.exports.schema=[]},{}],209:[function(e,t,n){"use strict";t.exports=function(e){return{BinaryExpression:function(t){var n="=="===t.operator||"!="===t.operator;("Literal"===t.right.type&&"null"===t.right.raw&&n||"Literal"===t.left.type&&"null"===t.left.raw&&n)&&e.report(t,"Use ‘===’ to compare with ‘null’.")}}},t.exports.schema=[]},{}],210:[function(e,t,n){"use strict";t.exports=function(e){return{CallExpression:function(t){"eval"===t.callee.name&&e.report(t,"eval can be harmful.")}}},t.exports.schema=[]},{}],211:[function(e,t,n){"use strict";t.exports=function(e){var t=[];return{CatchClause:function(e){t.push(e.param.name)},"CatchClause:exit":function(){t.pop()},AssignmentExpression:function(n){if(t.length>0){var r=t[t.length-1];n.left.name&&n.left.name===r&&e.report(n,"Do not assign to the exception parameter.")}}}},t.exports.schema=[]},{}],212:[function(e,t,n){"use strict";var r=["Object","Function","Array","String","Boolean","Number","Date","RegExp","Error","EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"];t.exports=function(e){var t=e.options[0]||{},n=t.exceptions||[],i=r;return n.length&&(i=r.filter(function(e){return n.indexOf(e)===-1})),{AssignmentExpression:function(t){var n,r=t.left;"MemberExpression"===r.type&&"MemberExpression"===r.object.type&&(n=r.object.computed?"Literal"===r.object.property.type&&"prototype"===r.object.property.value:"prototype"===r.object.property.name,n&&i.forEach(function(n){r.object.object.name===n&&e.report(t,n+" prototype is read only, properties should not be added.")}))},CallExpression:function(t){var n,r,o=t.callee;"MemberExpression"===o.type&&"Object"===o.object.name&&"defineProperty"===o.property.name&&(n=t.arguments[0],r=n.object,r&&"Identifier"===r.type&&i.indexOf(r.name)>-1&&"prototype"===n.property.name&&e.report(t,r.name+" prototype is read only, properties should not be added."))}}},t.exports.schema=[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]},{}],213:[function(e,t,n){"use strict";t.exports=function(e){function t(){return i[i.length-1]}function n(){var e=t();e.depth++}function r(){var e=t();e.depth--}var i=[{depth:-1,found:0}];return{CallExpression:function(e){1===e.arguments.length&&"MemberExpression"===e.callee.type&&"bind"===e.callee.property.name&&/FunctionExpression$/.test(e.callee.object.type)&&i.push({call:e,depth:-1,found:0})},"CallExpression:exit":function(n){var r=t();r.call===n&&0===r.found&&(e.report(n,"The function binding is unnecessary."),i.pop())},ArrowFunctionExpression:n,"ArrowFunctionExpression:exit":r,FunctionExpression:n,"FunctionExpression:exit":r,FunctionDeclaration:n,"FunctionDeclaration:exit":r,ThisExpression:function(){var e=t();0===e.depth&&e.found++}}},t.exports.schema=[]},{}],214:[function(e,t,n){"use strict";t.exports=function(e){return{UnaryExpression:function(t){var n=e.getAncestors(),r=n.pop(),i=n.pop();"!"===t.operator&&"UnaryExpression"===r.type&&"!"===r.operator&&("IfStatement"===i.type?e.report(t,"Redundant double negation in an if statement condition."):"DoWhileStatement"===i.type?e.report(t,"Redundant double negation in a do while loop condition."):"WhileStatement"===i.type?e.report(t,"Redundant double negation in a while loop condition."):"ConditionalExpression"===i.type&&r===i.test?e.report(t,"Redundant double negation in a ternary condition."):"ForStatement"===i.type&&r===i.test?e.report(t,"Redundant double negation in a for loop condition."):"UnaryExpression"===i.type&&"!"===i.operator?e.report(t,"Redundant multiple negation."):"CallExpression"===i.type&&"Identifier"===i.callee.type&&"Boolean"===i.callee.name?e.report(t,"Redundant double negation in call to Boolean()."):"NewExpression"===i.type&&"Identifier"===i.callee.type&&"Boolean"===i.callee.name&&e.report(t,"Redundant double negation in Boolean constructor call."))}}},t.exports.schema=[]},{}],215:[function(e,t,n){"use strict";t.exports=function(e){function t(e){return p||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type}function n(t){var n=e.getTokenBefore(t),r=e.getTokenAfter(t);return n&&r&&"("===n.value&&n.range[1]<=t.range[0]&&")"===r.value&&r.range[0]>=t.range[1]}function r(t){var r=e.getTokenBefore(t,1),i=e.getTokenAfter(t,1);return n(t)&&r&&i&&"("===r.value&&r.range[1]<=t.range[0]&&")"===i.value&&i.range[0]>=t.range[1]}function i(e){return t(e)&&n(e)}function o(e){return t(e)&&r(e)}function a(e){switch(e.type){case"SequenceExpression":return 0;case"AssignmentExpression":case"ArrowFunctionExpression":case"YieldExpression":return 1;case"ConditionalExpression":return 3;case"LogicalExpression":switch(e.operator){case"||":return 4;case"&&":return 5}case"BinaryExpression":switch(e.operator){case"|":return 6;case"^":return 7;case"&":return 8;case"==":case"!=":case"===":case"!==":return 9;case"<":case"<=":case">":case">=":case"in":case"instanceof":return 10;case"<<":case">>":case">>>":return 11;case"+":case"-":return 12;case"*":case"/":case"%":return 13}case"UnaryExpression":return 14;case"UpdateExpression":return 15;case"CallExpression":return"FunctionExpression"===e.callee.type?-1:16;case"NewExpression":return 17}return 18}function s(t){var n=e.getTokenBefore(t);e.report(t,n.loc.start,"Gratuitous parentheses around expression.")}function u(e){i(e.argument)&&a(e.argument)>=a(e)&&s(e.argument)}function c(e){i(e.callee)&&a(e.callee)>=a(e)&&("CallExpression"!==e.type||"FunctionExpression"!==e.callee.type||o(e.callee))&&s(e.callee),1===e.arguments.length?o(e.arguments[0])&&a(e.arguments[0])>=a({type:"AssignmentExpression"})&&s(e.arguments[0]):[].forEach.call(e.arguments,function(e){i(e)&&a(e)>=a({type:"AssignmentExpression"})&&s(e)})}function l(e){var t=a(e);i(e.left)&&a(e.left)>=t&&s(e.left),i(e.right)&&a(e.right)>t&&s(e.right)}var p="functions"!==e.options[0];return{ArrayExpression:function(e){[].forEach.call(e.elements,function(e){e&&i(e)&&a(e)>=a({type:"AssignmentExpression"})&&s(e)})},ArrowFunctionExpression:function(e){if("BlockStatement"!==e.body.type){if("ObjectExpression"!==e.body.type&&i(e.body)&&a(e.body)>=a({type:"AssignmentExpression"}))return void s(e.body);if("ObjectExpression"===e.body.type&&o(e.body))return void s(e.body)}},AssignmentExpression:function(e){i(e.right)&&a(e.right)>=a(e)&&s(e.right)},BinaryExpression:l,CallExpression:c,ConditionalExpression:function(e){i(e.test)&&a(e.test)>=a({type:"LogicalExpression",operator:"||"})&&s(e.test),i(e.consequent)&&a(e.consequent)>=a({type:"AssignmentExpression"})&&s(e.consequent),i(e.alternate)&&a(e.alternate)>=a({type:"AssignmentExpression"})&&s(e.alternate)},DoWhileStatement:function(e){o(e.test)&&s(e.test)},ExpressionStatement:function(t){var n;i(t.expression)&&"CallExpression"!==t.expression.type&&(n=e.getFirstToken(t.expression),"{"===n.value&&"ObjectExpression"!==t.expression.type||s(t.expression))},ForInStatement:function(e){i(e.right)&&s(e.right)},ForOfStatement:function(e){i(e.right)&&s(e.right)},ForStatement:function(e){e.init&&i(e.init)&&s(e.init),e.test&&i(e.test)&&s(e.test),e.update&&i(e.update)&&s(e.update)},IfStatement:function(e){o(e.test)&&s(e.test)},LogicalExpression:l,MemberExpression:function(t){i(t.object)&&a(t.object)>=a(t)&&(t.computed||!("Literal"===t.object.type&&"number"==typeof t.object.value&&/^[0-9]+$/.test(e.getFirstToken(t.object).value)||"Literal"===t.object.type&&t.object.regex))&&s(t.object),t.computed&&i(t.property)&&s(t.property)},NewExpression:c,ObjectExpression:function(e){[].forEach.call(e.properties,function(e){var t=e.value;t&&i(t)&&a(t)>=a({type:"AssignmentExpression"})&&s(t)})},ReturnStatement:function(e){!e.argument||!i(e.argument)||"Literal"===e.argument.type&&e.argument.regex||s(e.argument)},SequenceExpression:function(e){[].forEach.call(e.expressions,function(t){i(t)&&a(t)>=a(e)&&s(t)})},SwitchCase:function(e){e.test&&i(e.test)&&s(e.test)},SwitchStatement:function(e){o(e.discriminant)&&s(e.discriminant)},ThrowStatement:function(e){i(e.argument)&&s(e.argument)},UnaryExpression:u,UpdateExpression:u,VariableDeclarator:function(e){e.init&&i(e.init)&&a(e.init)>=a({type:"AssignmentExpression"})&&("Literal"!==e.init.type||!e.init.regex)&&s(e.init)},WhileStatement:function(e){o(e.test)&&s(e.test)},WithStatement:function(e){o(e.object)&&s(e.object)}}},t.exports.schema=[{enum:["all","functions"]}]},{}],216:[function(e,t,n){"use strict";t.exports=function(e){return{EmptyStatement:function(t){e.report(t,"Unnecessary semicolon.")}}},t.exports.schema=[]},{}],217:[function(e,t,n){"use strict";t.exports=function(e){function t(e){var t,n,r,i=[],o=e.body;if(o)for(n=0,r=o.length;n=0;i--)if(/(?:Break|Continue|Return|Throw)Statement/.test(s[i].type)){u.lastCaseClosed=!0;break}}else u.lastCaseClosed=!0},SwitchStatement:function(e){t.push({node:e,lastCaseClosed:!0,lastCase:null})},"SwitchStatement:exit":function(){t.pop()}}},t.exports.schema=[]},{}],219:[function(e,t,n){"use strict";t.exports=function(e){return{Literal:function(t){"number"==typeof t.value&&(0===t.raw.indexOf(".")&&e.report(t,"A leading decimal point can be confused with a dot."),t.raw.indexOf(".")===t.raw.length-1&&e.report(t,"A trailing decimal point can be confused with a dot."))}}},t.exports.schema=[]},{}],220:[function(e,t,n){"use strict";t.exports=function(e){function t(e,n){var r,i,o,a;for(o=0;o=t.line&&r.line<=n.line&&r.column>=t.column&&(r.column<=n.column||r.line0&&o[o.length-1]===e&&(o.pop(),t(e))}}),e.ecmaFeatures.blockBindings&&(i.VariableDeclaration=function(e){"let"!==e.kind&&"const"!==e.kind||r(e)},i.FunctionDeclaration=function(t){e.getScope().isStrict&&r(t)}),e.ecmaFeatures.classes&&(i.ClassDeclaration=r),i},t.exports.schema=[]},{}],230:[function(e,t,n){"use strict";t.exports=function(e){return{IfStatement:function(t){var n=e.getAncestors(),r=n.pop(),i=n.pop();r&&"BlockStatement"===r.type&&1===r.body.length&&i&&"IfStatement"===i.type&&r===i.alternate&&e.report(t,"Unexpected if as the only statement in an else block.")}}},t.exports.schema=[]},{}],231:[function(e,t,n){"use strict";t.exports=function(e){function t(t){function n(e,t){switch(e.type){case"ForStatement":return e.init!==r[t+1];case"ForInStatement":case"ForOfStatement":return e.right!==r[t+1];case"WhileStatement":case"DoWhileStatement":return!0;default:return!1}}var r=e.getAncestors();r.some(n)&&e.report(t,"Don't make functions within a loop")}return{ArrowFunctionExpression:t,FunctionExpression:t,FunctionDeclaration:t}},t.exports.schema=[]},{}],232:[function(e,t,n){"use strict";t.exports=function(e){function t(){return["assert","buffer","child_process","cluster","crypto","dgram","dns","domain","events","fs","http","https","net","os","path","punycode","querystring","readline","repl","smalloc","stream","string_decoder","tls","tty","url","util","v8","vm","zlib"]}function n(e){return e?"CallExpression"===e.type&&"Identifier"===e.callee.type&&"require"===e.callee.name?s:"MemberExpression"===e.type?n(e.object):c:u}function r(e){if("MemberExpression"===e.type)return r(e.object);if(0===e.arguments.length)return d;var t=e.arguments[0];return"Literal"!==t.type||"string"!=typeof t.value?d:a.indexOf(t.value)!==-1?l:/^\.{0,2}\//.test(t.value)?p:f}function i(e){var t={};return e.forEach(function(e){var r=n(e.init);t[r]=!0}),!(!t[s]||!t[u]&&!t[c])}function o(e){var t={};return e.forEach(function(e){n(e.init)===s&&(t[r(e.init)]=!0)}),Object.keys(t).length<=1}var a=t(),s="require",u="uninitialized",c="other",l="core",p="file",f="module",d="computed";return{VariableDeclaration:function(t){var n=!!e.options[0];i(t.declarations)?e.report(t,"Do not mix 'require' and other declarations."):n&&!o(t.declarations)&&e.report(t,"Do not mix core, module, file and computed requires.")}}},t.exports.schema=[{type:"boolean"}]},{}],233:[function(e,t,n){"use strict";t.exports=function(e){var t;switch(e.options[0]){case!0:case"smart-tabs":t=!0;break;default:t=!1}var n=/^\s*\/\*/,r=/^\s*\*/;return{Program:function(i){var o,a=/^(?=[\t ]*(\t | \t))/,s=e.getSourceLines();t&&(a=/^(?=[\t ]* \t)/),s.forEach(function(t,u){o=a.exec(t),o&&(r.test(t)||n.test(s[u-1])||e.report(i,{line:u+1,column:o.index+1},"Mixed spaces and tabs."))})}}},t.exports.schema=[{enum:["smart-tabs",!0,!1]}]},{}],234:[function(e,t,n){"use strict";t.exports=function(e){function t(e,t){for(var n;on.range[1]))break;o++}return!1}var n={Property:!0},r=!0,i=e.options[0],o=0;return i&&i.exceptions&&(Object.keys(i.exceptions).forEach(function(e){i.exceptions[e]?n[e]=!0:delete n[e]}),r=Object.keys(n).length>0),{Program:function(){for(var i,o,a=e.getSource(),s=e.getAllComments(),u=/[^\n\r\u2028\u2029 ] {2,}/g;u.test(a);)t(u.lastIndex,s)||(i=e.getTokenByRangeStart(u.lastIndex),i&&(r&&(o=e.getNodeByRangeIndex(u.lastIndex-1)),o&&n[o.type]||e.report(i,i.loc.start,"Multiple spaces found before '{{value}}'.",{value:i.value})))}}},t.exports.schema=[{type:"object",properties:{exceptions:{type:"object",patternProperties:{"^([A-Z][a-z]*)+$":{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]},{}],235:[function(e,t,n){"use strict";t.exports=function(e){function t(e){return 0===e.type.indexOf("JSX")}return{Literal:function(n){var r=/\n/;r.test(n.raw)&&!t(n.parent)&&e.report(n,"Multiline support is limited to browsers supporting ES5 only.")}}},t.exports.schema=[]},{}],236:[function(e,t,n){"use strict";t.exports=function(e){var t=2,n=[];return e.options.length&&(t=e.options[0].max),{TemplateLiteral:function(e){for(var t=e.loc.start.line,r=e.loc.end.line;t<=r;)n.push(t),t++},"Program:exit":function(r){var i,o,a=e.getSourceLines(),s=-1,u=0,c=a.map(function(e){return e.trim()});for(n.forEach(function(e,t){c[t]=e}),""===c[c.length-1]&&(c=c.slice(0,-1)),i=s,s=c.indexOf("",s+1);s!==-1;)i=s,s=c.indexOf("",s+1),i===s-1?u++:(u>=t&&(o={line:i+1,column:a[i].length},e.report(r,o,"Multiple blank lines not allowed.")),u=0)}}},t.exports.schema=[{type:"object",properties:{max:{type:"integer"}},required:["max"],additionalProperties:!1}]},{}],237:[function(e,t,n){"use strict";t.exports=function(e){var t=["Array","Boolean","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Function","isFinite","isNaN","JSON","Math","Number","Object","parseInt","parseFloat","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","Map","NaN","Set","WeakMap","Infinity","undefined"],n=e.options[0]||{},r=n.exceptions||[],i=t;return r.length&&(i=t.filter(function(e){return r.indexOf(e)===-1})),{AssignmentExpression:function(t){i.indexOf(t.left.name)>=0&&e.report(t,t.left.name+" is a read-only native object.")},VariableDeclarator:function(t){i.indexOf(t.id.name)>=0&&e.report(t,"Redefinition of '{{nativeObject}}'.",{nativeObject:t.id.name})}}},t.exports.schema=[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]},{}],238:[function(e,t,n){"use strict";t.exports=function(e){return{BinaryExpression:function(t){"in"===t.operator&&"UnaryExpression"===t.left.type&&"!"===t.left.operator&&e.report(t,"The `in` expression's left operand is negated")}}},t.exports.schema=[]},{}],239:[function(e,t,n){"use strict";t.exports=function(e){return{ConditionalExpression:function(t){"ConditionalExpression"!==t.alternate.type&&"ConditionalExpression"!==t.consequent.type||e.report(t,"Do not nest ternary expressions")}}},t.exports.schema=[]},{}],240:[function(e,t,n){"use strict";t.exports=function(e){return{NewExpression:function(t){"Function"===t.callee.name&&e.report(t,"The Function constructor is eval.")}}},t.exports.schema=[]},{}],241:[function(e,t,n){"use strict";t.exports=function(e){return{NewExpression:function(t){"Object"===t.callee.name&&e.report(t,"The object literal notation {} is preferrable.")}}},t.exports.schema=[]},{}],242:[function(e,t,n){"use strict";t.exports=function(e){return{NewExpression:function(t){"Identifier"===t.callee.type&&"require"===t.callee.name&&e.report(t,"Unexpected use of new with require.")}}},t.exports.schema=[]},{}],243:[function(e,t,n){"use strict";t.exports=function(e){return{NewExpression:function(t){var n=["String","Number","Boolean","Math","JSON"];n.indexOf(t.callee.name)>-1&&e.report(t,"Do not use {{fn}} as a constructor.",{fn:t.callee.name})}}},t.exports.schema=[]},{}],244:[function(e,t,n){"use strict";t.exports=function(e){return{ExpressionStatement:function(t){"NewExpression"===t.expression.type&&e.report(t,"Do not use 'new' for side effects.")}}},t.exports.schema=[]},{}],245:[function(e,t,n){"use strict";t.exports=function(e){return{CallExpression:function(t){if("Identifier"===t.callee.type){var n=t.callee.name;"Math"!==n&&"JSON"!==n||e.report(t,"'{{name}}' is not a function.",{name:n})}}}},t.exports.schema=[]},{}],246:[function(e,t,n){"use strict";t.exports=function(e){return{Literal:function(t){if("string"==typeof t.value){var n,r=t.raw.match(/^([^\\]|\\[^0-7])*\\([0-3][0-7]{1,2}|[4-7][0-7]|[0-7])/);r&&(n=r[2],"0"===r[2]&&"undefined"==typeof r[3]||e.report(t,"Don't use octal: '\\{{octalDigit}}'. Use '\\u....' instead.",{octalDigit:n}))}}}},t.exports.schema=[]},{}],247:[function(e,t,n){"use strict";t.exports=function(e){return{Literal:function(t){"number"==typeof t.value&&/^0[0-7]/.test(t.raw)&&e.report(t,"Octal literals should not be used.")}}},t.exports.schema=[]},{}],248:[function(e,t,n){"use strict";t.exports=function(e){function t(e,n){for(var r=e.variables,i=0;i1){t.identifiers.sort(function(e,t){return e.range[1]-t.range[1]});for(var n=1,r=t.identifiers.length;n","<",">=","<="];n.indexOf(t.operator)>-1&&("Identifier"===t.left.type&&"Identifier"===t.right.type&&t.left.name===t.right.name||"Literal"===t.left.type&&"Literal"===t.right.type&&t.left.value===t.right.value)&&e.report(t,"Comparing to itself is potentially pointless.")}}},t.exports.schema=[]},{}],261:[function(e,t,n){"use strict";t.exports=function(e){function t(e){return e.parent&&null!=i[e.parent.type]&&e===e.parent[i[e.parent.type]]}function n(t){var n=e.getTokenBefore(t),r=e.getTokenAfter(t);return n&&r&&"("===n.value&&n.range[1]<=t.range[0]&&")"===r.value&&r.range[0]>=t.range[1]}function r(t){var r=e.getTokenBefore(t,1),i=e.getTokenAfter(t,1);return n(t)&&r&&i&&"("===r.value&&r.range[1]<=t.range[0]&&")"===i.value&&i.range[0]>=t.range[1]}var i={DoWhileStatement:"test",IfStatement:"test",SwitchStatement:"discriminant",WhileStatement:"test",WithStatement:"object"};return{SequenceExpression:function(i){if("ForStatement"!==i.parent.type||i!==i.parent.init&&i!==i.parent.update){if(t(i)){if(r(i))return}else if(n(i))return;e.report(i,"Unexpected use of comma operator.")}}}},t.exports.schema=[]},{}],262:[function(e,t,n){"use strict";t.exports=function(e){function t(t){n.indexOf(t.name)>-1&&e.report(t,'Shadowing of global property "'+t.name+'".')}var n=["undefined","NaN","Infinity","arguments","eval"];return{VariableDeclarator:function(e){t(e.id)},ArrowFunctionExpression:function(e){e.id&&t(e.id),[].map.call(e.params,t)},FunctionExpression:function(e){e.id&&t(e.id),[].map.call(e.params,t)},FunctionDeclaration:function(e){e.id&&(t(e.id),[].map.call(e.params,t))},CatchClause:function(e){t(e.param)}}},t.exports.schema=[]},{}],263:[function(e,t,n){"use strict";t.exports=function(e){function t(e){var t=e.scope.block;return"ClassDeclaration"===t.type&&t.id===e.identifiers[0]}function n(e,t){var n=t.scope,r=t.defs[0],i=r&&r.parent&&r.parent.range,o=e.scope,a=e.defs[0],s=a&&a.name.range;return null!=i&&null!=s&&i[0]0&&e.name===r.name&&!t(r)&&!n(e,r)&&!("all"!==u.hoist&&i(e,r))})}function a(t,n){var r=[];return t.forEach(function(t){t.identifiers.length>0&&o(t,n.variables)?e.report(t.identifiers[0],"{{name}} is already declared in the upper scope.",{name:t.name}):r.push(t)}),r}function s(e){for(var n=e.variables.filter(function(e){return e.identifiers.length>0&&!t(e)}),r=e.upper;r&&n.length;)n=a(n,r),r=r.upper}var u={hoist:e.options[0]&&e.options[0].hoist||"functions"};return{"Program:exit":function(){for(var t,n=e.getScope(),r=n.childScopes.slice();r.length;)t=r.pop(),r.push.apply(r,t.childScopes),s(t)}}},t.exports.schema=[{type:"object",properties:{hoist:{enum:["all","functions","never"]}}}]},{}],264:[function(e,t,n){"use strict";t.exports=function(e){function t(e,t){return e.range[1]=o||r[i-1].range[1]!==r[i].range[0]&&e.report(t,"Unexpected space between function name and paren.")}return{CallExpression:t,NewExpression:t}},t.exports.schema=[]},{}],266:[function(e,t,n){"use strict";t.exports=function(e){return{ArrayExpression:function(t){var n=t.elements.indexOf(null)>-1;n&&e.report(t,"Unexpected comma in middle of array.")}}},t.exports.schema=[]},{}],267:[function(e,t,n){"use strict";t.exports=function(e){return{MemberExpression:function(t){var n=t.property.name,r=/.*Sync$/;null!==r.exec(n)&&e.report(t,"Unexpected sync method: '"+n+"'.")}}},t.exports.schema=[]},{}],268:[function(e,t,n){"use strict";t.exports=function(e){return{ConditionalExpression:function(t){e.report(t,"Ternary operator used.")}}},t.exports.schema=[]},{}],269:[function(e,t,n){"use strict";t.exports=function(e){return{ThrowStatement:function(t){"Literal"===t.argument.type?e.report(t,"Do not throw a literal."):"Identifier"===t.argument.type&&"undefined"===t.argument.name&&e.report(t,"Do not throw undefined.")}}},t.exports.schema=[]},{}],270:[function(e,t,n){"use strict";t.exports=function(e){var t="[ \t  -​\u2028\u2029 ]",n="^"+t+"*$",r=t+"$",i=e.options[0]||{},o=i.skipBlankLines||!1;return{Program:function(t){for(var i,a,s=e.getSource(),u=new RegExp(r),c=new RegExp(n),l=s.split(/\r?\n/),p=0,f=l.length;p=0;o--){if(a=s[i][o],a===n)return;t(a)||r(e,a,n.type)}}return{ReturnStatement:n,ThrowStatement:n,ContinueStatement:n,BreakStatement:n}},t.exports.schema=[]},{}],277:[function(e,t,n){"use strict";t.exports=function(e){function t(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value}function n(e,t){for(var n=0,r=t.length;n=0}return{ExpressionStatement:function(t){var n=t.expression.type,r=e.getAncestors();/^(?:Assignment|Call|New|Update|Yield)Expression$/.test(n)||!("UnaryExpression"!==n||["delete","void"].indexOf(t.expression.operator)<0)||i(t,r)||e.report(t,"Expected an assignment or function call and instead saw an expression.")}}},t.exports.schema=[]},{}],278:[function(e,t,n){"use strict";t.exports=function(e){function t(e){var t=e.defs[0];if(t){var n=t.node;if("VariableDeclarator"===n.type)n=n.parent;else if("Parameter"===t.type&&"FunctionDeclaration"===n.type)return!1;return 0===n.parent.type.indexOf("Export")}return!1}function n(e){return e.isRead()}function r(e,t){for(var n=e.from;null!=n;){if(t.indexOf(n.block)>=0)return!0;n=n.upper}return!1}function i(e,t){var i=e.defs.filter(function(e){return"FunctionName"===e.type}).map(function(e){return e.node}),o=i.length>0;return t.some(function(e){return n(e)&&!(o&&r(e,i))})}function o(e){var t=Object.create(null);if("all"===u.vars)for(var r=0,i=e.through.length;r0&&e.report(l.identifiers[0],s,l)}}}},t.exports.schema=[{oneOf:[{enum:["all","local"]},{type:"object",properties:{vars:{enum:["all","local"]},args:{enum:["all","after-used","none"]}}}]}]},{}],279:[function(e,t,n){"use strict";var r="nofunc";t.exports=function(e){function t(e,n){for(var r=0,i=n.variables.length;rt.identifier.range[1]&&e.report(t.identifier,"{{a}} was used before it was defined",{a:t.identifier.name})}var o=e.options[0];n.references.forEach(function(e){if(e.resolved&&e.resolved.identifiers.length>0)i(e,e.resolved);else{var r=t(e.identifier.name,n);r&&0!==r.identifiers.length&&i(e,r)}})}function i(){var t=e.getScope();n(t)}return{Program:function(){var t=e.getScope();n(t),(e.ecmaFeatures.globalReturn||e.ecmaFeatures.modules)&&n(t.childScopes[0])},FunctionExpression:i,FunctionDeclaration:i,ArrowFunctionExpression:i}},t.exports.schema=[{enum:["nofunc"]}]},{}],280:[function(e,t,n){"use strict";t.exports=function(e){return{VariableDeclaration:function(t){"var"===t.kind&&e.report(t,"Unexpected var, use let or const instead.")}}},t.exports.schema=[]},{}],281:[function(e,t,n){"use strict";t.exports=function(e){return{UnaryExpression:function(t){"void"===t.operator&&e.report(t,"Expected 'undefined' and instead saw 'void'.")}}},t.exports.schema=[]},{}],282:[function(e,t,n){"use strict";t.exports=function(e){function t(e){var t,n=e.replace(/[-\/\\$\^*+?.()|\[\]{}]/g,"\\$&"),r=/\w$/.test(e)?"\\b":"";return t="start"===s?"^\\s*":/^\w/.test(e)?"\\b":"",new RegExp(t+n+r,"i")}function n(e){var t=[];return i.forEach(function(n,r){n.test(e)&&t.push(a[r])}),t}function r(t){var r=n(t.value);r.forEach(function(n){e.report(t,"Unexpected "+n+" comment.")})}var i,o=e.options[0]||{},a=o.terms||["todo","fixme","xxx"],s=o.location||"start";return i=a.map(t),{BlockComment:r,LineComment:r}},t.exports.schema=[{type:"object",properties:{terms:{type:"array",items:{type:"string"}},location:{enum:["start","anywhere"]}},additionalProperties:!1}]},{}],283:[function(e,t,n){"use strict";t.exports=function(e){return{WithStatement:function(t){e.report(t,"Unexpected use of 'with' statement.")}}},t.exports.schema=[]},{}],284:[function(e,t,n){"use strict";t.exports=function(e){function t(t){var n,r,i;"ArrowFunctionExpression"===t.type&&/(?:Call|New|Logical|Binary|Conditional|Update)Expression/.test(t.parent.type)||"MemberExpression"===t.parent.type&&t.parent.object===t||(i=/CallExpression|NewExpression/.test(t.parent.type),i&&t.parent.callee===t||(n=e.getTokenBefore(t),r=e.getTokenAfter(t),i&&t.parent.callee.range[1]===n.range[0]||"("===n.value&&")"===r.value&&e.report(t,"Wrapping non-IIFE function literals in parens is unnecessary.")))}return{ArrowFunctionExpression:t,FunctionExpression:t}},t.exports.schema=[]},{}],285:[function(e,t,n){"use strict";t.exports=function(e){function t(t){return null!=e.options[1]&&e.options[1][t]===!c}function n(e,t){return e.range[1]0&&r.uninitialized===c&&i.uninitialized)&&(!(n.initialized>0&&r.initialized===c&&i.initialized)&&(o(e,t,i),!0)))}var c="always",l="never",p=e.options[0],f={};"string"==typeof p?(f.var={uninitialized:p,initialized:p},f.let={uninitialized:p,initialized:p},f.const={uninitialized:p,initialized:p}):"object"==typeof p&&(p.hasOwnProperty("var")&&"string"==typeof p.var&&(f.var={uninitialized:p.var,initialized:p.var}),p.hasOwnProperty("let")&&"string"==typeof p.let&&(f.let={uninitialized:p.let,initialized:p.let}),p.hasOwnProperty("const")&&"string"==typeof p.const&&(f.const={uninitialized:p.const,initialized:p.const}),p.hasOwnProperty("uninitialized")&&(f.var||(f.var={}),f.let||(f.let={}),f.const||(f.const={}),f.var.uninitialized=p.uninitialized,f.let.uninitialized=p.uninitialized,f.const.uninitialized=p.uninitialized),p.hasOwnProperty("initialized")&&(f.var||(f.var={}),f.let||(f.let={}),f.const||(f.const={}),f.var.initialized=p.initialized,f.let.initialized=p.initialized,f.const.initialized=p.initialized));var d=[],h=[];return{Program:n,FunctionDeclaration:n,FunctionExpression:n,ArrowFunctionExpression:n,BlockStatement:t,ForStatement:t,SwitchStatement:t,VariableDeclaration:function(t){var n,r,i,o=t.parent;if(n=t.kind,f[n]&&(r=t.declarations,i=s(r),u(n,r)||(f[n].initialized===c&&f[n].uninitialized===c?e.report(t,"Combine this with the previous '"+n+"' statement."):(f[n].initialized===c&&e.report(t,"Combine this with the previous '"+n+"' statement with initialized variables."),f[n].uninitialized===c&&e.report(t,"Combine this with the previous '"+n+"' statement with uninitialized variables."))),"ForStatement"!==o.type||o.init!==t)){var a=i.uninitialized+i.initialized;a>1&&(f[n].initialized===l&&f[n].uninitialized===l?e.report(t,"Split '"+n+"' declarations into multiple statements."):f[n].initialized===l&&i.initialized>0?e.report(t,"Split initialized '"+n+"' declarations into multiple statements."):f[n].uninitialized===l&&i.uninitialized>0&&e.report(t,"Split uninitialized '"+n+"' declarations into multiple statements."))}},"ForStatement:exit":r,"SwitchStatement:exit":r,"BlockStatement:exit":r,"Program:exit":i,"FunctionDeclaration:exit":i,"FunctionExpression:exit":i,"ArrowFunctionExpression:exit":i}},t.exports.schema=[{oneOf:[{enum:["always","never"]},{type:"object",properties:{var:{enum:["always","never"]},let:{enum:["always","never"]},const:{enum:["always","never"]}},additionalProperties:!1},{type:"object",properties:{initialized:{enum:["always","never"]},uninitialized:{enum:["always","never"]}},additionalProperties:!1}]}]},{}],288:[function(e,t,n){"use strict";function r(e){return["*","&","^","|"].indexOf(e)>=0}function i(e){return["+","-","/","%","<<",">>",">>>"].indexOf(e)>=0}function o(e,t){if(e.type!==t.type)return!1;switch(e.type){case"Identifier":return e.name===t.name;case"Literal":return e.value===t.value;case"MemberExpression":return o(e.object,t.object)&&o(e.property,t.property);default:return!1}}t.exports=function(e){function t(t){var n,a,s;"="===t.operator&&"BinaryExpression"===t.right.type&&(a=t.left,n=t.right,s=n.operator,r(s)?(o(a,n.left)||o(a,n.right))&&e.report(t,"Assignment can be replaced with operator assignment."):i(s)&&o(a,n.left)&&e.report(t,"Assignment can be replaced with operator assignment."))}function n(t){"="!==t.operator&&e.report(t,"Unexpected operator assignment shorthand.")}return{AssignmentExpression:"never"!==e.options[0]?t:n}},t.exports.schema=[{enum:["always","never"]}]},{}],289:[function(e,t,n){"use strict";t.exports=function(e){function t(e,t){return e.loc.end.line===t.loc.start.line}function n(n){for(var i=e.getLastToken(n.left||n.id),o=e.getTokenAfter(i);")"===o.value;)i=o,o=e.getTokenAfter(o);var a=e.getTokenAfter(o),s=o.value;t(i,o)&&t(o,a)||(t(i,o)||t(o,a)?"before"===r&&t(i,o)?e.report(n,{line:o.loc.end.line,column:o.loc.end.column},"'"+s+"' should be placed at the beginning of the line."):"after"===r&&t(o,a)?e.report(n,{line:o.loc.end.line,column:o.loc.end.column},"'"+s+"' should be placed at the end of the line."):"none"===r&&e.report(n,{line:o.loc.end.line,column:o.loc.end.column},"There should be no line break before or after '"+s+"'"):e.report(n,{line:o.loc.end.line,column:o.loc.end.column},"Bad line breaking before and after '"+s+"'."))}var r=e.options[0]||"after";return{BinaryExpression:n,LogicalExpression:n,AssignmentExpression:n,VariableDeclarator:function(e){e.init&&n(e)}}},t.exports.schema=[{enum:["after","before","none"]}]},{}],290:[function(e,t,n){"use strict";t.exports=function(e){function t(t){var n=t.loc.start.line,r=t.body[0],i=r.loc.start.line,o=n+2,a=e.getComments(r).leading;return a.length>0&&(i=a[0].loc.start.line),o<=i}function n(t){var n=t.loc.end.line,r=t.body[t.body.length-1],i=e.getLastToken(r).loc.end.line,o=n-2,a=e.getComments(r).trailing;return a.length>0&&(i=a[a.length-1].loc.end.line),i<=o}function r(r){if(r.body.length>0){var s=t(r),u=n(r);i?(s||e.report(r,o),u||e.report(r,r.loc.end,o)):(s&&e.report(r,a),u&&e.report(r,r.loc.end,a))}}var i="never"!==e.options[0],o="Block must be padded by blank lines.",a="Block must not be padded by blank lines.";return{BlockStatement:r}},t.exports.schema=[{enum:["always","never"]}]},{}],291:[function(e,t,n){"use strict";t.exports=function(e){function t(e){return e.init===!0}function n(e){return e.isReadOnly()||e.init===!0}function r(r){if("TDZ"!==r.type)for(var i=r.variables,o=0,a=i.length;o=0||"Numeric"===n[0].type&&""+ +n[0].value===n[0].value)&&e.report(t,"Unnecessarily quoted property `{{value}}` found.",i)}}function n(t){var n=t.key;t.method||"Literal"===n.type&&"string"==typeof n.value||e.report(t,"Unquoted property `{{key}}` found.",{key:n.name||n.value})}var i=e.options[0];return{Property:"as-needed"===i?t:n}},t.exports.schema=[{enum:["always","as-needed"]}]},{espree:"espree"}],293:[function(e,t,n){"use strict";var r={double:{quote:'"',alternateQuote:"'",description:"doublequote"},single:{quote:"'",alternateQuote:'"',description:"singlequote"},backtick:{quote:"`",alternateQuote:'"',description:"backtick"}},i="avoid-escape";t.exports=function(e){function t(e,t){return e[0]===t&&e[e.length-1]===t}function n(e){return 0===e.type.indexOf("JSX")}return{Literal:function(o){var a,s=o.value,u=o.raw,c=e.options[0],l=r[c||"double"],p=e.options[1]===i;l&&"string"==typeof s&&(a=n(o.parent)||t(u,l.quote),!a&&p&&(a=t(u,l.alternateQuote)&&u.indexOf(l.quote)>=0),a||e.report(o,"Strings must use "+l.description+"."))}}},t.exports.schema=[{enum:["single","double","backtick"]},{enum:["avoid-escape"]}]},{}],294:[function(e,t,n){"use strict";t.exports=function(e){return{CallExpression:function(t){var n;"parseInt"===t.callee.name&&(t.arguments.length<2?e.report(t,"Missing radix parameter."):(n=t.arguments[1],("Literal"===n.type&&"number"!=typeof n.value||"Identifier"===n.type&&"undefined"===n.name)&&e.report(t,"Invalid radix parameter.")))}}},t.exports.schema=[]},{}],295:[function(e,t,n){"use strict";t.exports=function(e){function t(e,t){return e.range[1]0?(n=o[0],i=e.getTokenBefore(n)):i=e.getLastToken(t,1),r(i)}var o="never"!==e.options[0];return{BlockStatement:r,SwitchStatement:i}},t.exports.schema=[{enum:["always","never"]}]},{}],301:[function(e,t,n){"use strict";t.exports=function(e){function t(e,t){return e.range[1]=0&&(i[o-1].range[1]>=r.range[0]||r.range[1]>=i[o+1].range[0]))return r;return null}function n(t,n){e.report(t,n.loc.start,"Infix operators must be spaced.")}function r(r){var i=t(r.left,r.right);i&&(a&&"|0"===e.getSource(r).substr(-2)||n(r,i))}function i(e){var r=t(e.test,e.consequent),i=t(e.consequent,e.alternate);r?n(e,r):i&&n(e,i)}function o(e){var r;e.init&&(r=t(e.id,e.init),r&&n(e,r))}var a=!!e.options[0]&&e.options[0].int32Hint===!0,s=["*","/","%","+","-","<<",">>",">>>","<","<=",">",">=","in","instanceof","==","!=","===","!==","&","^","|","&&","||","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","^=","|=","?",":",","];return{AssignmentExpression:r,BinaryExpression:r,LogicalExpression:r,ConditionalExpression:i,VariableDeclarator:o}},t.exports.schema=[{type:"object",properties:{int32Hint:{type:"boolean"}},additionalProperties:!1}]},{}],306:[function(e,t,n){"use strict";t.exports=function(e){function t(t){var n=e.getFirstTokens(t,2),r=n[0].value;n[0].range[1]>=n[1].range[0]&&e.report(t,'Keyword "'+r+'" must be followed by whitespace.')}return{ReturnStatement:function(e){e.argument&&t(e)},SwitchCase:function(e){e.test&&t(e)},ThrowStatement:t}},t.exports.schema=[]},{}],307:[function(e,t,n){"use strict";t.exports=function(e){function t(e){return e&&e.parent&&"UnaryExpression"===e.parent.type&&"!"===e.parent.operator}function n(e){return e.argument&&e.argument.type&&"ObjectExpression"===e.argument.type}function r(t,r,i){o.words&&i.range[0]===r.range[1]&&e.report(t,'Unary word operator "'+r.value+'" must be followed by whitespace.'),!o.words&&n(t)&&i.range[0]>r.range[1]&&e.report(t,'Unexpected space after unary word operator "'+r.value+'".')}function i(n){var i=e.getFirstTokens(n,2),a=i[0],s=i[1];if(("NewExpression"===n.type||n.prefix)&&"Keyword"===a.type)return void r(n,a,s);if(o.nonwords)if(n.prefix){if(t(n))return;a.range[1]===s.range[0]&&e.report(n,'Unary operator "'+a.value+'" must be followed by whitespace.')}else a.range[1]===s.range[0]&&e.report(n,'Space is required before unary expressions "'+s.value+'".');else n.prefix?s.range[0]>a.range[1]&&e.report(n,'Unexpected space after unary operator "'+a.value+'".'):s.range[0]>a.range[1]&&e.report(n,'Unexpected space before unary operator "'+s.value+'".')}var o=e.options&&Array.isArray(e.options)&&e.options[0]||{words:!0,nonwords:!1};return{UnaryExpression:i,UpdateExpression:i,NewExpression:i}},t.exports.schema=[{type:"object",properties:{words:{type:"boolean"},nonwords:{type:"boolean"}},additionalProperties:!1}]},{}],308:[function(e,t,n){"use strict";t.exports=function(e){function t(e){return e.replace(/([.*+?${}()|\^\[\]\/\\])/g,"\\$1")}function n(e){return"Block"===e.type&&c.test(e.value)}function r(t){var r="Block"===t.type?"/*":"//";if(a){if(0===t.value.length)return;if(n(t))return;if(h&&u.test(t.value))return;0!==t.value.indexOf(" ")&&0!==t.value.indexOf("\t")&&0!==t.value.indexOf("\n")&&(f&&!s.test(t.value)?e.report(t,"Expected exception block, space or tab after "+r+" in comment."):f||e.report(t,"Expected space or tab after "+r+" in comment."))}else if(0!==t.value.indexOf(" ")&&0!==t.value.indexOf("\t")||e.report(t,"Unexpected space or tab after "+r+" in comment."),h&&u.test(t.value)){var i=t.value.match(u),o=i.length?i[0]:"";e.report(t,"Unexpected space or tab after marker ("+o+") in comment.")}}var i,o,a="never"!==e.options[0],s=new RegExp(" "),u=new RegExp(" "),c=new RegExp("((^(\\*)))[ \\n]"),l=2===e.options.length,p=l?e.options[1]:{},f=l&&p.exceptions&&p.exceptions.length,d=f?p.exceptions:[],h=l&&p.markers&&p.markers.length,m=h?p.markers:[];return f&&(i=d.map(t),s=new RegExp("(^("+i.join(")+$)|(^(")+")+$)")),h&&(o=m.map(t),u=new RegExp("((^("+o.join("))|(^(")+")))[ \\t\\n]")),{LineComment:r,BlockComment:r}},t.exports.schema=[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},{}],309:[function(e,t,n){"use strict";t.exports=function(e){var t,n="never"!==e.options[0],r=new RegExp(" "),i=2===e.options.length,o=i?e.options[1].exceptions:[];return o.length&&(t=o.map(function(e){return e.replace(/([.*+?${}()|\^\[\]\/\\])/g,"\\$1")}),r=new RegExp("(^("+t.join(")+$)|(^(")+")+$)")),{LineComment:function(t){if(n){if(0===t.value.length)return;0!==t.value.indexOf(" ")&&0!==t.value.indexOf("\t")&&(i&&!r.test(t.value)?e.report(t,"Expected exception block, space or tab after // in comment."):i||e.report(t,"Expected space or tab after // in comment."))}else 0!==t.value.indexOf(" ")&&0!==t.value.indexOf("\t")||e.report(t,"Unexpected space or tab after // in comment.")}}},t.exports.schema=[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},{}],310:[function(e,t,n){"use strict";function r(e){var t,n,r=[];for(t=0;t0||l;s?(a&&n.length&&t(n[0],i.unnecessary),t(n.slice(1),i.multiple)):o&&!l&&t(e,i.function),f.push(a||s)}function u(){f.pop()}var c=e.options[0],l=e.ecmaFeatures.modules,p={},f=[];return p.deprecated={Program:o,FunctionDeclaration:o,FunctionExpression:o,ArrowFunctionExpression:o,"Program:exit":a,"FunctionDeclaration:exit":a,"FunctionExpression:exit":a,"ArrowFunctionExpression:exit":a},p.never={Program:function(e){t(r(e.body),i.never)},FunctionDeclaration:function(e){t(r(e.body.body),i.never)},FunctionExpression:function(e){t(r(e.body.body),i.never)}},p.global={Program:function(e){var n=r(e.body);!l&&e.body.length&&n.length<1?t(e,i.global):l?t(n,i.unnecessary):t(n.slice(1),i.multiple)},FunctionDeclaration:function(e){t(r(e.body.body),i.global)},FunctionExpression:function(e){t(r(e.body.body),i.global)}},p.function={Program:function(e){t(r(e.body),i.function)},FunctionDeclaration:s,FunctionExpression:s,"FunctionDeclaration:exit":u,"FunctionExpression:exit":u},p[c||"deprecated"]},t.exports.schema=[{enum:["never","global","function"]}]},{}],311:[function(e,t,n){"use strict";t.exports=function(e){return{BinaryExpression:function(t){!/^(?:[<>]|[!=]=)=?$/.test(t.operator)||"NaN"!==t.left.name&&"NaN"!==t.right.name||e.report(t,"Use the isNaN function to compare with NaN.")}}},t.exports.schema=[]},{}],312:[function(e,t,n){"use strict";var r=e("doctrine");t.exports=function(e){function t(){l.push({returnPresent:!1})}function n(e){var t=l[l.length-1];t&&null!==e.argument&&(t.returnPresent=!0)}function i(t){var n,i=e.getJSDocComment(t),o=l.pop(),p=!1,f=!1,d=Object.create(null);if(i){try{n=r.parse(i.value,{strict:!0,unwrap:!0,sloppy:!0})}catch(t){return void(/braces/i.test(t.message)?e.report(i,"JSDoc type missing brace."):e.report(i,"JSDoc syntax error."))}n.tags.forEach(function(t){switch(t.title){case"param":t.type||e.report(i,"Missing JSDoc parameter type for '{{name}}'.",{name:t.name}),!t.description&&u&&e.report(i,"Missing JSDoc parameter description for '{{name}}'.",{name:t.name}),d[t.name]?e.report(i,"Duplicate JSDoc parameter '{{name}}'.",{name:t.name}):t.name.indexOf(".")===-1&&(d[t.name]=1);break;case"return":case"returns":p=!0,s||o.returnPresent||"void"===t.type.name||"undefined"===t.type.name?(t.type||e.report(i,"Missing JSDoc return type."),"void"!==t.type.name&&!t.description&&c&&e.report(i,"Missing JSDoc return description.")):e.report(i,"Unexpected @"+t.title+" tag; function has no return statement.");break;case"constructor":case"class":f=!0}a.hasOwnProperty(t.title)&&e.report(i,"Use @{{name}} instead.",{name:a[t.title]})}),p||f||(s||o.returnPresent)&&e.report(i,"Missing JSDoc @returns for function.");var h=Object.keys(d);t.params.forEach(function(t,n){var r=t.name;"Identifier"===t.type&&(h[n]&&r!==h[n]?e.report(i,"Expected JSDoc for '{{name}}' but found '{{jsdocName}}'.",{name:r,jsdocName:h[n]}):d[r]||e.report(i,"Missing JSDoc for parameter '{{name}}'.",{name:r}))})}}var o=e.options[0]||{},a=o.prefer||{},s=o.requireReturn!==!1,u=o.requireParamDescription!==!1,c=o.requireReturnDescription!==!1,l=[];return{ArrowFunctionExpression:t,FunctionExpression:t,FunctionDeclaration:t,"ArrowFunctionExpression:exit":i,"FunctionExpression:exit":i,"FunctionDeclaration:exit":i,ReturnStatement:n}},t.exports.schema=[{type:"object",properties:{prefer:{type:"object",additionalProperties:{type:"string"}},requireReturn:{type:"boolean"},requireParamDescription:{type:"boolean"},requireReturnDescription:{type:"boolean"}},additionalProperties:!1}]},{doctrine:11}],313:[function(e,t,n){"use strict";t.exports=function(e){var t=["symbol","undefined","object","boolean","number","string","function"],n=["==","===","!=","!=="];return{UnaryExpression:function(r){var i,o;"typeof"===r.operator&&(i=e.getAncestors().pop(),"BinaryExpression"===i.type&&n.indexOf(i.operator)!==-1&&(o=i.left===r?i.right:i.left,"Literal"===o.type&&t.indexOf(o.value)===-1&&e.report(o,"Invalid typeof comparison value")))}}},t.exports.schema=[]},{}],314:[function(e,t,n){"use strict";t.exports=function(e){function t(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value}function n(e){return"ImportDeclaration"===e.type||"ImportSpecifier"===e.type||"ImportDefaultSpecifier"===e.type||"ImportNamespaceSpecifier"===e.type}function r(e,r){for(var i=0,o=r.length;i|<=|>=)$/.test(e)}function i(e){return/^(==|===)$/.test(e)}function o(e){return["<","<="].indexOf(e)>=0}function a(e){return"UnaryExpression"===e.type&&"-"===e.operator&&e.prefix&&"Literal"===e.argument.type&&"number"==typeof e.argument.value}function s(e){return"Literal"===e.type?e:a(e)?{type:"Literal",value:-e.argument.value,raw:"-"+e.argument.value}:null}function u(e,t){if(e.type!==t.type)return!1;switch(e.type){case"Identifier":return e.name===t.name;case"Literal":return e.value===t.value;case"MemberExpression":return u(e.object,t.object)&&u(e.property,t.property);case"ThisExpression":return!0;default:return!1}}t.exports=function(e){function t(t){function n(){var e,n;return"&&"===t.operator&&(e=s(a.left))&&(n=s(c.right))&&e.value<=n.value&&u(a.right,c.left)}function r(){var e,n;return"||"===t.operator&&(e=s(a.right))&&(n=s(c.left))&&e.value<=n.value&&u(a.left,c.right)}function i(){var n,r;return(n=e.getTokenBefore(t))&&"("===n.value&&(r=e.getTokenAfter(t))&&")"===r.value}var a=t.left,c=t.right;return"LogicalExpression"===t.type&&"BinaryExpression"===a.type&&"BinaryExpression"===c.type&&o(a.operator)&&o(c.operator)&&(n()||r())&&i()}var n="always"===e.options[0],c=e.options[1]&&e.options[1].exceptRange,l=e.options[1]&&e.options[1].onlyEquality;return{BinaryExpression:n?function(n){"Literal"!==n.right.type&&!a(n.right)||!i(n.operator)&&l||!r(n.operator)||c&&t(e.getAncestors().pop())||e.report(n,"Expected literal to be on the left side of "+n.operator+".")}:function(n){"Literal"!==n.left.type&&!a(n.left)||!i(n.operator)&&l||!r(n.operator)||c&&t(e.getAncestors().pop())||e.report(n,"Expected literal to be on the right side of "+n.operator+".")}}},t.exports.schema=[{enum:["always","never"]},{type:"object",properties:{exceptRange:{type:"boolean"},onlyEquality:{type:"boolean"}},additionalProperties:!1}]},{}],318:[function(e,t,n){(function(e){"use strict";function n(e,t,n){return e+new Array(t-e.length+1).join(n||" ")}function r(e,t,n){return new Array(t-e.length+1).join(n||" ")+e}function i(e){var t=0,n=Object.keys(e).map(function(n){var r=e[n];return t+=r,[n,r]}).sort(function(e,t){return t[1]-e[1]}).slice(0,10);n.forEach(function(e){e.push((100*e[1]/t).toFixed(1)+"%"),e[1]=e[1].toFixed(3)}),n.unshift(a);var r=[];n.forEach(function(e){var t,n,i=e.length;for(t=0;tr[t])&&(r[t]=n)});var i=n.map(function(e){return e.map(function(e,t){return s[t](e,r[t])}).join(" | ")});i.splice(1,0,r.map(function(e,t){return 0!==t&&t!==r.length-1&&e++,s[t](":",e+1,"-")}).join("|")),console.log(i.join("\n"))}var o=!!e.env.TIMING,a=["Rule","Time (ms)","Relative"],s=[n,r,r];t.exports=function(){function t(t,r){return"undefined"==typeof n[t]&&(n[t]=0),function(){var i=e.hrtime();r.apply(null,Array.prototype.slice.call(arguments)),i=e.hrtime(i),n[t]+=1e3*i[0]+i[1]/1e6}}var n=Object.create(null);return o&&e.on("exit",function(){i(n)}),{time:t,enabled:o}}()}).call(this,e("_process"))},{_process:8}],319:[function(e,t,n){"use strict";t.exports=function(e){function t(t,n){var r,o=[];for(r=Math.max(0,t);rt)return!0;return!1},r=function(e){try{return JSON.parse(e)}catch(e){throw new Error(e)}};return{_getFilteredConfiguration:function(e,t){if(!t)return e;var n=e.rules||{},r=e.additionalRuleMetadata,i={i:t.indexOf("info")>=0,info:t.indexOf("info")>=0,w:t.indexOf("warning")>=0,warning:t.indexOf("warning")>=0,e:t.indexOf("error")>=0,error:t.indexOf("error")>=0};for(var o in n){var a=n[o];if(n.hasOwnProperty(o)){var s;s=r[o]?r[o].severity:"warning",i[s]||("number"==typeof a?n[o]=0:a instanceof Array&&(a[0]=0))}}return e},_getRelevantConfig:function(e,t){var n=e;if(t){var i=t.get(".eslintrc");if(i){var o=r(i);n=o;var a=t.get(".eslintrc.ext");if(a){var s=r(a);s&&n&&(n.additionalRuleMetadata=s.rulesExt);var u=t.get("filterLevel");u&&(o=this._getFilteredConfiguration(o,u))}}else{var c=t.get("configFromProject");c&&(n=c)}}return n},getIssues:function(t,r,i,o,a){var s={root:{},issues:[]};if(n(t))return s;var u=[];r=this._getRelevantConfig(r,a);var c=r.additionalRuleMetadata||{};if(a){var l=a.get("customRulesContentFromEslintrc");l&&(o=l)}o&&(Object.getOwnPropertyNames(o).forEach(function(e){try{var t=new Function(o[e]);o[e]=t()}catch(t){u.push(e)}}),this._defineCustomRulesToLinter(o));var p=e.verify(t,r,i,!1);e.reset();for(var f=0;f0?i._securityScan(e).then(function(e){return i._createCustomRulesStruct(e)}):null})}):(i.context.service.log.warn(i.context.service.fioriJsValidator.getProxyMetadata().getName()," user defined RulesDirectory "+e+" defined under project settings was not found",["user"]).done(),null)}):Q()},_createCustomRulesStruct:function(e){var t=this,n=t._getRulesConfigurationTemplate(),r=n.additionalRuleMetadata,i=n.rules;return jQuery.each(e,function(e,n){"length"!==n&&(i[n]={},i[n]=t.CUSTOM_RULES_DEFAULTS.enabled,r[n]={},r[n].severity=t.CUSTOM_RULES_DEFAULTS.severity,r[n].category=t.CUSTOM_RULES_DEFAULTS.category)}),n},_getRulesConfigurationTemplate:function(){return{additionalRuleMetadata:{},rules:{}}},_mergeRules:function(e,n){return e?n?t.merge(e,n):(this.context.service.log.warning("javascript eslint - an element to be merged not supplied: ",JSON.stringify(n)).done(),e):(this.context.service.log.warn("javascript eslint - an element to be merged not supplied: ",JSON.stringify(e)).done(),n)},_securityScan:function(e){var r=[],i=[];return t.each(e,function(e){i.push(e.getContent().then(function(t){return{content:t,document:e}}))}),Q.all(i).then(function(e){return t.each(e,function(e){var t=e.content,i=e.document;n.scan(t)&&r.push(i.getTitle().replace(/\.js/,""))}),r})}}}),define("sap.watt.saptoolsets.fiori.editor.fioriJsValidator/service/JSValidatorConfiguration",["sap.watt.saptoolsets.fiori.editor.fioriJsValidator/util/configReader"],function(e){"use strict";var t=".eslintrc",n=".eslintrc.ext";return{init:function(){return e._loadDefaultConfig()},saveConfiguration:function(e,r){var i=this,o=i._convertConfigurationToEslintFormat(r);return Q.all([i._setToEslintrcFile(e,t,o.ESLINTRC_FILE),i._setToEslintrcFile(e,n,o.ESLINTRC_EXT_FILE)])},getDefaultConfiguration:function(){var e=this;return this._isHCPEnv()?this.context.service.jsrules.fromHcp().then(function(r){if(r&&r[t]&&r[n]){var i=e._parseContent(r[".eslintrc"]),o=e._parseContent(r[".eslintrc.ext"]);return i&&o?(i.rulesExt=o.rulesExt,i=e._convertToDefaultStructure(i),e._wrapEslintConfigForDisplay(i)):e._getDefaultConfig()}return e._getDefaultConfig()}):e._getDefaultConfig()},getConfiguration:function(e){var r=this;return this._getEslintrcFile(e,t).then(function(t){return t?r._getEslintrcRules(t).then(function(t){return t?r._getEslintrcFile(e,n).then(function(e){return e?r._getEslintrcExtensions(e).then(function(e){return e?(t.rulesExt=e.rulesExt,t=r._convertToDefaultStructure(t),r._wrapEslintConfigForDisplay(t)):r._mergeEslintrcWithDefaultExtensions(t).then(function(e){return r._wrapEslintConfigForDisplay(e)})}):r._mergeEslintrcWithDefaultExtensions(t).then(function(e){return r._wrapEslintConfigForDisplay(e)})}):r._getFioriJsDefaultConfiguration().then(function(e){var t=r._disableAllRules(e);return r._wrapFioriDefaultConfigForDisplay(t)})}):r.getDefaultConfiguration()}).fail(function(e){throw new Error(e)})},_getDefaultConfig:function(){var e=this;return this._getFioriJsDefaultConfiguration().then(function(t){return e._wrapFioriDefaultConfigForDisplay(t)})},_isHCPEnv:function(){return"hcproxy"===sap.watt.getEnv("server_type")},_convertConfigurationToEslintFormat:function(e){var t=this,n={},r={},i=e||{};$.each(i.rules||{},function(e,i){n[i.ruleId]={},i.additionalProperties?(n[i.ruleId]=[],i.enable===!1?n[i.ruleId][0]=t._convertRuleValFromSeverity():n[i.ruleId][0]=t._convertRuleValFromSeverity(i.severity),n[i.ruleId]=n[i.ruleId].concat(i.additionalProperties)):i.enable===!1?n[i.ruleId]=t._convertRuleValFromSeverity():n[i.ruleId]=t._convertRuleValFromSeverity(i.severity),r[i.ruleId]={},r[i.ruleId].severity=i.severity?i.severity.toLowerCase():"warning",r[i.ruleId].category=i.category,r[i.ruleId].helpUrl=i.helpUrl});var o=i.header||{},a=i.customRulesPath||void 0;return this._buildConfigurationTemplate(n,o.globals,o.env,r,a)},_convertRuleValFromSeverity:function(e){if(!e)return 0;var t=e.toLowerCase()[0];return"w"===t||"i"===t?1:"e"===t?2:0},_buildConfigurationTemplate:function(e,t,n,r,i){var o={ESLINTRC_FILE:{},ESLINTRC_EXT_FILE:{}};return o.ESLINTRC_FILE.rules=e?e:null,o.ESLINTRC_EXT_FILE.rulesExt=r?r:null,o.ESLINTRC_FILE.globals=t?t:null,o.ESLINTRC_FILE.env=n?n:null,o.ESLINTRC_FILE.customRulesPath=i?i:null,o},_getEslintrcFile:function(e,t){var n=e+"/"+t;return this.context.service.document.getDocumentByPath(n)},_setToEslintrcFile:function(e,t,n){var r=this;if(!_.isEmpty(n)){var i=JSON.stringify(n);return this.context.service.beautifierProcessor.beautify(i,"json").then(function(n){return r._getEslintrcFile(e,t).then(function(i){return i?i.setContent(n).then(function(){return i.save()}):r.context.service.document.getDocumentByPath(e).then(function(e){if(e.getEntity().isProject())return e.createFile(t).then(function(e){return e.setContent(n).then(function(){return e.save()})})})})})}},_getFioriJsDefaultConfiguration:function(){var t=this;return e.getFioriConfiguration().then(function(e){var n=_.cloneDeep(e)||{};return t._adaptMetadataConfiguration(n),n})},_adaptMetadataConfiguration:function(e){e&&_.each(e.additionalRuleMetadata,function(e){e.severity=e.severity||"w",e.helpUrl=e.help,delete e.help,delete e.priority})},_getEslintrcRules:function(e){return this._getParseContent(e).then(function(e){return e&&e.rules&&!_.isEmpty(e.rules)?e:null})},_getEslintrcExtensions:function(e){return this._getParseContent(e).then(function(e){return e&&e.rulesExt&&!_.isEmpty(e.rulesExt)?e:null})},_getParseContent:function(e){var t=this;return e.getContent().then(function(e){return t._parseContent(e)})},_parseContent:function(e){try{var t=JSON.parse(e);return t}catch(e){return null}},_wrapEslintConfigForDisplay:function(e){var t={};if(!e.eslintConfig)return t;var n=e.eslintConfig.rules||{},r=e.rulesExt;_.forEach(n,function(e,n){var i={};i.ruleId=n,i.severity=r[n]?r[n].severity:"warning","number"==typeof e?0===e?i.enable=!1:i.enable=!0:_.isArray(e)&&(0===e[0]?i.enable=!1:i.enable=!0,i.additionalProperties=e.slice(1)),i.category=r[n]?r[n].category:"",i.helpUrl=r[n]?r[n].helpUrl:"http://eslint.org/docs/rules/"+n,t[n]=i});var i={};return i.rules=t,i.header={},e.eslintConfig.globals&&(i.header.globals=e.eslintConfig.globals),e.eslintConfig.env&&(i.header.env=e.eslintConfig.env),i.customRulesPath=e.customRulesPath,i},_convertToDefaultStructure:function(e){return{eslintConfig:{env:e.env,globals:e.globals,rules:e.rules},customRulesPath:e.customRulesPath,rulesExt:e.rulesExt}},_addRulesExtensions:function(e){return this._getFioriJsDefaultConfiguration().then(function(t){return e.rulesExt=t.additionalRuleMetadata,$.each(e.rulesExt,function(t){e.rulesExt[t].helpUrl||(e.rulesExt[t].helpUrl="http://eslint.org/docs/rules/"+t)}),e})},_mergeEslintrcWithDefaultExtensions:function(e){var t=this;return this._addRulesExtensions(e).then(function(e){return t._convertToDefaultStructure(e)})},_disableAllRules:function(e){if(e&&e.rules){var t=_.cloneDeep(e);return _.forEach(t.rules,function(e,n){_.isArray(e)?t.rules[n][0]=0:t.rules[n]=0}),t}},_wrapFioriDefaultConfigForDisplay:function(e){var t={};if(!e)return t;var n=e.rules||{},r=e.additionalRuleMetadata;$.each(n,function(e,n){var i={},o=r[e];switch(i.ruleId=e,o.severity.toLowerCase()[0]){case"e":i.severity="error";break;case"w":i.severity="warning";break;case"i":i.severity="info"}"number"==typeof n?0===n?i.enable=!1:i.enable=!0:n instanceof Array&&(0===n[0]?i.enable=!1:i.enable=!0,i.additionalProperties=n.slice(1)),i.category=o.category,i.helpUrl=o.helpUrl,t[e]=i});var i={};return i.rules=t,i.header={},e.globals&&(i.header.globals=e.globals),e.env&&(i.header.env=e.env),i}}}),define("sap/watt/saptoolsets/fiori/run/plugin/commonrunners/util/configEnum",[],function(){var e={withMock:0,withoutMock:1},t={withPreview:0,withoutPreview:1};return{dataStates:e,displayStates:t}}),define("sap.watt.saptoolsets.fiori.run.qunitrunner/service/QunitRunner",["sap/watt/lib/lodash/lodash","sap/watt/saptoolsets/fiori/run/plugin/commonrunners/util/configEnum"],function(e,t){"use strict";var n={run:function(e,t,n,r,i){return this.context.service.qunitrunnerruntime.run(t,r,i)},getApplicationUrl:function(e,t){return t||(t=this.createDefaultConfiguration(e,!0)),this.context.service.qunitrunnerruntime.getApplicationUrl(t,e).then(function(e){return e.toString()})},createDefaultConfiguration:function(e,t,n){var r=this;if(null!=e){var i=[],o="/"+e.getEntity().getFullPath().split("/").slice(2).join("/");return r._isHtmlFile(e)?r._buildDefaultConfigObj(o,i):(o=null,r._getUnitTestFiles(e,!0).then(function(e){if(e){switch(e.length){case 0:o=null;break;case 1:o="/"+e[0].fullPath.split("/").slice(2).join("/");break;default:if(!t){var a=function(t){return r.context.service.choosefilepopup.getContent(e,n,t).then(function(e){return e?r.context.service.choosefilepopup.getResult().then(function(e){return r._buildDefaultConfigObj(e,i)}):null})};return a("false"!==sap.watt.getURLParameter("sap-ide-runnew")?!0:!1)}}return r._buildDefaultConfigObj(o,i)}}))}return null},getConfigurationUi:function(e){var t=this;return{getContent:function(){return"local_hcproxy"===sap.watt.getEnv("server_type")?t._getContentLocal(e):t._getContentExternalInternal(e)}}},updateConfiguration:function(e,t){return t&&e&&(t.sDisplayName&&(e._metadata.displayName=t.sDisplayName),t.sFilePath&&(e.filePath=t.sFilePath),t.sUI5Version&&(e.ui5ActiveVersion=t.sUI5Version,e.isDefaultVersion=1),void 0!==t.bUseWorkspace&&null!==t.bUseWorkspace&&(e.workspace=t.bUseWorkspace?"withWorkspace":"withoutWorkspace")),e},_oRunnableFiles:{include:[".*[.]html$"],exclude:["mock_preview_sapui5.html","visual_ext_index.html"]},_oRunnableFilesForDefaultConfiguration:{include:[".*[.]html$"],exclude:["mock_preview_sapui5.html","visual_ext_index.html","/dist/"]},_aValidations:[{isRegex:!1,rule:".html"}],_getUnitTestFiles:function(e,t){return t?this.context.service.filesearchutil.getRunnableFiles(e,this._oRunnableFilesForDefaultConfiguration):this.context.service.filesearchutil.getRunnableFiles(e,this._oRunnableFiles)},_buildDefaultConfigObj:function(e,n){return{filePath:e,previewMode:t.displayStates.withoutPreview,dataMode:t.dataStates.withoutMock,ui5ActiveVersion:null,ui5VerSource:null,isDefaultVersion:0,isDefaultConfiguration:!0,workspace:"withoutWorkspace",urlParameters:[],backendSystem:n}},_isHtmlFile:function(e){return"file"===e.getType()&&"html"===e.getEntity().getFileExtension()},isConfigurationValid:function(e){var t={bValid:!0,aErrors:[]};if(e&&e.filePath){var n=e.filePath;!n||/^\s*$/.test(n)?(t.bValid=!1,t.aErrors.push("General")):t.bValid=!0}return e&&!e.filePath&&(t.bValid=!1),t},_isInternal:function(){var e=!1;return"local_hcproxy"!==sap.watt.getEnv("server_type")&&sap.watt.getEnv("internal")===!0&&(e=!0),e},_getContentLocal:function(e){var t=[];t.push(this._getUnitTestFiles(e));var n=this;return Q.all(t).spread(function(t){var r=[];return r.push(n.context.service.runconfig.filepath.getControl(e,t,n._aValidations)),Q.all(r).spread(function(e){var t=new sap.ui.layout.Grid({hSpacing:0,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"})});t.addContent(e);var r=[{name:n.context.i18n.getText("i18n","lbl_general"),content:t}];return r})})},_getContentExternalInternal:function(e){var t=[];t.push(this._getUnitTestFiles(e)),t.push(this.context.service.UI5VersionsUtil.getUi5VersionsList(e)),t.push(this.context.service.UI5VersionsUtil.getUI5CurrentVersion(e)),t.push(this.context.service.destinationsutil.getNeoAppDestinations(e)),t.push(this.context.service.destinationsutil.getHcpDestinations()),t.push(this.context.service.UI5VersionsUtil.getUI5VersionFromAppDescriptor(e));var n=this;return Q.all(t).spread(function(t,r,i,o,a,s){var u=[];return u.push(n.context.service.runconfig.filepath.getControl(e,t,n._aValidations)),u.push(n.context.service.runconfig.ui5versions.getControl(e,r,i,s)),u.push(n.context.service.runconfig.destinationmapping.getControl(e,o,a)),u.push(n.context.service.runconfig.resourcemapping.getControl(e)),Q.all(u).spread(function(e,t,r,i){var o=new sap.ui.layout.Grid({hSpacing:0,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"})});o.addContent(e);var a=new sap.ui.layout.form.SimpleForm({layout:sap.ui.layout.form.SimpleFormLayout.ResponsiveGridLayout,labelSpanL:1,labelSpanM:1});a.addContent(t),a.addContent(r),a.addContent(i);var s=[{name:n.context.i18n.getText("i18n","lbl_general"),content:o}];return s.push({name:n.context.i18n.getText("i18n","lbl_advanced_setting"),content:a}),s})})}};return n}),define("sap.watt.ideplatform.run/error/ConfigurationError",[],function(){var e=function(e){this.name="ConfigurationError",this.message=e,this.stack=(new Error).stack};return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}),define("sap.watt.saptoolsets.fiori.run.qunitrunner/service/QunitRunnerRuntime",["sap/watt/lib/lodash/lodash","sap.watt.ideplatform.run/error/ConfigurationError"],function(e,t){"use strict";return{run:function(e,t,n){var r=this;return this.getApplicationUrl(t,n).then(function(n){return r._addUsageAnalytics(t),"false"!==sap.watt.getURLParameter("sap-ide-runnew")?r.context.service.runinnewprocess.openWindow(n):void(e.location.href=n.toString())})},getApplicationUrl:function(e,t){var n,r=this;return this._validateConfiguration(e,t),t.getProject().then(function(i){return n=i,Q.spread([r._getUrlToken(n,e),r.context.service.moduledependencyextension.addModuleDependencyDestinationMapping(e,n,r._isHtml5Module(n))],function(e,i){return i.isDefaultConfiguration=!1,Q.spread([r.context.service.heliumPreviewAdapter.getBaseUrl(n,e),r.context.service.appcachebusterextension.getAppCacheBusterParameters(i.filePath),r.context.service.destinationmappingextension.getDestinationMappingParameters(i.backendSystem),r.context.service.ui5versionextension.getUi5VersionParameters(i.ui5ActiveVersion),r.context.service.reuselibsextension.getReuselibsURLParams(t,"withWorkspace"===i.workspace),r.context.service.ideurlparameters.getIdeUrlParameters(["saml2idp"]),r.context.service.componentpreloadextension.getComponentPreloadParameter(t,i)],function(e,i,o,a,s,u,c){return e=r._additionalData(e,t,n),r.context.service.usagemonitoring.report("runner","preview","qunitrunner").done(),r._addUrlParameters(e,i,o,a,s,u,c)})})}).fail(function(e){console.log(e)})},_isHtml5Module:function(e){var t=e.getProjectMetadata();return t&&"com.sap.hcp.html5"===t.type},_additionalData:function(e,t,n){var r=t.getEntity().getProjectRelativePath();if(r=jQuery.sap.startsWith(r,"/")?r.substr(1):r,this._isHtml5Module(n)){var i=n.getEntity().getProjectRelativePath();i=jQuery.sap.startsWith(i,"/")?i.substr(1):i,r=r.replace(i,"")}return e=URI(r).absoluteTo(e)},_addUrlParameters:function(e,t,n,r,i,o,a){return e=this._addExtensionUrlParameters(e,t),e=this._addExtensionUrlParameters(e,n),e=this._addExtensionUrlParameters(e,r),e=this._addExtensionUrlParameters(e,i),e=this._addExtensionUrlParameters(e,o),e=this._addExtensionUrlParameters(e,a)},_addExtensionUrlParameters:function(e,t){for(var n=0;t&&n0){var r,i=[e.context.service.libraryDiscovery.getLibrariesFromHCP()];if(null!==e._oRunConfigurationUiFragment&&(r=e._oRunConfigurationUiFragment.getModel()),void 0!==r){var o=r.getProperty("/workspace/");"withWorkspace"===o&&i.push(e.context.service.libraryDiscovery.getLibrariesFromWorkspace())}return Q.all(i).spread(function(r,i){for(var o in n){var a=_.find(i,{externalName:n[o].name}),s=_.find(r,{externalName:n[o].name});if(void 0!==s&&void 0===a){var u,c,l=[{version:"Active",details:"Active"}];for(var p in s.versions)if(void 0!==s.versions[p].version){var f=s.versions[p].version;s.versions[p].isActive&&(u=s.versions[p].version),n[o].version===s.versions[p].version&&(c=s.versions[p].version),l.push({version:s.versions[p].version,details:f})}var d=void 0===n[o].version?"Active":n[o].version;t.push({libraryName:n[o].name,versions:l,activeVersion:u,neoappVersion:c,libraryVersion:d,detailVersion:d})}else t.push({libraryName:n[o].name,versions:[{version:"Workspace",details:"Version from Workspace"}]})}if(null!==e._oRunConfigurationUiFragment){var h=e._oRunConfigurationUiFragment.getModel();if(void 0!==h){var m=h.getProperty("/appsVersion/");if(void 0!==m)for(var g=0;glbl_error}"}).addStyleClass("runConfigRtt");e.setTooltip(n)}}),define("sap.watt.saptoolsets.fiori.run.commonrunners/service/Ui5VersionsDropdown",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{_neoappUi5Version:null,_isUi5VersionsLoaded:null,_aUi5Versions:null,initDropdown:function(e){var t=this;return this._isUi5VersionsLoaded=!1,this._getNeoappVersion(e).then(function(e){t._neoappUi5Version=e})},getUi5VersionsList:function(e){var t=this;if(null===t._aUi5Versions)return this.context.service.UI5VersionsUtil.getUi5VersionsList(e).then(function(e){return t._aUi5Versions=e,e})},handleDropDownVersions:function(e,t){var n=this;t.setBusy(!0),t.setEnabled(!0),null===this._aUi5Versions&&this.getUi5VersionsList(e).then(function(e){n._fillDropDownVersions(t,e)}).done(function(){t.setBusy(!1)})},_fillDropDownVersions:function(t,n){var r=t.getModel();if(!this._isUi5VersionsLoaded){this._isUi5VersionsLoaded=!0;var i=r.getProperty("/ui5ActiveVersion");null===i&&(i=e.findIndex(n,"value",this._neoappUi5Version)>=0?this._neoappUi5Version:n[0].value,this.updateModel(r,i));for(var o=0;o0?n[0].source:null},_getNeoappVersion:function(e){return this.context.service.UI5VersionsUtil.getUI5CurrentVersion(e).then(function(e){return e})}}}),define("sap.watt.saptoolsets.fiori.run.commonrunners/service/SwitchBackends",[],function(){"use strict";return{configure:function(){this._preloadServices()},_preloadServices:function(){this.context.service.appmetadata.getNeoMetadata().fail(function(){}).done()},getBackendsInfo:function(e){var t=this;return t.context.service.appmetadata.getNeoMetadata(e).then(function(e){var n,r=[],i={aBackendSystems:[]};if(null!==e&&0!==e.length){if(e.routes.length>0)for(var o=0;o0,"tlt_run_config_ui_embmode_err_dest_name","tlt_run_config_ui_embmode_dest_name",e.getId(),t.GEN_TAB)})},onSystemsDropDownChange:function(e){var t=this,n=e.getSource();t._onSystemsDropDownChange(n).then(function(e){return t.context.service.runconfigerrorhandler.update(e)}).done()},_onSystemsDropDownChange:function(e){var t=e.getModel(),n=e.getSelectedKey();return t.setProperty("/flpDestName",n),Q(this._createControlData(e,""!==n,"tlt_run_config_ui_embmode_err_dest_name","tlt_run_config_ui_embmode_dest_name",e.getId(),this.GEN_TAB))},onAfterAppsTextFieldRendering:function(e){var t=this;t._onAfterAppsTextFieldRendering(e).then(function(e){return t.context.service.runconfigerrorhandler.update(e)}).done()},_onAfterAppsTextFieldRendering:function(e){var t=e.getModel(),n=t.getProperty("/flpAppName");return e.setValue(n),Q(this._createControlData(e,""!==n,"tlt_run_config_ui_embmode_err_app_name_bsp","tlt_run_config_ui_embmode_app_name_bsp",e.getId(),this.GEN_TAB))},onAppsTextFieldChange:function(e){var t=this,n=e.getSource();t._onAppsTextFieldChange(n).then(function(e){return t.context.service.runconfigerrorhandler.update(e)}).done()},onAfterAccountTextFieldRendering:function(e){var t=e.getModel(),n=t.getProperty("/hcpAccount");e.setValue(n)},removeErrMsg:function(e){var t=this._createControlData(e,!0,"","",e.getId(),this.GEN_TAB);return this.context.service.runconfigerrorhandler.update(t)},onAfterProviderDropDownRendering:function(e){var t,n=e.getModel(),r=n.getProperty("/flpName"),i=n.getProperty("/emdType"),o=n.getProperty("/flpValue");if(!this._isDDRendered){if(this._isDDRendered=!0,r)t=new sap.ui.core.ListItem({key:r,text:o});else if(this._aSubscriptions&&1===this._aSubscriptions.length){var a=this._aSubscriptions[0];t=new sap.ui.core.ListItem({key:a.name,text:a.providerAccount+" ("+a.name+")"})}else t=new sap.ui.core.ListItem({key:"",text:""});e.addItem(t),r=t.getKey(),e.setSelectedKey(r),n.setProperty("/flpValue",t.getText()),this._updateHcpAppName(n)}var s=this._createControlData(e,""!==r&&"HCP"===i,"tlt_run_config_ui_embmode_err_provider_name","tlt_run_config_ui_embmode_provider_name",e.getId(),this.GEN_TAB);return this.context.service.runconfigerrorhandler.update(s)},_loadProviderDropDownData:function(e){var t=this,n=e.getModel(),r=n.getProperty("/flpName"),i=n.getProperty("/emdType");return this._aSubscriptions?(e.setBusy(!0),t._fillProviderDropDown(e,this._aSubscriptions),e.setBusy(!1),r&&e.setSelectedKey(r),t._updateHcpAppName(n),Q(t._createControlData(e,""!==r&&"HCP"===i,"tlt_run_config_ui_embmode_err_provider_name","tlt_run_config_ui_embmode_provider_name",e.getId(),t.GEN_TAB))):t.context.service.hcpauthentication.authenticate(!0).then(function(o){return t._sHcpAccount=o.account,t._sHcpUsername=o.username,t._sHcpPassword=o.password,t.context.service.fiorilaunchpad.getAllFlpSubscriptions(o.account,o.username,o.password).then(function(o){var a=o.filter(function(e){return e.name===r});return t._aSubscriptions=o,e.setBusy(!0),t._fillProviderDropDown(e,o),e.setBusy(!1),r&&e.setSelectedKey(r),e.onclick(),t._updateHcpAppName(n),t._createControlData(e,""!==r&&a.length>0&&"HCP"===i,"tlt_run_config_ui_embmode_err_provider_name","tlt_run_config_ui_embmode_provider_name",e.getId(),t.GEN_TAB)})}).fail(function(){return e.setBusy(!1),t._createControlData(e,""!==r&&"HCP"===i,"tlt_run_config_ui_embmode_err_provider_name","tlt_run_config_ui_embmode_provider_name",e.getId(),t.GEN_TAB)})},_updateHcpAppName:function(e){var t=e.getProperty("/hcpAppName");t||this.context.service.deployment.getHCPAppNameFromProjectSettings(this._oDocument).then(function(t){e.setProperty("/hcpAppName",t)}).done()},onProviderDropDownChange:function(e){var t=this,n=e.getSource();t._onProviderDropDownChange(n).then(function(e){return t.context.service.runconfigerrorhandler.update(e)}).done()},_onProviderDropDownChange:function(e){var t=e.getModel(),n=e.getSelectedKey(),r=e.getValue();return t.setProperty("/flpValue",r),Q(this._createControlData(e,""!==n,"tlt_run_config_ui_embmode_err_provider_name","tlt_run_config_ui_embmode_provider_name",e.getId(),this.GEN_TAB))},_fillProviderDropDown:function(e,t){e.removeAllItems();var n=new sap.ui.core.ListItem({key:"",text:""});e.addItem(n);for(var r=0;r0)return Q(e);var t,n=this,r=[];for(t=0;t0)for(var n=0;n-1?t.replace("/s2s/file",""):t.replace("/file","")},_addDevtsQuery:function(e,t){var n;return e&&null!==e?t&&null!==t?e.addQuery("devts",t):(n=this.context.i18n.getText("i18n","previewImpl_undefinedOrNullTimestamp_at_devts"),void this.context.service.log.error("PreviewImpl",n,["user"])):(n=this.context.i18n.getText("i18n","previewImpl_undefinedOrNullUrl_at_devts"),void this.context.service.log.error("PreviewImpl",n,["user"]))},_getWorkSpaceApps:function(t,n){var r=this,i=[],o=[];if(n){for(var a=0;a=0;t--)(0===e[t].path.indexOf("/sap")||"/"===e[t].path&&"flpsandbox"===e[t].target.name)&&e.splice(t,1)},_appendWorkspaceAppRoutes:function(e){var t=_.trimStart(e.sEntryPath,"src");e.sSuffix&&(this._aRoutes.push({path:"/sap/bc/ui5_ui5/sap/"+e.sBspName+t+e.sSuffix,target:{type:"destination",name:""}}),this._aRoutes.push({path:"/sap/bc/ui5_ui5/sap/"+e.sBspName+e.sSuffix,target:{type:"destination",name:""}}),"/library-preload.json"===e.sSuffix&&(this._aRoutes.push({path:"/sap/bc/ui5_ui5/sap/"+e.sBspName+t+"/library-preload.js",target:{type:"destination",name:""}}),this._aRoutes.push({path:"/sap/bc/ui5_ui5/sap/"+e.sBspName+"/library-preload.js",target:{type:"destination",name:""}}))),this._aRoutes.push({path:"/sap/bc/ui5_ui5/sap/"+e.sBspName,target:{type:"application",name:e.sLocalAppName},description:"Route to application in local workspace"}),this._aRoutes.push({path:"/sap/bc/ui5_ui5/sap/"+e.sBspName+t,target:{type:"application",name:e.sLocalAppName},description:"Route to application in local workspace"})},_appendOriginAppRoutes:function(e){e.aDestinations.push({path:"/sap/bc/ui5_ui5/sap/"+e.sFlpAppName,target:{type:"application",name:e.sLocalAppName},description:"Route to application in local workspace"}),e.aDestinations.push({path:"/sap",target:{type:"destination",name:e.sFlpDestName,entryPath:"/sap"}})},_getEmbeddedFolder:function(){var e=this,t=this.context.service.filesystem.documentProvider;return t.getDocument("/"+e._oConstants.EMBEDDED_FOLDER_NAME).then(function(n){return n?n:t.getDocument("/").then(function(t){return t.createFolder(e._oConstants.EMBEDDED_FOLDER_NAME)})})}}}),define("sap.watt.saptoolsets.fiori.run.runronfigerrorhandler/service/RunConfigErrorHandler",{_oErrorFields:{},_oRunConfigurationUiFragment:null,subscribe:function(e,t){this._oRunConfigurationUiFragment=e;for(var n=0;nlbl_error}"}).addStyleClass("runConfigRtt");e.setTooltip(n)}}),define("sap.watt.saptoolsets.fiori.run.ushellsandbox/service/PreviewImpl",[],function(){"use strict";var e="test-resources/sap/ushell/shells/sandbox/fioriSandbox.html"; return{_sServerType:sap.watt.getEnv("server_type"),_sPreviewUrl:sap.watt.getEnv("orion_preview"),configure:function(){this._preloadServices()},_preloadServices:function(){this.context.service.preview.showPreview().fail(function(){}).done(),this.context.service.switchbackends.getChangedBackends().fail(function(){}).done()},_showPreview:function(e,t,n,r,i){return i?this.context.service.preview.getAppUrl(e,n,r):this.context.service.preview.showPreview(e,t,n,null,r)},_getComponentName:function(e,t){var n=/.extend\(\"(.*).Component\"/.exec(e);if(n){if(""===n[1])throw new Error(this.context.i18n.getText("i18n","previewImpl_component_namespace_empty"));return n[1]}if(n=/jQuery.sap.declare\(\"(.*).Component\"\)/.exec(e))return n[1];throw new Error(this.context.i18n.getText("i18n","previewImpl_undeclaredComponent",[t]))},getComponentNameFromComponentJs:function(e){var t=this,n=e.getEntity().getName();if("Component.js"!==n)throw new Error(this.context.i18n.getText("i18n","previewImpl_notComponentjs"));return e.getContent().then(function(n){var r=t._getComponentName(n,e.getEntity().getFullPath());return r})},_getSandboxUrlForComponent:function(e,t,n,r,i){var o,a=this._getSandboxUri(e,r);if(!t)throw new Error(this.context.i18n.getText("i18n","previewImpl_undefinedComponent"));return o=URI(e).relativeTo(a).segment(-1,""),this._constructUrlForComponent(a,o.path(),t,n,i)},_constructUrlForComponent:function(e,t,n,r,i){var o=new URI(e.toString()),a=this._getAppSysUrlParams(r),s=URI(t);return s=this._addUrlParams(s,a.aAppParams),t=s.toString(),o=this._addUrlParams(o,a.aSysParams),o.addSearch("sap-ushell-test-url-url",t),o.addSearch("sap-ushell-test-url-additionalInformation","SAPUI5.Component="+n),r&&r.bIsMock&&o.addSearch("responderOn","true"),i?o.fragment(i):o.fragment("Test-url"),o.toString()},_getSandboxUrlForConfig:function(e,t,n){var r=this._getSandboxUri(e,n),i=this._getAppSysUrlParams(t);r=this._addUrlParams(r,i.aSysParams);var o=new URI(e).relativeTo(r).path();return r.addSearch("sap-ushell-sandbox-config",o),t&&t.bIsMock&&r.addSearch("responderOn","true"),r.toString()},_getComponentNameFromApplicationData:function(e){var t=/SAPUI5\.Component=(.*)/;if(!t.test(e))throw new Error(this.context.i18n.getText("i18n","previewImpl_applicationDataMissingString"));return t.exec(e)[1]},_getSandboxUri:function(e,t){var n,r=this._sServerType;if(!e)throw new Error(this.context.i18n.getText("i18n","previewImpl_undefinedUrl"));if("java"==r)n=new URI("").protocol(window.location.protocol).host(window.location.host).path("/sapui5-sdk-dist/"+t);else{if("hcproxy"!=r&&"local_hcproxy"!=r)throw new Error(this.context.i18n.getText("i18n","previewImpl_unsupportedServerType",[r]));n=new URI(e).path(new URI(this._sPreviewUrl).path()).segment(t)}return n},showPreview:function(e,t,n,r,i,o,a){var s=this,u=r?r.sUi5Version:null;return s.context.service.switchbackends.getChangedBackends(r).then(function(t){var n=r?r.oAppForwarding:null,i=r?r.sRelativePath:null;return s.context.service.preview.getPreviewUrl(e,null,n,u,null,i,t)}).then(function(u){var c=u.toString(),l=e.getEntity().getName();return s._getSandboxUrlFromFioriLandscape(e,t,n,r,c,l,i,o,a)}).fail(function(e){t&&(t.close(),e&&e.message&&s.context.service.usernotification.alert(e.message).done())})},_getSandboxUrlFromFioriLandscape:function(e,t,n,r,i,o,a,s,u){var c=this;if("Component.js"===o)return e.getContent().then(function(o){var l=c._getComponentName(o,e.getEntity().getFullPath()),p=c._getSandboxUrlForComponent(i,l,r,a,s);return c._showPreview(p,t,n,r,u)});if(new RegExp(".*fiorisandboxconfig.*[.]json","i").test(o)){var l=c._getSandboxUrlForConfig(i,r,a);return c._showPreview(l,t,n,r,u)}throw new Error(this.context.i18n.getText("i18n","previewImpl_unsupportedFile",[o]))},showPreviewWithParameters:function(t,n,r,i){var o=this,a=o._getComponentNameFromApplicationData(n);return o.context.service.preview.getPreviewUrl(r).then(function(t){return o._getSandboxUri(t.toString(),e)}).then(function(e){i||(i=window.open("","Preview")),o._showPreview(o._constructUrlForComponent(e,t,a,!1),i)})},_getAppSysUrlParams:function(e){var t=["saml2idp"],n={},r=[],i=[];if(e?(n=e.oUrlParameters,this._addIdeUrlParams(t,n)):e={},n)for(var o=0;o\n'}return e.getContent().then(function(t){var n=t.search("(| )*"),r=t.substr(0,n)+s+t.substr(n);return e.setContent(r).then(function(){return e.save()})})})},_getBuildService:function(){return{getProxyMetadata:function(){return{getName:function(){return"build"}}}}},_getBuildSettings:function(e){return this.context.service.setting.project.get(this._getBuildService(),e)},_setBuildSettings:function(e,t){var n=this;return this.context.service.projectType.setProjectTypes(e,["com.watt.common.builder.sapui5clientbuild"]).then(function(){return n.context.service.setting.project.set(n._getBuildService(),t,e)})},_getPerformanceWrapperUrlWithKPIs:function(e){var n=this;return this._getKPIsAsUrlParamsObjects(e).then(function(e){return n._addUrlParamsToURL(t,e)})},_getInitFileContent:function(){var e="var ptkMessageHandler = new "+n+"MessageHandler();\nvar ptkPerformanceMeasure = new "+n+"PerformanceMeasure();";return e},_getDomainFileContent:function(){var e=n+'oDomainContent.PERFORMANCEDOMAIN = "'+require.toUrl(t)+'";';return e}}}),define("sap.watt.saptoolsets.fiori.performancetoolkit/service/PerformanceKPIsSupplier",[],function(){function e(){return{e2eDuration:{error:3750,warning:2750},roundTrips:{error:4,warning:2},backendRequests:{error:4,warning:2}}}return{getProjectKPIs:function(t){var n=this;return n.context.service.document.getDocumentByPath(t).then(function(t){return n.context.service.setting.project.get(n.context.service.performancetoolkit.runner,t).then(function(t){return t?t:e()})})}}}),define("sap.watt.ideplatform.projectsetting/command/Show",{_firstTime:!0,execute:function(){var e=this;return this.context.service.selection.getSelection().then(function(t){var n=t[0];return!(!n||!n.document||n.document.getEntity().isRoot())&&e.context.service.projectsetting.setVisible(!0,n.document)})},isAvailable:function(){return!0},isEnabled:function(){var e=this.context.service.perspective,t=this;return e.getCurrentPerspective().then(function(e){return"development"==e&&t.context.service.selection.getSelection().then(function(e){var t=e[0];return!(1!==e.length||!t||!t.document||t.document.getEntity().isRoot())})})}}),define("sap.watt.ideplatform.projectsetting/service/ProjectSetting",["sap/watt/platform/plugin/platform/service/ui/AbstractPart"],function(e){"use strict";return e.extend("sap.watt.common.plugin.projectsetting.service.ProjectSetting",{_oPanel:null,_oPluginList:null,_oSettingBorderLayout:null,_oTitleLabel:null,_oDescriptionLabel:null,_oTitleDivider:null,_cancelButton:null,_saveButton:null,_oCurrentPlugin:null,_oCurrentPluginButton:null,_mPluginsId:[],_pluginButtons:[],_oCurrentProject:null,_inShowSetting:!1,_generation:null,setVisible:function(e,t,n){if(!t&&e!==!1)return Q();if(e&&n?this.sPluginIdToOpen=n:this.sPluginIdToOpen=null,this._oPanel&&this.sPluginIdToOpen){var r=this;return this._openSpecificPlugin().then(function(){return r._updateVisibleState(e,t,n)})}return this._updateVisibleState(e,t,n)},_updateVisibleState:function(t,n){if(t){var r=arguments;if(n&&!n.getEntity().isRoot()){var i=this;return n.getProject().then(function(t){return i._oCurrentProject&&i._oCurrentProject!==t?i._cleanUI():i._oCurrentPlugin&&!i.sPluginIdToOpen&&(i.sPluginIdToOpen=i._oCurrentPlugin.id),i._oCurrentProject=t,i.context.service.projectType.getProjectTypes(t).then(function(t){return i._oCurrentProject._aProjectTypes=t,e.prototype.setVisible.apply(i,r)})})}throw new Error("ProjectSettings: cannot open editor without defined project")}return e.prototype.setVisible.apply(this,arguments)},_createErrorUI:function(){var e=new sap.ui.commons.layout.BorderLayout({width:"100%",height:"100%",busyIndicatorDelay:0}).addStyleClass("projectsettingPanel");return e},_createUI:function(){var e=this;this._oPanel=(new sap.ui.commons.Splitter).addStyleClass("projectsettingPanel"),this._oPanel.setSplitterOrientation(sap.ui.commons.Orientation.vertical),this._oPanel.setSplitterPosition("15%"),this._oPanel.setMinSizeFirstPane("15%"),this._oPanel.setMinSizeSecondPane("60%"),this._oPanel.setWidth("100%"),this._oPanel.setHeight("100%"),this._oPluginList=new sap.ui.layout.VerticalLayout({width:"100%"}).addStyleClass("pluginList"),this._oPanel.addFirstPaneContent(this._oPluginList),this._oSettingBorderLayout=new sap.ui.commons.layout.BorderLayout({width:"100%",height:"100%",busyIndicatorDelay:0}).addStyleClass("settingBorderLayout"),this._oPanel.addSecondPaneContent(this._oSettingBorderLayout);var t=new sap.ui.layout.VerticalLayout({width:"100%",layoutData:new sap.ui.layout.form.GridElementData({hCells:"16"})});this._oTitleLabel=(new sap.ui.commons.Label).addStyleClass("titleLabel"),t.addContent(this._oTitleLabel),this._oDescriptionLabel=(new sap.ui.commons.Label).addStyleClass("descriptionLabel"),t.addContent(this._oDescriptionLabel),this._oTitleDivider=new sap.ui.commons.HorizontalDivider({visible:!1}).addStyleClass("titlePanelDivider"),t.addContent(this._oTitleDivider),this._oSettingBorderLayout.createArea(sap.ui.commons.layout.BorderLayoutAreaTypes.top,t),this._oSettingBorderLayout.setAreaData(sap.ui.commons.layout.BorderLayoutAreaTypes.top,{size:"120px",visible:!0});var n=new sap.ui.layout.VerticalLayout({width:"100%",layoutData:new sap.ui.layout.form.GridElementData({hCells:"16"})}),r=new sap.ui.layout.HorizontalLayout({allowWrapping:!0,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0})}).addStyleClass("buttonPanel");return this._saveButton=new sap.ui.commons.Button({text:this.context.i18n.getText("i18n","button_save"),tooltip:this.context.i18n.getText("i18n","button_save"),visible:!1,press:function(){e._saveSetting()}}),r.addContent(this._saveButton),this._cancelButton=new sap.ui.commons.Button({text:this.context.i18n.getText("i18n","button_cancel"),tooltip:this.context.i18n.getText("i18n","button_cancel"),press:function(){e._cancelSetting()}}),r.addContent(this._cancelButton),n.addContent(r),this._oSettingBorderLayout.createArea(sap.ui.commons.layout.BorderLayoutAreaTypes.bottom,n),this._oSettingBorderLayout.setAreaData(sap.ui.commons.layout.BorderLayoutAreaTypes.bottom,{size:"54px",contentAlign:"left",visible:!0}),this._oPanel},_sortByName:function(e,t){var n=!0,r=e.group;r&&null!==r||(r=e.name,n=!1);var i=!0,o=t.group;return o&&null!==o||(o=t.name,i=!1),r&&o?ro?1:n&&i?e.namet.name?1:0:0:0},_findExistingGroup:function(e,t){if(e)for(var n=0;n=0)},_isIncludeProjectSettingsUIComponentInAllProjectsTypes:function(e){if(e){if(void 0===e.projectTypes)return!0;if(e.projectTypes.indexOf("*")>=0)return!0}return!1},onProjectTypeConfigSaved:function(){var e=this;if(this._oCurrentProject)return this._updateVisibleState(!0,this._oCurrentProject).then(function(){return e._createList()})}})}),define("sap.watt.ideplatform.userpreference/service/UserPreference",["sap/watt/platform/plugin/platform/service/ui/AbstractPart"],function(e){"use strict";var t=e.extend("sap.watt.ideplatform.plugin.userpreference.service.UserPreference",{_oView:null,_aPlugins:null,_oCurrentPlugin:null,_oCurrentPluginButton:null,_firstPlugin:null,_firstPluginButton:null,configure:function(e){var t=this;this._aStyles=e.styles,this._aPlugins=e.plugins,jQuery.each(this._aPlugins,function(e,n){var r=n.service;r._hasuserPreferenceChangedEvent||(r._hasuserPreferenceChangedEvent=!0,r.attachEvent("userPreferenceChanged",t.onUserPreferenceChanged,t))})},_isAvailablePlugin:function(e){return e&&e.availabilityService?e.availabilityService.isAvailable().then(function(e){return e===!0}):Q(!0)},getPlugins:function(){return this._aPlugins},_sortByName:function(e,t){var n=!0,r=e.group;r&&"null"!=r||(r=e.name,n=!1);var i=!0,o=t.group;return o&&"null"!=o||(o=t.name,i=!1),r&&o?ro?1:n&&i?e.namet.name?1:0:0:0},_findExistingGroup:function(e,t){if(e)for(var n=0;n0)for(var e=0;e=0){var t=this._oFilesTable.getModel().getProperty("/aFileList");this._sSelectedFilePath=t[e].fullPath}},enableOK:function(){this._oFilesTable.getSelectedIndex()>=0?this._oChooseFilePopupFragment.getButtons()[0].setEnabled(!0):this._oChooseFilePopupFragment.getButtons()[0].setEnabled(!1)},cellClick:function(){if(this._sSelectedFilePath){var t=e.openWindow();e.renameWindow(t,this._sWindowId),this._oChooseFilePopupFragment.close(),t=e.openWindow(),e.renameWindow(t,this._sWindowId),this._oDeferred.resolve(!0)}},getFocusElement:function(){},getTitle:function(){},getTooltip:function(){},setVisible:function(){},isVisible:function(){}};return t}),define("sap.watt.ideplatform.commonrunners/service/FileSearchUtil",{getRunnableFiles:function(e,t){var n=this;return e.getProject().then(function(e){if(null!==e){var r=e.getEntity();return r.isRoot()?null:e.getCurrentMetadata(!0).then(function(e){var r=[],i=n._getValidationFunc(t);return n._searchRunnableFiles(e,r,i),r})}return null})},_getValidationFunc:function(e){var t=this;e||(e={include:[],exclude:[]});var n=e.include,r=e.exclude;return t._createValidationFunc(n,r)},_createValidationFunc:function(e,t){var n=function(n){try{for(var r=!1,i=!0,o=0;olbl_error}"}).addStyleClass("runConfigRtt");e.setTooltip(n)}}),define("sap.watt.ideplatform.template/service/Template",["sap/watt/core/Proxy","sap/watt/lib/lodash/lodash"],function(e,t){var n=function(e,t,n,r){this._sId=e,this._mConfig=t,this._oContext=n,this._oProxy=r,this._mResources={}};n.prototype.onAfterGenerate=function(e,t){return this._oProxy.onAfterGenerate(e,t).then(function(n){return void 0===n?[e,t]:[n[0],n[1]]})},n.prototype.onBeforeTemplateGenerate=function(e,t){return this._oProxy.onBeforeTemplateGenerate(e,t).then(function(n){return void 0===n?[e,t]:[n[0],n[1]]})},n.prototype.configWizardSteps=function(){var e=this.getWizardSteps();if(void 0!==e&&e.length>0){for(var t=this,r=n._getTemplateContext(this),i=[],o=0;o0)return this._mResources;var e=n._getTemplateContext(this);if(e&&e.i18n){var t=e.i18n.bundles;for(var r in t){var i=new sap.ui.model.resource.ResourceModel({bundleUrl:t[r],bundleLocale:e.i18n.locale});this._mResources[r]=i}}return this._mResources},n.prototype.getType=function(){return this._mConfig.templateType},n.prototype.getSelectedDataConnectionName=function(){return this._mConfig.selectedDataConnectionName},n.prototype.getSupportedProjectTypes=function(){return this._mConfig.supportedProjectTypes},n.prototype.getCategories=function(){return this._mConfig.category},n.prototype.getTargetProjectTypes=function(){return this._mConfig.targetProjectTypes},n.prototype.getWizardSteps=function(){return this._mConfig.wizardSteps},n.prototype.getIcon=function(){return this._mConfig.icon},n.prototype.getName=function(){return this._mConfig.name},n.prototype.getRequiresNeoApp=function(){return this._mConfig.requiresNeoApp},n.prototype.getRequiresTemplateConfigFiles=function(){return this._mConfig.requiresTemplateConfigFiles},n.prototype.getSupportedODataVersions=function(){return this._mConfig.supportedODataVersions},n.prototype.getInternalOnly=function(){return this._mConfig.internalOnly},n.prototype.getEnabled=function(){return this._mConfig.enabledLocal},n.prototype.getDescription=function(){return this._mConfig.description},n.prototype.getPath=function(){return this._mConfig.path},n.prototype.getFileName=function(){return this._mConfig.fileName},n.prototype.getModelFileName=function(){return this._mConfig.modelFileName},n.prototype.getRunConfigurationsFileName=function(){return this._mConfig.runConfigurationsFileName},n.prototype.getModelRoot=function(){return this._mConfig.modelRoot},n.prototype.getAdditionalData=function(){return this._mConfig.additionalData},n.prototype.getVersion=function(){return this._mConfig.version},n.prototype.getVersionLabel=function(){return this._mConfig.versionLabel},n.prototype.getPreviewImage=function(){return this._mConfig.previewImage},n.prototype.getTemplateCustomizationImage=function(){return this._mConfig.templateCustomizationImage},n.prototype.getTemplateClass=function(){return this._mConfig.template},n.prototype.getRequiredTemplates=function(){return this._mConfig.requiredTemplates},n.prototype.getRequiredModules=function(){return this._mConfig.requiredModules},n.prototype.getRequiredModulePaths=function(){return this._mConfig.requiredModulePaths},n.prototype.getId=function(){return this._mConfig.id},n.prototype.getMetadataPath=function(){return this._mConfig.metadataPath},n.prototype.isCoreTemplate=function(){return this._mConfig.coreTemplate},n.prototype.getOrderPriority=function(){return this._mConfig.orderPriority&&this._mConfig.orderPriority<0&&(this._mConfig.orderPriority=0),this._mConfig.coreTemplate?this._mConfig.orderPriority:this._mConfig.orderPriority?this._mConfig.orderPriority+1e3:this._mConfig.orderPriority},n.prototype.getRecentlyUsed=function(){return this._mConfig.recentlyUsed},n.prototype.getBeautifyFilesFlag=function(){return this._mConfig.beautifyFiles},n.prototype.getUI5Version=function(){return this._mConfig.UI5Version},n.prototype._error=function(e){n._error(this._sId,e)};var r=function(e,t){this._sId=e,this._mConfig=t};r.prototype.getId=function(){return this._mConfig.id},r.prototype.getName=function(){return this._mConfig.name},r.prototype.getDescription=function(){return this._mConfig.description},r.prototype._error=function(e){r._error(this._sId,e)},n._mTemplates={},n._mTemplatesByCategory={},n._oRecentlyUsedTemplates={},n._sRecentlyUsedNode="sap.watt.ideplatform.generationwizard.recentlyUsedTemplates",n._getTemplateContext=function(e){var t=e._oProxy.context,n=e._oProxy._oImpl;return void 0===t&&null!==n&&void 0!==n&&(t=n.context),t},n._getUI5VersionList=function(){return this._aUI5Versions},n.register=function(r,i,o){var a={template:null,id:null,description:null,path:null,fileName:null,previewImage:null,templateCustomizationImage:null,requiredTemplates:null,modelFileName:null,runConfigurationsFileName:null,modelRoot:null,icon:null,category:null,templateType:null,supportedProjectTypes:null,name:null,requiresNeoApp:!1,internalOnly:!1,version:null,versionLabel:null,wizardSteps:null,orderPriority:null,recentlyUsed:null,requiredModules:null,requiredModulePaths:null,coreTemplate:!1,beautifyFiles:!0,UI5Version:null,selectedDataConnectionName:null};if("string"==typeof i?a.template=i:a=jQuery.extend(this._mConfig,i),a.name||(a.name=r),a.description||(a.description=""),a.templateType||(a.templateType="project"),a.version||(a.version="0.0.0"),a.versionLabel||(a.versionLabel=""),!t.isArray(a.category)){var s=[],u="general";a.category&&(u=a.category),s.push(u),a.category=s}if(void 0===a.requiresNeoApp&&(a.requiresNeoApp=!1),void 0===a.internalOnly&&(a.internalOnly=!1),void 0===a.beautifyFiles&&(a.beautifyFiles=!0),void 0===a.UI5Version&&(a.UI5Version=""),a.recentlyUsed||(a.recentlyUsed=0),a.selectedDataConnectionName||(a.selectedDataConnectionName=""),a.template instanceof e){this._isVersionValid(a.version)||o.service.log.error("Template",r+" has a wrong version "+a.version+", template id should be with a semantic versioning (MAJOR.MINOR.PATCH)",["user"]).done();var c=new n(r,a,o,a.template),l=!sap.watt.getEnv("internal")&&c.getInternalOnly();if(!(l||"local_hcproxy"===sap.watt.getEnv("server_type")&&c.getEnabled()===!1))return this._addTemplateToModel(r,c),c}else o.service.log.warning("Template ",r+" needs to be instance of Proxy. Therefore, it will not be registered as a valid template.",["user"]).done()},n.onBeforeTemplateGenerate=function(e){return this._getTemplate(e).onBeforeTemplateGenerate()},n.onAfterGenerate=function(e){return this._getTemplate(e).onAfterGenerate()},n._isVersionValid=function(e){if(e){var t=/^(\d+\.)+(\d+\.)+(\d+)$/;return!!t.test(e)}return!1},n._addTemplateToModel=function(e,t){this._mTemplates[e]||(this._mTemplates[e]=[]);var n=this._mTemplates[e],r=this._getTemplatePosByVersion(n,t.getVersion());r>-1&&n.splice(r,1),n.push(t),n.sort(this._sortVersions)},n._sortVersions=function(e,t){var r=n._isVersionValid(e.getVersion()),i=n._isVersionValid(t.getVersion());return!r&&i?1:!i&&r||!i&&!r?-1:e.getVersion()t.getVersion()?-1:0},n._isTemplateIdExistsInCategory=function(e,t){for(var n=0,r=e.length;n-1&&(r=i[o])}}else this._error(e,"Template not implemented");return r},n._getTemplatePosByVersion=function(e,t){for(var n=0;n0&&(t[r]=i)}return t},_createTemplatesByCategoryModel:function(){if(jQuery.isEmptyObject(n._mTemplatesByCategory))for(var e in n._mTemplates)for(var t=n._mTemplates[e][0],r=t._mConfig.category,i=0;i0)for(var r=0;r0){var a=o[0];t.push(a);var s=a._mConfig.category.indexOf(i);s===-1&&a._mConfig.category.push(i)}}return t})},_setRecentlyUsedParameterForTemplates:function(){for(var e in n._oRecentlyUsedTemplates){var t=n._mTemplates[e];if(t&&t.length>0){var r=t[0];r._mConfig.recentlyUsed=n._oRecentlyUsedTemplates[e]}}},_getsRecentlyUsedOfTemplate:function(){return jQuery.isEmptyObject(n._oRecentlyUsedTemplates)?this.context.service.preferences.get(n._sRecentlyUsedNode).then(function(e){jQuery.isEmptyObject(e)||(n._oRecentlyUsedTemplates=e)}):Q()},getTemplatesPerCategories:function(e,t){var n=this,o=new Array,a=new Array;this._createTemplatesByCategoryModel(),void 0===t&&(t=!0);var s=this._getTemplatesByCategory(e);for(var u in s){var c=r._mCategories[u];if(void 0===c){var l=r._getGeneralCategoryIndex(o);if(l===-1)c=r._mCategories.general,a=s[u],o.push({category:c,templates:a});else{a=s[u];for(var p=0,f=a.length;p0&&o.push({category:c,templates:d})}}return this._getsRecentlyUsedOfTemplate().then(function(){return n._setRecentlyUsedParameterForTemplates(),t?n._getFavoriteTemplatesByType(e).then(function(e){var t=n.getCategoryById(i);return o.push({category:t,templates:e}),o},function(){return n.context.service.log.error("Template","Failed to get favorite templates from user preferences",["user"]).done(),o}):o})},getTemplates:function(e){var t,r,i=this,o={};return this._getsRecentlyUsedOfTemplate().then(function(){if(i._setRecentlyUsedParameterForTemplates(),e)for(r in n._mTemplates)n._mTemplates.hasOwnProperty(r)&&(t=n._mTemplates[r][0],t.getType()===e&&(o[r]=t));else for(r in n._mTemplates)t=n._mTemplates[r][0],o[r]=t;return o})},getAllRequiredTemplates:function(e){var t=[];return n._populateAllRequiredTemplatesRecursive(e,t),t},getTemplate:function(e,t){return n._getTemplate(e,t)},getTemplateVersions:function(e){return n._getTemplateVersions(e)},sortTemplates:function(e,t){return n._sortTemplates(e,t)},getCategories:function(){return this.getTemplatesPerCategories().then(function(e){var t=[];if(e)for(var n=0,i=e.length;n0&&t.push(r._mCategories[o.category._sId])}return t})},getRegisteredCategories:function(){return r._mCategories},getCategoryById:function(e){return r._getCategory(e)},getUI5VersionList:function(){return this.context.service.selecttemplatestepcontent.getValuesForFilter()},_setRecentlyUsedToPreferences:function(e){var t={},r=e.getId();if(!jQuery.isEmptyObject(n._oRecentlyUsedTemplates))for(var i in n._oRecentlyUsedTemplates){var o=n._mTemplates[i];o&&o.length>0&&(t[i]=n._oRecentlyUsedTemplates[i])}return t[r]=Date.now(),this.context.service.preferences.set(t,n._sRecentlyUsedNode).then(function(){n._oRecentlyUsedTemplates=t})},onAfterGeneration:function(e){var t=this,n=e.params.selectedTemplate;return this._getsRecentlyUsedOfTemplate().then(function(){return t._setRecentlyUsedToPreferences(n)})}}}),define("sap.watt.ideplatform.template/service/Generation",["sap/watt/lib/jszip/jszip-shim","sap/watt/lib/lodash/lodash"],function(e,t){"use strict";return{_binaryFilesExtensions:[".jpeg",".jpg",".gif",".bmp",".png",".ttf"],_oTemplateService:null,_oFileService:null,_oDocumentService:null,_aBeautifiedExtentions:null,oFinalJoinedZip:null,init:function(){this._oFileService=this.context.service.filesystem.documentProvider,this._oDocumentService=this.context.service.document,this._oTemplateService=this.context.service.template,this._oMockFileLoader=this.context.service.mockFileLoader,this._oModelHelper=this.context.service.modelHelper,this._oProjectTypeService=this.context.service.projectType,jQuery.sap.require("sap.ui.thirdparty.handlebars"),this._populateBeautifiedExtentions().done()},generateProject:function(e,t,n,r,i){if(!e)throw new TypeError(this.context.i18n.getText("i18n","Generation_generationInvalidPathError"));if(!t)throw new TypeError(this.context.i18n.getText("i18n","Generation_generationNoTemplateSelectedError"));this._usageMonitoring(t);var o;o=t.getTargetProjectTypes(),o||(o=t.getSupportedProjectTypes());var a=o&&o.length>0?o[0]:void 0,s=o&&o.length>1?o.slice(1):[],u=e.split("/"),c=u[u.length-1],l={};l.name=c,l.type=a,l.additionalTypes=s,l.attributes={},l.generatorDescription={options:this._getProjectOptionsFromModel(n,t.getModelRoot())};var p=this;return i?this._createProject(i,l,e,t,n,r):("/"!==e[0]&&(e="/"+e),this._oFileService.getDocument(e).then(function(i){return i?p._addProjectTypes(i,o).then(function(){try{return p.generate(e,t,n,!0,i).then(function(){return i})}catch(e){throw p._deleteGeneratedContentInAlreadyExistingfolder(i),e}}):p._oFileService.getRoot().then(function(i){return p._createProject(i,l,e,t,n,r)})},function(){return p._oFileService.getRoot().then(function(i){return p._createProject(i,l,e,t,n,r)})}))},_usageMonitoring:function(e){var t=null,n=null,r=null;e.getSelectedDataConnectionName()&&(t=e.getSelectedDataConnectionName()),e.getType()&&(n=e.getType()),e.getId()&&(r=e.getId()),this.context.service.usagemonitoring.report("template","finish",r,n,t).done()},_deleteGeneratedContentInAlreadyExistingfolder:function(e){var t=[".project.json","README.md","sap-ui-cachebuster-info.json",".git",".gitignore"];e.getFolderContent().then(function(e){if(e)for(var n=0;n0&&e.push(a._generateSingleZip(s.projectAndModules[c].blob,s.projectAndModules[c].selectedTemplate,r)),u.push(s.projectAndModules[c].selectedTemplate);return Q.all(e).spread(function(){for(var e=[],s=0;s0)for(var s=0;s0)for(var c=0;c0&&""===e.projectAndModules[0].blob&&e.resources.length>0&&e.resources[0].blob.size>0&&(e.projectAndModules=[])},_queueTemplates:function(t,n){return t||(t=new e),Q(function(){return t.load(n.generate(),{base64:!0}),t}())},_afterGenerateHelper:function(t,n,r,i,o,a,s){var u=this;return n||(n=new e),t.onAfterGenerate(n,a).spread(function(e,n){return u.oFinalJoinedZip=e,s?u._addInfoSettings(t,o,n,r):u._beautifyZipFiles(e,t.getBeautifyFilesFlag()).then(function(e){return u._updateWorkspace(e,r,i,t,o).then(function(){return u._addInfoSettings(t,o,n,r)})})})},_addInfoSettings:function(e,t,n,r){var i=this;return i._addTemplateInfoToSettings(e,t).then(function(){return i._addProjectTypeToSettings(e,t).then(function(){return i.context.service.repositorybrowser.setSelection(t,!0).done(),i._fireGenerated(n,r,e,t)})})},_sortTemplatesByTemplateType:function(e){var t=[],n=[];for(var r in e)"resource"===e[r].selectedTemplate.getType()?t.push(e[r]):n.push(e[r]);return{resources:t,projectAndModules:n}},_fireGenerated:function(e,t,n,r){var i={};jQuery.extend(!0,i,e);var o=this;return this.context.event.fireGenerated({path:t,selectedTemplate:n,model:i,targetDocument:r}).fail(function(e){o.context.service.log.error("Generation",e.message,["user"]).done(),console.error(e)})},_beautifyZipFiles:function(e,n){if(!n||!e)return Q(e);var r=e.files,i=[],o=[];for(var a in r)if(r.hasOwnProperty(a)){var s=null;if(!this._isDir(r[a])){s=a.split("/")[a.split("/").length-1];var u=this._getFileExtension(s),c=this;t.includes(this._aBeautifiedExtentions,u)&&(i.push(a),o.push(c.context.service.beautifierProcessor.beautify(r[a].asText(),u,null)))}}return Q.all(o).then(function(t){for(var n=t.length,r=0;rn){var i=e.substring(n+1,r),o="/"+i.replace(/\./g,"/"),a=t.getProperty(o);return e.replace("{"+i+"}",a)}return e},_requiredModules:function(e){var t=e.selectedTemplate.getRequiredModules();if(t)for(var n=0;n-1&&(o=o.substring(0,a));var s=t.substring(t.indexOf("/"));if(r=require.toUrl(o+s),!r)throw new Error(n.context.i18n.getText("i18n","pluginManagement_PluginNotFound",[o]));return Q.sap.ajax(r,{responseType:"blob"}).then(function(t){if(t&&t.length>0)return{blob:t[0],selectedTemplate:e}}).fail(function(){throw new Error(n.context.i18n.getText("i18n","pluginManagement_ResourceNotFound",[t,o]))})},_isDir:function(e){var n=t.endsWith(e.name,"/");return!(!e.options.dir&&!n)},_getFileExtension:function(e){var t="",n=e.lastIndexOf(".");return n>0&&(t=e.substr(n+1)),t.toLowerCase()},_populateBeautifiedExtentions:function(){var e=this;return this.context.service.beautifierProcessor.getBeautifiedExtentions().then(function(t){e._aBeautifiedExtentions=t})}}}),define("sap.watt.ideplatform.template/service/MockFileLoader",{init:function(){jQuery.sap.require("sap.ui.core.util.MockServer")},mockFromZipFile:function(e,t){this._createMockServer(e,null,t)},mockXMLFromZipFile:function(e){this._createMockServer(".+\\.xml$",null,e)},mockFile:function(e,t){var n=new RegExp(sap.ui.core.util.MockServer.prototype._escapeStringForRegExp(e));this._createMockServer(n,t)},_createMockServer:function(e,t,n){var r=this;this._oMockServer=new sap.ui.core.util.MockServer({requests:[{method:"GET",path:new RegExp(e),response:function(e){n&&(t=r._getXMLContentFromZipFile(e,n)),e.respond(200,{"Content-Type":"application/xml;charset=utf-8"},t)}}]}),this._oMockServer.start()},_getXMLContentFromZipFile:function(e,t){var n=e.url.search("/~.+~/"),r=e.url.indexOf("/",n+1),i=e.url.substring(r+1);try{return t.file(i).asText()}catch(e){return null}},stopMock:function(){this._oMockServer&&(this._oMockServer.stop(),this._oMockServer.destroy()),sap.ui.core.util.MockServer.destroyAll()}}),define("sap.watt.ideplatform.template/service/ModelHelper",[],function(){return{getBindingContext:function(e,t){return"string"==typeof e?this._getBindingContextForEntityType(e,t):e.multiplicity?this._getBindingContextForNavigation(e.parent().entityType,e.name,t):e.parent().elements?this._getBindingContextForProperty(e.parent().entityType,e.name,t):e.parent().entities?this._getBindingContextForEntitySet(e.name,t):void 0},_getBindingContextForEntityType:function(e,t){for(var n=t.getObject("/dataServices/schema"),r=0;r0){t.headerWhiteList=[];for(var n=0;n0)return t[0]},_getAllValidators:function(e){var t=this._getLangConfiguredServices(),n=e.getEntity().getFileExtension();return t[n]},_getCurrentProjectValidatorSetting:function(e){return this.context.service.setting.project.get(this.context.self,e)},getProjectValidationConfiguration:function(t,n){var r=this,i=e._getProjectService(r.context),o=r._getValidatorServiceById(n);return Q.all([e._getConfigurationFromProject(r.context,i,t,o,n)]).spread(function(t){var r=e._getProjectValidatorMembers(n,t);return r})},getValidatorsList:function(e,t){return this._getCurrentProjectValidatorSetting(t).then(function(t){var n={};t&&t.services&&(n=t.services);var r=n[e],o=[];if(e&&i[e])for(var a=i[e],s=0;sc){var i=n._getFullPath(t);return n.context.service.log.debug("Code Check","Code check skipped for long file "+i,["user"]).done(),!0}return!1},_getFullPath:function(e){var t=null;return void 0!==e&&e&&(t=e.getEntity().getFullPath()),t},_getDeltaConfiguration:function(){return{}},_getConfigurationsUtils:function(){return e},_getLangConfiguredServices:function(){return i},_setLangConfiguredServices:function(e){i=e}}}),define("sap.watt.ideplatform.basevalidator/lib/projectMetadata",[],function(){function e(e,t){if(!e.getEntity().isProject())throw new Error("project is expected");this.projPath=e.getEntity().getFullPath(),this.levels=t}return e.prototype.getRootPath=function(){return this.projPath},e.prototype.getFilters=function(){return{levels:this.levels}},e}),define("sap.watt.ideplatform.basevalidator/runner/Client/ClientValidationRunner",[],function(){function e(e){return s[e]||e}function t(t,s,u,c){var l=u[0];return s.getCustomRulesContent(c.get("customRulesPath")).then(function(u){var p=l.getEntity().getFullPath();return l.getContent().then(function(f){var d=c.get("validatorState");return s.getIssuesSynchronously(f,c.get("mergedProjectConfiguration"),p,u,d).then(function(u){return Q.all([t.service.issueshandler.getPreValidateEditorRef(),l.getProject()]).spread(function(c,p){if(u.docContent=f,u.editor=c,sap.watt.getEnv(r)===i&&sap.watt.getEnv(o)===a){var d=e(s._sName);return t.service.issues.setIssuesForSingleFile(p,l,d,u)}return t.service.issues.setIssuesForSingleFile(p,l,n,u)})})})})}var n="codeValidation",r="server_type",i="hcproxy",o="ws_server",a="di",s={jsValidator:"@sap/di.code-validation.js",xmlValidator:"@sap/di.code-validation.xml",jsonValidator:"@sap/di.code-validation.json"};return{run:t}}),define("sap.watt.ideplatform.basevalidator/lib/fileResource",[],function(){function e(e){var t=this;if("file"!==e.getType())throw new Error("file is expected");this.fileDocument=e,t.filePath=e.getEntity().getFullPath()}return e.prototype.getPath=function(){return this.filePath},e.prototype.getText=function(){var e=this;return e.text?Q(e.text):this.fileDocument.getContent().then(function(t){return e.text=t,e.text})},e}),define("sap.watt.ideplatform.basevalidator/lib/simpleFileResource",[],function(){function e(e,t){this.filePath=e,this.text=t}return e.prototype.getPath=function(){return this.filePath},e.prototype.getText=function(){return this.text},e}),define("sap.watt.ideplatform.basevalidator/lib/ContextState",["./fileResource","./simpleFileResource"],function(e,t){function n(){this.state={}}return n.prototype.hasValues=function(){return Object.keys(this.state).length>0},n.prototype._isValidatorContextStateType=!0,n.prototype.set=function(e,t){this.state[e]=t},n.prototype.get=function(e){return this.state[e]},n.prototype.toJson=function(){var e=this,t={values:{},types:{}};for(var n in this.state)if(e.state[n]&&e.state[n]._isValidatorContextStateType===!0){var r=e.state[n].toJson();t.values[n]=r,t.types[n]="ContextState"}else t.values[n]=e.state[n],t.types[n]=e.state[n]?e.state[n].constructor.name:typeof e.state[n];return t},n.prototype.fromJson=function(e){var t=e,r=t.values,i=t.types;for(var o in r){var a=r[o],s=i[o];if("ContextState"===s){var u=new n;u.fromJson(a),this.state[o]=u}else this.state[o]=a}},n}),define("sap.watt.ideplatform.basevalidator/runner/Worker/WorkerHelper",["../../lib/ContextState"],function(e){"use strict";var t,n,r,i,o,a=[],s=[],u=!1,c=new Q.sap.Queue,l={init:function(e,o,a){var s=this;return c.next(function(){return n?new Q:(t=Q.defer(),n=new Worker(e),r=o,i=a,n.onmessage=s._onMessage,n.onerror=s._onError,t.promise)})},_onMessage:function(e){if("ready"===e.data.action)t.resolve();else{if(!n)throw new Error("make sure the worker is not terminated");u=l.callPostMessage(),r(e)}},_onError:function(t){if(t.preventDefault(),!n)throw new Error("make sure the worker is not terminated");u=l.callPostMessage();var r=new e;try{r.fromJson(o)}catch(e){i(e)}t.data=t.data||{},t.data.docFullPath=r.get("docFullPath")||{},t.data.validatedContent=r.get("oDocContent")||{},t.data.docIdentifier=r.get("docIdentifier")||{},i(t)},doOperation:function(e,t){if(!n)throw new Error("make sure the worker is not terminated");t.set("action",e);var r=t.get("docFullPath");s[r]||a.push(r);var i=t.toJson();s[r]=i,u||(u=!0,l.callPostMessage())},callPostMessage:function(){var e=a.shift(),t=s[e];return t&&(o=t,n.postMessage(t),delete s[e]),a.length>0},terminateWorker:function(){n&&(n.terminate(),n=void 0)}};return function(e,t,n,r){return this.init(t,n,r).then(function(){return{doOperation:this.doOperation,terminateWorker:this.terminateWorker}}.bind(this))}.bind(l)}),define("sap.watt.ideplatform.basevalidator/runner/Worker/WorkerValidationRunner",["./WorkerHelper","sap.watt.platform.filesystem/document/FileFolderEntity"],function(e,t){function n(e){return l[e]||e}function r(r,l,p,f){var d=p[0].getEntity().getFullPath(),h=p[0].getEntity().getKeyString(),m=p[0];return Q.all([m.getContent(),l.getPathToImplementationModule(),l.getCustomRulesContent(f.get("customRulesPath"))]).spread(function(p,m,g){if(f.set("serviceId",l._sName),f.set("docFullPath",d),f.set("currentServicePath",m),f.set("oCustomRules",g),f.set("oDocContent",p),f.set("docIdentifier",h),!i){var v=require.toUrl("sap.watt.ideplatform.basevalidator/runner/Worker/ValidationWorker.js");return e(r,v,function(e){return Q.all([l.postValidate(e.data.result),r.service.document.getDocument(t.fromKeyString(e.data.docIdentifier))]).spread(function(t,i){var f;return f=t&&"true"===t.isDefault?e.data.result:t,Q.all([r.service.issueshandler.getPreValidateEditorRef(),i.getProject()]).spread(function(e,t){if(f.docContent=p,f.editor=e,sap.watt.getEnv(a)===s&&sap.watt.getEnv(u)===c){var d=n(l._sName);return r.service.issues.setIssuesForSingleFile(t,i,d,f)}return r.service.issues.setIssuesForSingleFile(t,i,o,f)})})},function(e){return r.service.log.warn("Code Check failed for file "+e.data.docFullPath,e.message,["user"]).done(),r.service.document.getDocument(t.fromKeyString(e.data.docIdentifier)).then(function(t){return Q.all([r.service.issueshandler.getPreValidateEditorRef(),t.getProject()]).spread(function(i,p){var f=e.data.result||{};if(f.docContent=e.data.validatedContent,f.editor=i,sap.watt.getEnv(a)===s&&sap.watt.getEnv(u)===c){var d=n(l._sName);return r.service.issues.setIssuesForSingleFile(p,t,d,f)}return r.service.issues.setIssuesForSingleFile(p,t,o,f)})})}).then(function(e){i=e,i.doOperation("validate",f)})}i.doOperation("validate",f)})}var i,o="codeValidation",a="server_type",s="hcproxy",u="ws_server",c="di",l={jsValidator:"@sap/di.code-validation.js",xmlValidator:"@sap/di.code-validation.xml",jsonValidator:"@sap/di.code-validation.json"};return{run:r}}),define("sap.watt.ideplatform.basevalidator/service/validationrunner",["../lib/projectMetadata","../runner/Client/ClientValidationRunner","../runner/Worker/WorkerValidationRunner"],function(e,t,n){function r(r,i,o,a){var s,u=this;return s=a.get("syncExec")?t:n,r.prepare?u.context.service.contextstate.getContextState().then(function(t){var n=a.get("userSettings"),c=new e(i,n.filterLevel.value);return u.context.service.log.debug("Code Check","start prepare validator "+r._sName,["user"]).done(),r.prepare(c,t).then(function(){return u.context.service.log.debug("Code Check","end prepare validator "+r._sName,["user"]).done(),a.set("validatorState",t),s.run(u.context,r,o,a)})}):s.run(u.context,r,o,a)}return{run:r}}),define("sap.watt.ideplatform.basevalidator/service/issueshandler",["sap/watt/lib/lodash/lodash"],function(){return{setPreValidateEditorRef:function(e){this._EditorInstance=e},getPreValidateEditorRef:function(){return this._EditorInstance}}}),define("sap.watt.ideplatform.basevalidator/util/AnnotationsHelper",[],function(){var e={_enableInlineLinting:!0,SORT_CRITERIA:{error:1,warning:2,info:3},setInlineLinting:function(e){this._enableInlineLinting=e},updateAnnotations:function(e,t,n,r){var i=this;return r&&r.document&&n?r.editor.clearAnnotations().then(function(){if(n.issues){var e=i._createAnnotations(n.issues);return r.editor.setAnnotations(e,i._enableInlineLinting)}}).fail(function(t){e.service.log.error("Code Check","Failed to clear or set annotations :"+t.message,["user"]).done()}):Q()},_issuePropertyToDisplayString:function(e){var t=e||"";return t.trim&&0===t.trim().length&&(t=""),t},_getIssueTextForAnnotation:function(e){var t=this._issuePropertyToDisplayString(e.ruleId),n=this._issuePropertyToDisplayString(e.checker),r=this._issuePropertyToDisplayString(e.category),i=this._issuePropertyToDisplayString(e.message),o=e.severity+(r.length>0?": "+r:r);return o+=n.length>0?": "+n:n,o+=t.length>0?"("+t+") ":t,o+=i.length>0?": "+i:i},_createAnnotations:function(e){var t,n,r,i=[],o=e.length;for(e=this._sortIssues(e),t=0;ti?1:0})}catch(e){throw new Error("can not sort the annotations: "+e.message)}return e}};return e}),define("sap.watt.ideplatform.basevalidator/service/annotations",["sap/watt/lib/lodash/lodash","../util/AnnotationsHelper"],function(e,t){var n="sap.watt.common.plugin.aceeditor.service.Editor";return{getSelectionService:function(e){return e.service.selection},getContentService:function(e){return e.service.content},updateTabIndication:function(e,t,n){var r=this;if(t.issues&&t.root){var i;t.root.severity||(i=""),"error"===t.root.severity&&(i="error"),"warning"===t.root.severity&&(i="warning");var o=r.getContentService(e);o.setTabIcon(i,n).done()}},_getAceEditor:function(e){return e.instanceOf("sap.watt.common.plugin.multieditor.service.MultiEditor")?e.getActiveEditor().then(function(e){return e.instanceOf(n)?e:null}):e.instanceOf(n)?Q(e):Q(null)},onIssuesUpdate:function(e){var n=this,r=e.params;if(!r.document||!r.issues)return Q();var i=r.document,o=n.getContentService(n.context);return o.getCurrentDocument().then(function(e){if(i===e)return i.getProject().then(function(e){if(!e)return Q();var a=r.issues[e.getEntity().getFullPath()][i.getEntity().getFullPath()];return a?(n.updateTabIndication(n.context,a,i),o.getCurrentEditor().then(function(e){return e?n._getAceEditor(e).then(function(e){if(e){if(!i.getEntity().isFile())return Q();var r=a.docContent;return t.updateAnnotations(n.context,r,a,{document:i,editor:e}).fail(function(e){n.context.service.log.warn("Code Check","failed to clear or set annotations on editor for file "+i.getEntity().getFullPath()+": "+e.message,["user"]).done()})}return Q()}):Q()}).fail(function(e){n.context.service.log.warn("Code Check","failed to get active editor : "+e.message,["user"]).done()})):Q()})})},onSelectionChanged:function(e){var r=this,i=e.params.selection,o=e.params.owner;if(o.instanceOf(n)&&i&&i.length>0&&i[0]&&i[0].document){var a=i[0].document;return Q.spread([a.getProject(),a.getContent()],function(e,n){return e?r.context.service.issues.getIssuesForSingleFile(e,a).then(function(i){if(!i||i&&i.length<1)return Q();var s={docContent:n,issues:i[0].issues,root:e};return t.updateAnnotations(r.context,n,s,{document:a,editor:o}).fail(function(e){r.context.service.log.error("Code Check","failed to clear or set annotations "+e.message,["user"]).done()})}):Q()})}}}}),define("sap.watt.ideplatform.basevalidator/service/contextstate",["../lib/ContextState"],function(e){function t(){return new e}return{getContextState:t}}),define("sap/watt/common/plugin/platform/service/ui/AbstractConfig",[],function(){"use strict";var e=sap.ui.base.Object.extend("sap.watt.common.plugin.platform.service.ui.AbstractConfig",{getProjectSettingContent:function(e,t){return Q()},saveProjectSetting:function(e,t){return Q()},getUserPreferenceContent:function(e,t){return Q()},saveUserPreference:function(e,t){return Q()}});return e}),define("sap.watt.ideplatform.basevalidator/util/DTConfigurationHandler",["sap/watt/lib/lodash/lodash","../util/ConfigurationsUtils"],function(e,t){var n="Invalid initialization of DTConfigurationHandler",r=function(e,t){for(var n in e)t[n]||delete e[n];return e},i=function(n,i,o,a){this.projectIdentifier=o,this.validatorId=a,this.oValidatorProxy=i,this.oContext=n,this.getUpdatedRules=function(e,t){var n=this;return Q.all([n.oValidatorProxy.getDefaultConfiguration(e),n.oValidatorProxy.getDefaultConfiguration()]).spread(function(e,i){return n.oValidatorProxy.convertConfigurationToDisplayFormat(i).then(function(i){var o=i||{},a=r(t,o.rules);return n.oValidatorProxy.convertConfigurationToConcreteFormat({rules:a}).then(function(t){return n.oValidatorProxy.mergeConfigurations(e,t).then(function(e){return n.oValidatorProxy.convertConfigurationToDisplayFormat(e).then(function(e){return e.rules})})})})})},this.getValidatorConfigurationForDisplay=function(e){var n=this,r=t._getProjectService(n.oContext);return t._getConfigurationFromProject(n.oContext,r,n.projectIdentifier,n.oValidatorProxy,n.validatorId).then(function(r){var i=t._getProjectValidatorMembers(n.validatorId,r);if(i.configuration){var o=e?void 0:i.customRulesPath;return n.oValidatorProxy.getDefaultConfiguration(o).then(function(t){return Q(!e&&i.configuration?n.oValidatorProxy.mergeConfigurations(t,i.configuration):t).then(function(e){return n.oValidatorProxy.convertConfigurationToDisplayFormat(e).then(function(e){return{configuration:e||{},customRulesPath:o,services:r.services||{}}})})})}return Q(e?n.oValidatorProxy.getDTDefaultConfiguration(n.projectIdentifier):n.oValidatorProxy.getDTConfiguration(n.projectIdentifier)).then(function(e){return{configuration:e||{},customRulesPath:e.customRulesPath,services:e.services||{}}})})},this.saveValidatorConfiguration=function(e){var n=this,r=t._getProjectService(n.oContext);return n.oContext.service.document.getDocumentByPath(n.projectIdentifier).then(function(t){return r.get(n.oContext.service.basevalidator,t).then(function(i){return n.oValidatorProxy.hasConfigurationService()?(n._adjustCustomRulesPathForValidator(e),n.oValidatorProxy.saveDTConfiguration(n.projectIdentifier,e.configuration).then(function(){return n._removeConfigurationFromProjectSettings(i),i=n.updateValidatorService(i,e),r.set(n.oContext.service.basevalidator,i,t).then(function(){return r.get(n.oContext.service.basevalidator,t)})})):(i=n.updateValidatorService(i,e),r.set(n.oContext.service.basevalidator,i,t).then(function(){return r.get(n.oContext.service.basevalidator,t)}))})})},this.updateValidatorService=function(t,n){return t=t||{},t.services=e.merge(e.cloneDeep(t.services),n.services),t},this._adjustCustomRulesPathForValidator=function(t){t&&t.customRulesPath&&t.configuration&&(t.configuration.customRulesPath=t.customRulesPath,e.unset(t,"customRulesPath"))},this._removeConfigurationFromProjectSettings=function(t){var n=this;if(t&&t.validators){var r=e.filter(t.validators,function(e){return!!e.configuration&&(n.validatorId!==e.validatorID||(n.oContext.service.usernotification.info(n.oContext.i18n.getText("i18n","dlg_projectjson_migration_messagebox")).done(),!1))});t.validators=r,0==r.length?e.unset(t,"validators"):null}}},o=function(e,t,r){return t&&e?t.getCurentValidatorServiceIdentifier().then(function(o){return o&&r?new i(e,t,r,o):Q.reject(new Error(n))}):Q.reject(new Error(n))};return{get:o}}),define("sap.watt.ideplatform.basevalidator/service/ValidatorProjectSettingConfig",["sap/watt/common/plugin/platform/service/ui/AbstractConfig","../util/DTConfigurationHandler"],function(e,t){"use strict";return e.extend("sap.watt.common.plugin.linter.basevalidator.ValidatorProjectSettingConfig",{_oValidatorView:null,_oValidatorController:null,_getfileExtensionByMenueId:function(e){if("esLintSetting"===e)return"js"},getProjectSettingContent:function(e,n,r){var i=this;return i._oValidatorView?this._oValidatorView.getController().setProjectPath(r):i._oValidatorView=new sap.ui.view({viewName:"sap.watt.ideplatform.plugin.basevalidator.view.ValidatorSetting",type:sap.ui.core.mvc.ViewType.XML,viewData:{context:i.context,configHandler:t,projectPath:r}}),i._oValidatorView._projectPath=r,i._oValidatorController=i._oValidatorView.getController(),i._oValidatorView},saveProjectSetting:function(e,t,n){var r=this._oValidatorController.getErrorMessgae();if(r)return Q.reject(r);var i=this._oValidatorController.getConfigHandlerInst();if(i){var o=this._oValidatorController.getConfiguredValues(),a=this;return i.saveValidatorConfiguration(o).then(function(){return a.context.service.basevalidator.validatorConfigurationsChangeHandler(n)})}}})}),define("sap.watt.ideplatform.basevalidator/service/ValidatorUserSettings",[],function(){"use strict";return{_sLintingSettingNode:null,configure:function(e){this._sLintingSettingNode=e.lintingSetting.node},_loadSetting:function(){var e=this,t={disabledCodeCheck:!1,trigger:"onChange",filterLevel:{key:"e_w_i",value:["error","warning","info"]}},n=this._getPreferencesService();return n.get(e._sLintingSettingNode).then(function(n){return n&&(t.disabledCodeCheck=e._setDisbaleCodeCheck(n),t.trigger=e._setTriggeringCodeCheck(n),n.filterLevel?t.filterLevel=n.filterLevel:t.disabledCodeCheck&&(t.filterLevel={key:"none",value:[]})),t})},_setDisbaleCodeCheck:function(e){return e&&void 0!==e.disabledCodeCheck?e.disabledCodeCheck:"noLinting"===e.lintingTrigger},_setTriggeringCodeCheck:function(e){return e&&void 0!==e.trigger?e.trigger:"onSaveESLint"===e.lintingTrigger||"onSaveESLintAndJSHint"===e.lintingTrigger?"onSave":("onChangeESLint"===e.lintingTrigger||"onChangeESLintAndJSHint"===e.lintingTrigger,"onChange")},_storeSetting:function(e){var t=this,n=this._getPreferencesService();return n.remove(t._sLintingSettingNode).then(function(){return n.set(e,t._sLintingSettingNode)})},_getPreferencesService:function(){return this.context.service.preferences},getCurrentLintingSettings:function(){return this._loadSetting().then(function(e){return e})},setCurrentLintingSettings:function(e){return e.filterLevel&&(e.disabledCodeCheck=0===e.filterLevel.value.length),this._storeSetting(e)}}}),define("sap.watt.ideplatform.basevalidator/service/ValidatorProjectSetting",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{_oSaveQueue:new Q.sap.Queue,setSelectedValidatorSettings:function(e,t,n){var r=this;this._oSaveQueue.next(function(){return r.context.service.log.debug("Code Check","Set validator settings of "+t,["user"]).done(),r.context.service.setting.project.getProjectSettings("basevalidator",n,!0).then(function(i){return i=i||{},i.services=i.services||{},i.services[e]=t,r._setProjectSettings(i,n)}).fail(function(e){r.context.service.log.error("Code Check","Failed to set validator settings of "+t+": "+e.message,["user"]).done()})})},_setProjectSettings:function(e,t){return this.context.service.setting.project.setProjectSettings("basevalidator",e,t)}}}),define("sap.watt.ideplatform.beautify/util/Utilities",[],function(){"use strict";return{beautifierCommand:function(e,t,n){var r=e,i=this,o=t&&t.getEntity().getFileExtension();return o?t.getContent().then(function(e){return e.length>0?r.service.beautifierProcessor.beautify(e,o,null).then(function(t){return e!==t?i._setContentInEditor(r,t).then(function(){r.service.usagemonitoring.report("editor",n?"format_content":"formatUponSave",o).done()}).fail(function(){r.service.log.debug("Beautify","Beautify process failed to set content for file type "+o,["user"]).done()}):Q()}).fail(function(){r.service.log.debug("Beautify","Beautify process for file type "+o+" has failed",["user"]).done()}):Q()}):Q()},_setContentInEditor:function(e,t){return this._getCodeEditor(e).then(function(e){return e?e.getUI5Editor().then(function(e){if(e){var n=e.getCursorPosition();return e.setDocValue(t),n?Q(e.moveCursorTo(n.row,n.column)):Q()}}):Q()})},_getCodeEditor:function(e){return e.service.selection.getOwner().then(function(e){return e&&e.instanceOf("sap.watt.common.plugin.aceeditor.service.Editor")?e:null})}}}),define("sap.watt.ideplatform.beautify/command/BeautifyCommand",["../util/Utilities"],function(e){"use strict";var t="disable-beautify";return{_isBeautificationEnabled:function(){return!jQuery.sap||"true"!==jQuery.sap.getUriParameters().get(t)},execute:function(){var t=this.context.service;t.usagemonitoring.startPerf("editor","format_content").done();var n=this;return t.selection.getSelection().then(function(t){var r=t&&t[0];return r?e.beautifierCommand(n.context,r.document,!0):Q()})},isAvailable:function(){var e=this;return this._isReadOnly(this.context.service.selection).then(function(t){return e._isBeautificationEnabled()&&!t})},_isAceEditorInstance:function(){return this._getVisibleAceEditor().then(function(e){return!!e})},_getVisibleAceEditor:function(){return this.context.service.selection.getOwner().then(function(e){return e&&e.instanceOf&&e.instanceOf("sap.watt.common.plugin.aceeditor.service.Editor")?e:null})},isEnabled:function(){var e=this;return this._isAceEditorInstance().then(function(t){if(t){var n=e.context.service.selection,r=e.context.service.beautifierProcessor;return n.getSelection().then(function(e){var t=e.length>0&&e[0];if(t){var n=t.document&&t.document.getEntity().getFileExtension();return r.hasBeautifierForFileExtension(n)}return!1})}return!1})},_isReadOnly:function(e){return e.getSelection().then(function(e){return!e[0]||!e[0].document||e[0].document.isReadOnly()})}}}),define("sap.watt.ideplatform.beautify/service/BeautifierProcessor",["../util/Utilities"],function(e){"use strict";var t={_beautifiers:{},configure:function(e){var t=e.beautifier||[],n=this;t.forEach(function(e){if(e)for(var t=e.fileExtensions||[],r=0;r=0})},e}),define("sap.watt.ideplatform.gerrit/command/openGerritPane",["sap.watt.common.perspective/command/AbstractUIPartToggler"],function(e){"use strict";var t="server_type",n="hcproxy",r=function(){return sap.watt.getEnv(t)===n},i=function(){e.apply(this,arguments)};return i.prototype=jQuery.extend({},e.prototype,{isAvailable:function(){var e=this;if(r())return!(!e.context.service.git||!e.context.service.git.getGitSettings)&&e.context.service.git.getGitSettings().then(function(e){return!(!e||!e.bShowGerritPane)&&e.bShowGerritPane})}}),i}),define("sap.watt.ideplatform.gerrit/service/Gerrit",["sap/watt/lib/lodash/lodash"],function(e){"use strict";var t=new Q.sap.Queue,n="a",r="HTTPS",i="gerrit.createchangeid",o="remote.origin.url",a="remote.origin.hcpdestination",s={sRemoteValue:null,sGitHost:"",sProjectName:null,getChanges:function(e,t){var n=t?t:this,r=n._getBasicURL();return n._getSelectedProject(n).then(function(t){n.isGerritProject(t).then(function(i){return i?(r=n._getChangesURL(r,t),n._getHeader(e,t).then(function(e){return e&&e.Authorization?n._ajaxCall(r,e,n.getChanges,n).then(function(e){return n._handleAjaxResponseForGetChangesFunc(e,t)}):n._getUserAuthenticationDialog(n.getChanges,n)})):n.context.service.gerritPane.isNotGerritProject()})})},isAuthenticated:function(e){var t=this;return this.getGerritHost().then(function(e){return t.context.service.keystorage.get(e,r).then(function(e){return!!e&&!!e.username&&!!e.password})})},getGerritHost:function(e){var t=this;if(this.sGitHost)return Q(this.sGitHost);if(this.sRemoteValue)return this.context.service.destination.getDestinations("git_on_premise").then(function(e){return t.sGitHost=t._getGitDestinationAdditionalData(e,t.sRemoteValue),t.sGitHost||""});throw t.context.i18n.getText("i18n","missing_remote_value")},submitChangeById:function(e,t){var n=t?t:this;if(e){var r=n._getSubmitUrl(e);return n._getHeader(e).then(function(t){return t&&t.Authorization?n._ajaxCall(r,t,n.submitChangeById,n,"POST").then(function(t){return n._handleAjaxResponseForSubmitChangeByIdFunc(t,e)}):n._getUserAuthenticationDialog(n.submitChangeById,n,!1,e)})}this.context.service.log.error("ide",this.context.i18n.getText("i18n","submitChangeById_missing_params"),["user","system"]).done()},isGerritProject:function(e){var t=this;return this._getGitRepositoryConfigurations(e).then(function(n){if(n&&n.length>0){var r=t._getConfigurationValue(n,i);if(!r)return Q(!1);var s=t._getConfigurationValue(n,a);if(t.sRemoteValue=s.length>0?s[0]:"",!t.sRemoteValue)return t.context.service.log.error("ide",t.context.i18n.getText("i18n","missing_remote_value"),["user","system"]).done(),Q(!1);var u=t._getConfigurationValue(n,o);return t._setProjectNameFromFullUrl(u,e).then(function(){return t.sProjectName?!!r&&!!t.sRemoteValue&&!!t.sProjectName:(t.context.service.log.error("ide",t.context.i18n.getText("i18n","missing_project_name"),["user","system"]).done(),Q(!1))})}return Q(!1)})},_ajaxCall:function(e,n,r,i,o){var a=o||"GET";return t.next(function(){try{return Q.sap.ajax(e,{headers:n,dataType:"text",method:a}).then(function(e){return e}).fail(function(e){switch(e.status){case 401:var t=!0;return i._getUserAuthenticationDialog(r,i,t);default:throw e}})}catch(e){i.context.service.log.error("ide",i.context.i18n.getText("i18n","ajax_fails"),["user","system"]).done()}})},_getGitRepositoryConfigurations:function(e){return e&&e.getEntity()&&e.getEntity().getBackendData()&&e.getEntity().getBackendData().git?this.context.service.git.getRepositoryConfigurations(e.getEntity().getBackendData().git).then(function(e){return e||[]}):Q([])},_setProjectNameFromFullUrl:function(e,t){var n=this;return this.sProjectName=void 0,this.getGerritHost(t).then(function(t){if(t&&e[0]){var r=n._parseProjectNameFromUrlByUsingGitHost(e[0],t);r?n.sProjectName=r:n.context.service.log.error("ide",n.context.i18n.getText("i18n","wrong_git_host"),["user","system"]).done()}else n.context.service.log.error("ide",n.context.i18n.getText("i18n","missing_git_host"),["user","system"]).done()})},_handleAjaxResponseForGetChangesFunc:function(e,t){if(e){this._getGerritDialogView().getController().cancel();var n=this._getChangesFromResponse(e);return this._setGeneralDataToModel(n,t),this.context.service.gerritPane.setNewChanges(n,t.getTitle())}},_handleAjaxResponseForSubmitChangeByIdFunc:function(e,t){e?(this._getGerritDialogView().getController().cancel(),e&&"success"===e[2]&&this.getChanges(t,this)):this.context.service.log.error("ide",this.context.i18n.getText("i18n","no_host_response"),["user","system"]).done()},_parseProjectNameFromUrlByUsingGitHost:function(t,n){var r=t.split(n);if(r[1])return r=r[1].split("/a/"),1!==r.length&&(r=[r[1]]),"/"===r[0].charAt(0)&&(r[0]=r[0].substr(1)),e.endsWith(r[0],".git")?r[0].substring(0,r[0].length-4):r[0]||void 0},_getChangesURL:function(e,t){return e=e+"/"+this.sRemoteValue+"/"+n+"/changes/?q=is:open+owner:self+project:"+this.sProjectName+"&q=is:open+reviewer:self+-owner:self+project:"+this.sProjectName+"&o=LABELS&o=CURRENT_REVISION&o=DETAILED_ACCOUNTS"},_getSubmitUrl:function(e){var t=this._getBasicURL();return t=t+"/"+this.sRemoteValue+"/"+n+"/changes/"+e.sNumber+"/revisions/"+e.sCurrentRevision+"/submit"},_getBasicURL:function(){ return sap.watt.getEnv("context_root")+"destinations"},_getConfigurationValue:function(e,t){if(e)for(var n=0;n0){var t=e[0].document;if(t)return t.getProject().then(function(e){return e})}})},_setGeneralDataToModel:function(e,t){e.generalData={},e.generalData.branchName=t.getTitle()}};return s}),define("sap/watt/ui/utils/ProxyUtils",["sap/watt/lib/lodash/lodash"],function(e){"use strict";var t={_validateAggregation:function(e,t,n){return"_sMutator"!==t&&"_sInsertMutator"!==t||e.multiple&&!n?n:this.validateAggregation(e.name,n,e.multiple)},_addProxyMethods:function(n,r,i,o,a,s){function u(e,i){n.metadata[i]&&(r.metadata[i]?n.control.prototype[n.metadata[i]]=function(){var o,u=a.apply(this),c=arguments;if(s&&(o=t._validateAggregation.call(this,n.metadata,i,c[0]),o!==c[0])){var l=arguments.length;for(c=Array(l);l--;)c[l]=arguments[l];c[0]=o}return o=r.control.prototype[r.metadata[i]].apply(u,c),e?o:this}:(jQuery.sap.log.error("ProxyUtils - bad mapping: cannot map "+n.control.getMetadata().getName()+"."+n.metadata[i]+" to "+r.control.getMetadata().getName()),n.control.prototype[n.metadata[i]]=function(){return e?void 0:this}))}e.each(i,e.partial(u,!0)),e.each(o,e.partial(u,!1))},addPropertyProxyMethods:function(e,n,r){e.metadata=e.control.getMetadata().getProperty(e.property),n.metadata=n.control.getMetadata().getProperty(n.property),t._addProxyMethods(e,n,["_sGetter"],["_sMutator","_sBind","_sUnbind"],r)},addAggregationProxyMethods:function(e,n,r){e.metadata=e.control.getMetadata().getAggregation(e.aggregation),n.metadata=n.control.getMetadata().getAggregation(n.aggregation),t._addProxyMethods(e,n,["_sGetter","_sRemoveMutator","_sRemoveAllMutator","_sIndexGetter"],["_sMutator","_sInsertMutator","_sDestructor","_sBind","_sUnbind"],r,!0)},addEventProxyMethods:function(e,n,r){e.metadata=e.control.getMetadata().getEvent(e.event),n.metadata=n.control.getMetadata().getEvent(n.event),t._addProxyMethods(e,n,["_sTrigger"],["_sMutator","_sDetachMutator"],r)},addGetterMethodProxy:function(e,n,r,i){var o={};o[r]=r,t._addProxyMethods({metadata:o,control:e},{metadata:o,control:n},[r],[],i)},addSetterMethodProxy:function(e,n,r,i){var o={};o[r]=r,t._addProxyMethods({metadata:o,control:e},{metadata:o,control:n},[],[r],i)}};return t}),define("sap/watt/ui/control/sidepane/SidePanePart",["sap/watt/lib/lodash/lodash","../../utils/ProxyUtils"],function(e,t){"use strict";jQuery.sap.declare("sap.watt.ui.control.sidepane.SidePanePart"),jQuery.sap.declare("sap.ui.core.CustomStyleClassSupport"),jQuery.sap.require("sap.ui.layout.SplitPane"),jQuery.sap.require("sap.ui.layout.SplitterLayoutData");var n=sap.ui.layout.SplitPane.extend("sap.watt.ui.control.sidepane.SidePanePart",{metadata:{properties:{visible:{type:"boolean",group:"Appearance",defaultValue:!0},hasSplitter:{type:"boolean",group:"Appearance",defaultValue:!1},verticalContentAlign:{type:"sap.ui.core.VerticalAlign",group:"Appearance",defaultValue:sap.ui.core.VerticalAlign.Inherit},size:{type:"sap.ui.core.CSSSize",group:"Appearance",defaultValue:"auto"},minSize:{type:"int",group:"Dimension",defaultValue:36},maxSize:{type:"int",group:"Appearance",defaultValue:Number.MAX_VALUE},requiredParentHeight:{type:"int",defaultValue:0},enableVerticalScrolling:{type:"boolean",group:"Behavior",defaultValue:!0},enableHorizontalScrolling:{type:"boolean",group:"Behavior",defaultValue:!0}}}});n.prototype.init=function(){sap.ui.layout.SplitPane.prototype.init&&sap.ui.layout.SplitPane.prototype.init.apply(this,arguments),this.setRequiredParentWidth(0),this._oContent=null,this._oLayoutData=null,this._oHiddenLayoutData=null,this.toggleStyleClass("sapWattSidePanePartNoVScroll",!this.getProperty("enableVerticalScrolling")),this.toggleStyleClass("sapWattSidePanePartNoHScroll",!this.getProperty("enableHorizontalScrolling"))},n.prototype.exit=function(){e.each([this._oContent,this._oLayoutData],function(e){e&&e.destroy&&!e.bIsDestroyed&&e.destroy()}),this._oContent=null,this._oLayoutData=null,this._oHiddenLayoutData=null},t.addPropertyProxyMethods({control:n,property:"size"},{control:sap.ui.layout.SplitterLayoutData,property:"size"},function(){return this.getLayoutData()}),t.addPropertyProxyMethods({control:n,property:"minSize"},{control:sap.ui.layout.SplitterLayoutData,property:"minSize"},function(){return this.getLayoutData()}),t.addPropertyProxyMethods({control:n,property:"hasSplitter"},{control:sap.ui.layout.SplitterLayoutData,property:"resizable"},function(){return this.getLayoutData()}),n.prototype.setMaxSize=function(e){return jQuery.sap.log.error("SidePanePart.prototype.setMaxSize is not implemented yet"),this},n.prototype.getMaxSize=function(){return jQuery.sap.log.error("SidePanePart.prototype.getMaxSize is not implemented yet"),this.getProperty("maxSize")},n.prototype.setRequiredParentHeight=function(e){return jQuery.sap.log.error("SidePanePart.prototype.setRequiredParentHeight is not implemented yet"),this},n.prototype.getRequiredParentHeight=function(){return jQuery.sap.log.error("SidePanePart.prototype.getRequiredParentHeight is not implemented yet"),this.getProperty("requiredParentHeight")},n.prototype.getLayoutData=function(){return this._oLayoutData||(this._oLayoutData=new sap.ui.layout.SplitterLayoutData({size:this.getProperty("size"),minSize:this.getProperty("minSize"),resizable:this.getProperty("hasSplitter")})),this._oLayoutData},n.prototype.setLayoutData=function(e){return!e||e instanceof sap.ui.layout.SplitterLayoutData?(this._oLayoutData=e,sap.ui.layout.SplitPane.prototype.setLayoutData.apply(this,arguments)):(jQuery.sap.log.error("oLayoutData must be an instance of sap.ui.layout.SplitterLayoutData, null or undefined"),this)},n.prototype.setContent=function(e){e&&(e=new r({visible:this.getVisible(),content:e,layoutData:this.getLayoutData()}),this._applyStyles(e,!0)),this._oContent=e,sap.ui.layout.SplitPane.prototype.setContent.call(this,e)},n.prototype.setEnableVerticalScrolling=function(e){return this.setProperty("enableVerticalScrolling",e,!0),this.toggleStyleClass("sapWattSidePanePartNoVScroll",!e)},n.prototype.setEnableHorizontalScrolling=function(e){return this.setProperty("enableHorizontalScrolling",e,!0),this.toggleStyleClass("sapWattSidePanePartNoHScroll",!e)},n.prototype.setVerticalContentAlign=function(e){var t=this.getProperty("verticalContentAlign");return this.setProperty("verticalContentAlign",e,!0),this.removeStyleClass("sapWattSidePanePartVerticalAlign"+t,!0).addStyleClass("sapWattSidePanePartVerticalAlign"+e)},n.prototype.setVisible=function(e){if(e=!!e,this.getVisible()!==e)return e?this._oHiddenLayoutData&&(this.setSize(this._oHiddenLayoutData.size),this.setMinSize(this._oHiddenLayoutData.minSize),this.setHasSplitter(this._oHiddenLayoutData.hasSplitter)):(this._oHiddenLayoutData={size:this.getSize(),minSize:this.getMinSize(),hasSplitter:this.getHasSplitter()},this.setMinSize(0),this.setSize("0px"),this.setHasSplitter(!1)),this._oContent&&this._oContent.setVisible(e),this.setProperty("visible",e,!0)},sap.ui.core.CustomStyleClassSupport.apply(n.prototype),n.prototype._applyStyles=function(t,n){if(t){var r=e.difference(t.aCustomStyleClasses,this.aCustomStyleClasses),i=e.difference(this.aCustomStyleClasses,t.aCustomStyleClasses);r.length&&t.removeStyleClass(e.join(r," "),n),i.length&&t.addStyleClass(e.join(i," "),n)}return this},function(){var e=n.prototype.addStyleClass,t=n.prototype.removeStyleClass;n.prototype.addStyleClass=function(t,n){return e.call(this,t,!0),this._applyStyles(this._oContent,n)},n.prototype.removeStyleClass=function(e,n){return t.call(this,e,!0),this._applyStyles(this._oContent,n)}}();var r=sap.ui.core.Control.extend("sap.watt.ui.control.sidepane.SidePanePart._Wrapper",{metadata:{aggregations:{content:{type:"sap.ui.core.Control",multiple:!1,singularName:"content"}}},renderer:function(e,t){e.write(""),e.renderControl(t.getContent()),e.write("")},init:function(){var e=this;this._iResizeListenerId,this._onResize=function(){var t=e.$(),n=t.parent().get(0);n&&(t.css("width",n.style.width),t.css("height",n.style.height))}},onAfterRendering:function(){this.isResizeListenerId=sap.ui.core.ResizeHandler.register(this.$().parent().get(0),this._onResize),this._onResize()},onBeforeRendering:function(){this._iResizeListenerId&&(sap.ui.core.ResizeHandler.deregister(this._iResizeListenerId),this._iResizeListenerId=null)}});return n}),define("sap/watt/ui/control/sidepane/SidePaneTab",["../../utils/ProxyUtils","./SidePanePart"],function(e){"use strict";jQuery.sap.declare("sap.watt.ui.control.sidepane.SidePaneTab"),jQuery.sap.require("sap.ui.layout.ResponsiveSplitter"),jQuery.sap.require("sap.ui.layout.PaneContainer"),jQuery.sap.require("sap.m.OverflowToolbar");var t=sap.ui.core.Control.extend("sap.watt.ui.control.sidepane.SidePaneTab",{metadata:{properties:{headerText:{type:"string",group:"Data",defaultValue:""},isSelected:{type:"boolean",group:"Misc",defaultValue:!1},highToolbar:{type:"boolean",group:"Appearance",defaultValue:!1}},defaultAggregation:"content",aggregations:{toolbar:{type:"sap.m.OverflowToolbar",multiple:!1},content:{type:"sap.watt.ui.control.sidepane.SidePanePart",multiple:!0,singularName:"content"},_splitter:{type:"sap.ui.layout.ResponsiveSplitter",multiple:!1,visibility:"hidden"}},events:{selected:{},_requestSelection:{}}},renderer:function(e,t){var n=t.getToolbar();e.write(""),n&&(e.write(""),e.renderControl(t.getToolbar()),e.write("")),e.write(""),e.renderControl(t.getAggregation("_splitter")),e.write(""),e.write("")}});return t.prototype.init=function(){this.setAggregation("_splitter",new sap.ui.layout.ResponsiveSplitter({rootPaneContainer:new sap.ui.layout.PaneContainer({orientation:sap.ui.core.Orientation.Vertical})}))},e.addAggregationProxyMethods({control:t,aggregation:"content"},{control:sap.ui.layout.PaneContainer,aggregation:"panes"},function(){return this.getAggregation("_splitter").getRootPaneContainer()}),t.prototype.setParent=function(){return sap.ui.core.Control.prototype.setParent.apply(this,arguments),this.getParent()instanceof sap.m.IconTabFilter&&this.getParent().setText(this.getHeaderText()),this},t.prototype.setHeaderText=function(e){return this.setProperty("headerText",e,!0),this.getParent()instanceof sap.m.IconTabFilter&&this.getParent().setText(e),this},t.prototype.setIsSelected=function(e){return this.getIsSelected()===e?this:(e&&this.fireEvent("_requestSelection"),this.setProperty("isSelected",e,!0))},t.prototype._setOrientation=function(e){this.getAggregation("_splitter").getRootPaneContainer().setOrientation(e)},t}),define("sap/watt/ui/control/sidepane/SidePaneFormElement",[],function(){"use strict";jQuery.sap.declare("sap.watt.ui.control.sidepane.SidePaneFormElement"),jQuery.sap.require("sap.m.FlexBox");var e=sap.m.FlexBox.extend("sap.watt.ui.control.sidepane.SidePaneFormElement",{metadata:{interfaces:["sap.watt.ui.control.sidepane.SidePaneFormItem"]},renderer:{}});return e.prototype.init=function(){this.addStyleClass("sapWattSideFormElement"),this.setAlignItems(sap.m.FlexAlignItems.Start),this.setWidth("100%")},e}),define("sap/watt/ui/control/sidepane/SidePaneFormLabel",[],function(){"use strict";jQuery.sap.declare("sap.watt.ui.control.sidepane.SidePaneFormLabel"),jQuery.sap.require("sap.m.Label");var e=sap.m.Label.extend("sap.watt.ui.control.sidepane.SidePaneFormLabel",{metadata:{interfaces:["sap.watt.ui.control.sidepane.SidePaneFormItem"]},renderer:{}});return e.prototype.init=function(){this.setDesign(sap.m.LabelDesign.Bold),this.addStyleClass("sapWattSideFormLabel")},e.prototype.setText=function(e){var t=this.getText();if(sap.m.Label.prototype.setText.apply(this,arguments),t!==e&&this.getDomRef()){for(var n=this.getParent();n&&"sap.watt.ui.control.sidepane.SidePaneForm"!==n.getMetadata().getName();)n=n.getParent();n&&"sap.watt.ui.control.sidepane.SidePaneForm"===n.getMetadata().getName()&&n.alignLabels()}return this},e}),define("sap/watt/ui/control/sidepane/SidePaneForm",["sap/watt/lib/lodash/lodash","../../utils/ProxyUtils","./SidePaneFormElement","./SidePaneFormLabel"],function(e,t){"use strict";jQuery.sap.declare("sap.watt.ui.control.sidepane.SidePaneForm"),jQuery.sap.require("sap.ui.layout.form.SimpleForm");var n=sap.ui.core.Control.extend("sap.watt.ui.control.sidepane.SidePaneForm",{metadata:{defaultAggregation:"content",aggregations:{content:{type:"sap.watt.ui.control.sidepane.SidePaneFormItem",multiple:!0,singularName:"content"},_form:{type:"sap.ui.layout.form.SimpleForm",multiple:!1,visibility:"hidden"}}},renderer:function(e,t){e.write(""),e.renderControl(t.getAggregation("_form")),e.write("")}});return n.prototype.init=function(){this.setAggregation("_form",new sap.ui.layout.form.SimpleForm({layout:sap.ui.layout.form.SimpleFormLayout.GridLayout}))},t.addAggregationProxyMethods({control:n,aggregation:"content"},{control:sap.ui.layout.form.SimpleForm,aggregation:"content"},function(){return this.getAggregation("_form")}),n.prototype.onAfterRendering=function(){var e=this.$().find(".sapUiGrid");jQuery("colgroup col",e).remove(),jQuery("colgroup",e).append(""),jQuery("td",e).removeAttr("colspan"),this.alignLabels()},n.prototype.alignLabels=function(){var t=this.$().find(".sapUiGrid"),n=jQuery("col:first-child",t);t.css("table-layout","auto"),n.css("width","auto");var r=e.reduce(jQuery(".sapWattSideFormLabel",t),function(e,t){var n=jQuery(t).closest(".sapUiFormElementLbl");return e=Math.max(e,n.outerWidth(!0))},0);t.css("table-layout","fixed"),n.css("width",r+"px")},n}),define("sap/watt/ui/control/sidepane/SidePaneSeparator",["sap/watt/lib/lodash/lodash","./SidePanePart"],function(e,t){"use strict";jQuery.sap.declare("sap.watt.ui.control.sidepane.SidePaneSeparator");var n=t.extend("sap.watt.ui.control.sidepane.SidePaneSeparator");n.prototype.init=function(){function n(t,n){var r=o.getProperty(n)||o.getAggregation(n);r.set(i,t),i[r._sMutator]=e.noop}t.prototype.init.apply(this,arguments);var i=this,o=this.getMetadata();this.setSize("1px"),n(new r,"content"),n(0,"requiredParentWidth"),e.each(["hasSplitter","enableVerticalScrolling","enableHorizontalScrolling","demandPane"],n.bind(null,!1))};var r=sap.ui.core.Control.extend("sap.watt.ui.control.sidepane.SidePanePart._Separator",{renderer:function(e,t){e.write("")}});return n}),define("sap/watt/ui/control/sidepane/SidePane",["sap/watt/lib/lodash/lodash","./SidePaneTab","./SidePaneForm","./SidePaneSeparator"],function(e){"use strict";jQuery.sap.declare("sap.watt.ui.control.sidepane.SidePane"),jQuery.sap.require("sap.m.IconTabBar"),jQuery.sap.require("sap.m.IconTabFilter");var t=sap.ui.core.Control.extend("sap.watt.ui.control.sidepane.SidePane",{metadata:{properties:{orientation:{type:"sap.ui.core.Orientation",group:"Behavior",defaultValue:sap.ui.core.Orientation.Vertical}},defaultAggregation:"content",aggregations:{content:{type:"sap.watt.ui.control.sidepane.SidePaneTab",multiple:!0,singularName:"content"},_tabBar:{type:"sap.m.IconTabBar",multiple:!1,visibility:"hidden"}}},renderer:function(e,t){e.write(""),e.write(""),e.renderControl(t.getAggregation("_tabBar")),e.write("")}});return t.prototype.init=function(){var t=this;this._aContent=[],this._fnSelectionChangeHandler=this._adjustSelection.bind(this),this.setAggregation("_tabBar",new sap.m.IconTabBar({expandable:!1,stretchContentHeight:!0,applyContentPadding:!1,select:function(n){var r=n.getParameter("item").getContent()[0];r.getIsSelected()||(e.each(t._aContent,function(e){e.setProperty("isSelected",e===r,!0)}),r.fireEvent("selected"))}}))},t.prototype.exit=function(){e.each(this._aContent,function(e){e&&e.destroy&&!e.bIsDestroyed&&e.destroy()}),this._aContent=[],this._fnSelectionChangeHandler=e.noop},t.prototype.setOrientation=function(t){this.removeStyleClass("sapWattSidePane"+this.getOrientation(),!0),this.addStyleClass("sapWattSidePane"+t,!0),this.setProperty("orientation",t,!0),e.each(this._aContent,function(e){e._setOrientation(t)})},t.prototype.getContent=function(){return this._aContent},t.prototype.addContent=function(e){return e&&(e=this.validateAggregation("content",e,!0),this._aContent.push(e),e._setOrientation(this.getOrientation()),e.attachEvent("_requestSelection",this._fnSelectionChangeHandler),this.getAggregation("_tabBar").addItem(new sap.m.IconTabFilter({text:e.getHeaderText(),content:e})),this.toggleStyleClass("sapWattSidePaneSingle",1===this._aContent.length),this._adjustSelection(e)),this},t.prototype.insertContent=function(e,t){return e&&(e=this.validateAggregation("content",e,!0),t<0?t=0:t>this._aContent.length&&(t=this._aContent.length),this._aContent.splice(t,0,e),e._setOrientation(this.getOrientation()),e.attachEvent("_requestSelection",this._fnSelectionChangeHandler),this.getAggregation("_tabBar").insertItem(new sap.m.IconTabFilter({text:e.getHeaderText(),content:e}),t),this.toggleStyleClass("sapWattSidePaneSingle",1===this._aContent.length),this._adjustSelection(e)),this},t.prototype.removeContent=function(e){var t=this.indexOfContent(e);return t!==-1?(this._aContent.splice(t,1),e.detachEvent("_requestSelection",this._fnSelectionChangeHandler),this.getAggregation("_tabBar").removeItem(e.getParent()),this.toggleStyleClass("sapWattSidePaneSingle",1===this._aContent.length),this._adjustSelection(),e):null},t.prototype.removeAllContent=function(){var t=this._fnSelectionChangeHandler,n=this._aContent;return e.each(this._aContent,function(e){e.detachEvent("_requestSelection",t)}),this._aContent=[],this.getAggregation("_tabBar").removeAllItems(),this.removeStyleClass("sapWattSidePaneSingle"),this._adjustSelection(),n},t.prototype.indexOfContent=function(t){return e.indexOf(this._aContent,t)},t.prototype.destroyContent=function(){return this.getAggregation("_tabBar").destroyItems(),e.each(this._aContent,function(e){e.bIsDestroyed||e.destroy()}),this._aContent=[],this.removeStyleClass("sapWattSidePaneSingle"),this},t.prototype._adjustSelection=function(t){var n=null;n=t instanceof sap.ui.base.Event?t.getSource():t instanceof sap.watt.ui.control.sidepane.SidePaneTab&&t.getIsSelected()?t:e.find(this._aContent,function(e){return e.getIsSelected()}),n||(n=this._aContent[0]),e.each(this._aContent,function(e){e.setProperty("isSelected",e===n,!0)}),this.getAggregation("_tabBar").setSelectedKey(n?n.getParent()._getNonEmptyKey():"")},t}),define("sap.watt.ideplatform.gerrit/service/GerritPane",["sap/watt/platform/plugin/platform/service/ui/AbstractPart","sap/watt/ui/control/sidepane/SidePane"],function(e){"use strict";var t="sap.watt.common.service.ui.Browser",n=new Q.sap.Queue,r=e.extend("sap.watt.ideplatform.gerrit.service.RightPanePart.",{_oView:null,_oLastSelectionEvent:null,OWNER_CHANGES:"owner",REVIEWER_CHANGES:"reviewer",LINK_TO_CHANGE:"changeURL",_oLastSelectedProject:null,_bIstLastSelectedGerriProject:!0,getContent:function(){var t=this;return e.prototype.getContent.apply(this,arguments).then(function(){return t._oView||(t._oView=sap.ui.view({viewName:"sap.watt.ideplatform.gerrit.view.GerritPane",type:sap.ui.core.mvc.ViewType.XML,viewData:{context:t.context}}),t._oView.getController().init()),t._oView})},setNewChanges:function(e,t){var n=this;return this._initChanges(!0),this._getSelectedProject().then(function(r){return r&&r.getTitle()===t?n._addChangesLinksToData(e).then(function(e){n._getController().setChanges(e),n._oLastSelectedProject=r,n.context.service.usagemonitoring.report("gerritPane","refreshChangesSuccess").done()}):void n._getController().setChanges({owner:[],reviewer:[],generalData:{branchName:""}})})},refreshGerritChanges:function(){this.context.service.gerrit.getChanges().done()},onSelectionChanged:function(e){var r=this;if(e)return n.next(function(){var n=e.params.selection,i=e.params.owner;if(i.instanceOf(t)&&n&&r._getView())return r._getSelectedProjectFromArrey(n).then(function(e){return r.context.service.gerrit.isGerritProject(e).then(function(t){if(e!==r._oLastSelectedProject||!r._bIstLastSelectedGerriProject&&t){if(r._initChanges(t),r._getController().setPaneState(t),t)return r.context.service.gerrit.isAuthenticated(e).then(function(n){return n?r._isGerritPaneViewVisible().then(function(n){n&&r._setChangesController(e),r._oLastSelectedProject=e,r._bIstLastSelectedGerriProject=t}):(r._setRefreshInfoMessage(),r._oLastSelectedProject=e,void(r._bIstLastSelectedGerriProject=t))});r._oLastSelectedProject=e,r._bIstLastSelectedGerriProject=t}})})})},onVisibleChanged:function(e){e.params&&e.params.visible&&this._getView()&&(this._setRefreshInfoMessage(),this.context.service.usagemonitoring.report("gerritPane","gerritPaneOpen").done())},submitChange:function(e){e&&this.context.service.gerrit.submitChangeById(e).done()},_isGerritPaneViewVisible:function(){var e=this;return this.context.service.perspective.getAreaForService("gerritPane").then(function(t){return!!t&&e.context.service.perspective.isAreaVisible(t).then(function(e){return e})})},_setRefreshInfoMessage:function(){this._getController().setInfoToContainer(this.context.i18n.getText("i18n","refresh_for_seeing_changes"))},_setChangesController:function(){this.refreshGerritChanges()},_initChanges:function(e){this._getController().initChanges(e)},isNotGerritProject:function(){this._initChanges(!1)},_addChangesLinksToData:function(e){var t=this;return this.context.service.gerrit.getGerritHost().then(function(n){var r=e[t.OWNER_CHANGES],i=e[t.REVIEWER_CHANGES];return t._updateLinksToArrayOfChanges(r,n),t._updateLinksToArrayOfChanges(i,n),e})},_updateLinksToArrayOfChanges:function(e,t){if(e){var n=this,r="";e.forEach(function(e){t&&(r="https://"+t+"/#/c/"+e._number+"/"),e[n.LINK_TO_CHANGE]=r})}},_getSelectedProject:function(){var e=this;return this._getRepositoryBrowserSellection().then(function(t){return e._getSelectedProjectFromArrey(t)})},_getRepositoryBrowserSellection:function(){return this.context.service.repositorybrowser.getSelection().then(function(e){return e})},_getSelectedProjectFromArrey:function(e){if(e&&e.length>0){var t=e[0].document;if(t)return t.getProject().then(function(e){return e})}return Q(null)},_getView:function(){return this._oView},_getController:function(){return this._getView().getController()}});return r}),define("sap.watt.ideplatform.generationwizard/command/CreateComponent",{execute:function(e){var t=this,n="";return e&&(n="more"===e?"more":e.getName()),Q.sap.require("sap.watt.ideplatform.generationwizard/ui/ComponentGenerationWizard").then(function(r){return t.context.service.selection.getSelection().then(function(i){i&&1===i.length&&!i[0].document.getEntity().isRoot()&&("more"===n?r.openComponentWizardUI(t.context,i[0].document):r.openComponentWizardUIFromSecondStep(t.context,i[0].document,e))})})},isAvailable:function(){return this.context.service.selection.isOwner(this.context.service.repositorybrowser).fail(function(){return!1})},isEnabled:function(){var e=this.context.service.selection;return e.isOwner(this.context.service.repositorybrowser).then(function(t){return!!t&&e.getSelection().then(function(e){return 1===e.length&&!e[0].document.getEntity().isRoot()})})}}),define("sap.watt.ideplatform.generationwizard/command/CreateModule",{execute:function(e){var t=this;return Q.sap.require("sap.watt.ideplatform.generationwizard/ui/ProjectGenerationWizard").then(function(n){return t.context.service.selection.getSelection().then(function(r){r&&1===r.length&&!r[0].document.getEntity().isRoot()&&(e instanceof Array?n.openGenerationWizardUI(t.context,r[0].document,"module",e):n.openGenerationWizardUIFromSecondStep(t.context,r[0].document,e))})})},isAvailable:function(){return this.context.service.selection.isOwner(this.context.service.repositorybrowser).fail(function(){return!1})},isEnabled:function(){var e=this.context.service.selection;return e.isOwner(this.context.service.repositorybrowser).then(function(t){return!!t&&e.getSelection().then(function(e){return 1===e.length&&!e[0].document.getEntity().isRoot()})})}}),define("sap.watt.ideplatform.generationwizard/command/CreateProject",{execute:function(){var e=this;require(["sap.watt.ideplatform.generationwizard/ui/ProjectGenerationWizard"],function(t){t.openGenerationWizardUI(e.context)})},isAvailable:function(){return this.context.service.perspective.getCurrentPerspective().then(function(e){return"databaseexplorer"!==e})},isEnabled:function(){return!0}}),define("sap.watt.ideplatform.generationwizard/command/CreateReferenceProject",{execute:function(){var e=this;require(["sap.watt.ideplatform.generationwizard/ui/ReferenceProjectGenerationWizard"],function(t){t.openGenerationWizardUI(e.context)})},isAvailable:function(){return!0},isEnabled:function(){return!0}}),define("sap.watt.ideplatform.generationwizard/command/DisplayTemplates",{execute:function(){var e=this;require(["sap.watt.ideplatform.generationwizard/ui/TemplateManagementDialog"],function(t){t.openTemplateManagementUI(e.context)})},isAvailable:function(){return!0},isEnabled:function(){return!0}}),define("sap.watt.ideplatform.generationwizard/command/CreateCloudConnectivity",[],function(){"use strict";return{execute:function(){var e=this,t=this.context.service.filesystem.documentProvider;e.context.service.selection.getSelection().then(function(n){var r=n[0].document;return e.context.service.neoapp.addDestinations(null,r).then(function(){return t.getDocument(r.getEntity().getFullPath()+"/neo-app.json").then(function(t){return e.context.service.repositorybrowser.setSelection(t,!0)})})}).fail(function(t){e.context.service.usernotification.alert(e.context.i18n.getText("i18n","createConnectivity_Error")+"\n\n"+t.message).done()})},isAvailable:function(){return"hcproxy"===sap.watt.getEnv("server_type")&&this._isProject()},isEnabled:function(){return this._isProject()},_isProject:function(){var e=this,t=this.context.service.selection;return t.isOwner(this.context.service.repositorybrowser).then(function(n){return!!n&&t.getSelection().then(function(t){return e.context.service.projectType.hasProjectType(t[0].document,"mta").then(function(e){var n=1===t.length&&!t[0].document.getEntity().isRoot()&&""===t[0].document.getEntity().getParentPath()&&!e;return n})})})}}}),define("sap.watt.ideplatform.generationwizard/service/ProjectBasicStep",{getContent:function(){jQuery.sap.require("sap.watt.ideplatform.plugin.generationwizard.ui.wizard.ProjectNameStep");var e=new sap.watt.ideplatform.plugin.generationwizard.ui.wizard.ProjectNameStep({context:this.context}),t=this.context.i18n.getText("projectGenWizard_basicStepTitle");return this.context.service.wizard.createWizardStep(e,t,"")}}),define("sap.watt.ideplatform.generationwizard/service/ComponentFinishStep",{getContent:function(){jQuery.sap.require("sap.watt.ideplatform.plugin.generationwizard.ui.wizard.ComponentFinishStep");var e=new sap.watt.ideplatform.plugin.generationwizard.ui.wizard.ComponentFinishStep({context:this.context});return this.context.service.wizard.createWizardStep(e,"","")}}),define("sap.watt.ideplatform.generationwizard/service/OfflineStep",{getContent:function(){jQuery.sap.require("sap.watt.ideplatform.plugin.generationwizard.ui.wizard.OfflineStepContent");var e=new sap.watt.ideplatform.plugin.generationwizard.ui.wizard.OfflineStepContent({context:this.context}),t=this.context.i18n.getText("projectGenWizard_offlineStepTitle");return this.context.service.wizard.createWizardStep(e,t,"")}}),define("sap.watt.ideplatform.generationwizard/service/AppDescriptorGenericStep",{getContent:function(){jQuery.sap.require("sap.watt.ideplatform.plugin.generationwizard.ui.wizard.AppDescriptorGenericStepContent");var e=new sap.watt.ideplatform.plugin.generationwizard.ui.wizard.AppDescriptorGenericStepContent({context:this.context}),t=this.context.i18n.getText("projectGenWizard_AppDescriptorGenericStepTitle");return this.context.service.wizard.createWizardStep(e,t,"")}}),define("sap.watt.ideplatform.generationwizard/service/TemplateSelectStep",{getContent:function(){var e=this;jQuery.sap.require("sap.watt.ideplatform.plugin.generationwizard.ui.wizard.SelectTemplateStep");var t=new sap.watt.ideplatform.plugin.generationwizard.ui.wizard.SelectTemplateStep({context:e.context}),n=e.context.i18n.getText("commonGenWizard_availableTemplatesTitle");return e.context.service.wizard.createWizardStep(t,n,"")}}),define("sap.watt.ideplatform.generationwizard/service/SelectReferenceProjectStep",{getContent:function(){var e=this;jQuery.sap.require("sap.watt.ideplatform.plugin.generationwizard.ui.wizard.SelectTemplateStep");var t=new sap.watt.ideplatform.plugin.generationwizard.ui.wizard.SelectTemplateStep({context:e.context}),n=e.context.i18n.getText("referenceProjectGenWizard_availableTemplatesTitle");return e.context.service.wizard.createWizardStep(t,n,"")}}),define("sap.watt.ideplatform.generationwizard/service/ModelBuilderStep",{getContent:function(){var e=this,t=[];return t.push(),Q.all([Q.sap.require("sap.watt.ideplatform.generationwizard/core/DataProviderManager"),Q.sap.require("sap.watt.ideplatform.generationwizard/core/DataProviderManagerV4")]).spread(function(t,n){jQuery.sap.require("sap.watt.ideplatform.generationwizard.ui.wizard.TemplateCustomizationStep");var r=new sap.watt.ideplatform.generationwizard.ui.wizard.TemplateCustomizationStep({context:e.context,dataProviderManager:t,dataProviderManagerV4:n}),i=e.context.i18n.getText("commonGenWizard_modelBuilderTitle");return e.context.service.wizard.createWizardStep(r,i,""); })}}),define("sap.watt.ideplatform.generationwizard/service/ConfirmReferenceAppTerms",{getContent:function(){jQuery.sap.require("sap.watt.ideplatform.plugin.generationwizard.ui.wizard.ConfirmTermsStepContent");var e=new sap.watt.ideplatform.plugin.generationwizard.ui.wizard.ConfirmTermsStepContent({context:this.context});return this.context.service.wizard.createWizardStep(e,"","")}}),define("sap.watt.ideplatform.generationwizard/service/SmartDocProvider",{_oContextDocBuilder:void 0,_oCachedSmartDoc:void 0,init:function(){var e=this;return Q.sap.require("sap.watt.ideplatform.generationwizard/core/ContextDocBuilder").then(function(t){e._oContextDocBuilder=t.initContextDocBuilder()})},createSmartDoc:function(e,t,n){if(this._oContextDocBuilder){var r=this;return this.context.service.pluginmanagement.getPluginFile(e,t,!1).then(function(e){var t=[],i=r._oContextDocBuilder.Document(JSON.parse(e));if(i.Import)for(var o=0;o=0,t=t.getParentGroup()&&t.getParentGroup().getGroupItem()}return n},e}),define("sap.watt.platform.commandgroup/module/ActionItem",["./Item"],function(e){"use strict";var t=function(t,n){e.call(this,t.id||n.getId(),t.prio),this._oCommand=n,this._sLabel=t.label||n.getLabel(),this._sIcon=t.icon||n.getIcon(),this._sIconLabel=t.iconLabel||n.getIconLabel(),this._bDefault=t.default};return t.prototype=Object.create(e.prototype),t.prototype.getCommand=function(){return this._oCommand},t.prototype.getIcon=function(){return this._sIcon},e.prototype.getIconLabel=function(){return this._sIconLabel},t.prototype.getLabel=function(){return this._sLabel},t.prototype.getValue=function(){return this._oCommand.getValue()},t.prototype.setValue=function(e,t){this._oCommand.setValue(e,t)},t.prototype.isDefault=function(){return this._bDefault},t}),define("sap.watt.ideplatform.generationwizard/service/RelevantArtifactsProvider",["sap.watt.platform.commandgroup/module/ActionItem","sap/watt/lib/lodash/lodash"],function(e,t){"use strict";return{getItemsByType:function(e,n){this.context=e;var r=this;return this.context.service.template.getTemplates(n).then(function(e){return r.context.service.selection.getSelection().then(function(i){var o=t.values(e);return sap.watt.getEnv("internal")||(o=t.filter(o,function(e){return!e.getInternalOnly()})),r.context.service.template.sortTemplates(o).then(function(){var e;return e="component"===n?"template.createComponent":"template.createModule",r.context.service.command.getCommand(e).then(function(e){var a={};i&&1===i.length&&!i[0].document.getEntity().isRoot()&&(a.componentPath=i[0].document.getEntity().getFullPath());var s=[],u=[],c=[],l=[];return i&&i[0]&&i[0].document?r.context.service.projectType.getProjectTypes(i[0].document).then(function(i){t.forEach(i,function(e){s.push(e.id)});var p=[];return t.forEach(o,function(e){var t=e.getSupportedProjectTypes(),n=r._isTemplateValid(t,s);!n&&t&&0!==t.length||(l.push(e),u.push(e.validateOnSelection(a)),c.push(e.customValidation(a)))}),Q.allSettled(u).then(function(i){return Q.allSettled(c).then(function(o){return t.forEach(l,function(t,a){if("fulfilled"===i[a].state&&i[a].value&&"fulfilled"===o[a].state&&o[a].value){if(4===p.length&&"component"===n)return r._createMoreComponentsActionItem(e,p),!1;r._createAnActionItem(e,t,p)}}),p})})}):[]})})})})},_isTemplateValid:function(e,n){var r=!1;return t.forEach(e,function(e){if(t.indexOf(n,e)>-1)return r=!0,!1}),r},_createAnActionItem:function(t,n,r){var i=n.getId();t.setValue(n,i);var o=new e({id:i,label:n.getName()},t);r.push(o)},_createMoreComponentsActionItem:function(t,n){var r=this.context.i18n.getText("command_moreLabel");t.setValue("more","moreComponents");var i=new e({id:"moreComponents",label:r},t);n.push(i)}}}),define("sap.watt.ideplatform.generationwizard/service/RelevantComponentsProvider",["sap.watt.ideplatform.generationwizard/service/RelevantArtifactsProvider"],function(e){"use strict";return{getItems:function(){return e.getItemsByType(this.context,"component")}}}),define("sap.watt.ideplatform.generationwizard/service/RelevantModulesProvider",["sap.watt.ideplatform.generationwizard/service/RelevantArtifactsProvider","sap.watt.platform.commandgroup/module/ActionItem","sap/watt/lib/lodash/lodash"],function(e,t,n){"use strict";var r,i={groups:{},ProjectTyepsToGroupsMapping:{}};return{configure:function(e){var t=this;jQuery.each(e.grouping,function(e,n){n.groupID&&n.groupLabel&&n.moduleProjectTypes&&(i.groups[n.groupID]&&t.context.service.log.warn(t.context.service.relevantmodulesprovider.getProxyMetadata().getName(),"The same Module Grouping ID: "+n.groupID+" defined more then once",["user"]).done(),i.groups[n.groupID]={label:n.groupLabel,templates:[]},n.moduleProjectTypes.forEach(function(e){i.ProjectTyepsToGroupsMapping[e]&&t.context.service.log.warn(t.context.service.relevantmodulesprovider.getProxyMetadata().getName(),"The projectType: "+e+" already configured with groupingID: "+i.ProjectTyepsToGroupsMapping[e]+" ,was re-configured with Grouping ID: "+n.groupID,["user"]).done(),i.ProjectTyepsToGroupsMapping[e]=n.groupID}))})},getItems:function(){r=[];for(var t in i.groups)i.groups[t].templates=[];var n=this;return e.getItemsByType(this.context,"module").then(function(e){return e&&e.length>0?n._buildItemsList(e).then(function(){return r}):void 0})},_buildItemsList:function(e){var t=this,r=[],o=e[0].getCommand();return e.forEach(function(e){r.push(t._distributeGroupItems(e))}),Q.all(r).then(function(){n.forOwn(i.groups,function(e,n){e.templates.length>0&&t._buildGroupItemForGroupItemID(o,n,e.templates,e.label)})})},_distributeGroupItems:function(e){return this.context.service.template.getTemplate(e.getId()).then(function(t){var n=t.getTargetProjectTypes();if(n){var o=!1;n.some(function(e){var n=i.ProjectTyepsToGroupsMapping[e];return n?(i.groups[n].templates.push(t),o=!0):o}),o||r.push(e)}else r.push(e)})},_buildGroupItemForGroupItemID:function(e,n,i,o){e.setValue(i,n);var a=new t({id:n,label:o},e);r.push(a)}}}),define("sap.watt.ideplatform.generationwizard/ui/ComponentGenerationWizard",["sap/watt/lib/lodash/lodash"],function(e){return{_oContext:null,_oWizard:null,openComponentWizardUI:function(e,t,n){var r=this;this._oContext=e;var i=this._oContext.service.templateselectstep,o=this._oContext.service.wizard,a=this._oContext.service.usagemonitoring;Q.all([i.getContent()]).spread(function(e){var i="CreateGenerationWizardUI";r._oWizard=sap.ui.getCore().byId(i),void 0!==r._oWizard&&r._oWizard.destroy();var s=r._oContext.i18n.getText("componentGenWizard_wizardTitle"),u=r._oContext.i18n.getText("componentGenWizard_wizardSummary"),c=!1,l=function(){return r._fnGenerateComponent(r._oWizard.getModel(),r).then(function(){c=!0})},p=function(){c&&a.report("template","ComponentCreated",r._oWizard.getModel().getProperty("/selectedTemplate").getId()).done()};o.createWizard(i,s,"",[e],u,l,p).then(function(i){r._oWizard=i;var o=e.getStepContent();r._oWizard.getModel().setProperty("/selectedDocument",t),r._setDefaultComponentPath(t),r._setDefaultOverwriteValue(),r._setAvailableTemplates(o,n),o.setNumberOfWizardSteps(1),o.setBasicStepIndex(-1),o.setWizardControl(r._oWizard),o.attachValueChange(r._onChangeTemplate,r),r._oWizard.open()}).done()}).done()},openComponentWizardUIFromSecondStep:function(t,n,r){var i=this;this._oContext=t;var o=this._oContext.service.wizard,a=this._oContext.service.usagemonitoring;r.configWizardSteps().then(function(s){var u="CreateGenerationWizardUI";i._oWizard=sap.ui.getCore().byId(u),void 0!==i._oWizard&&i._oWizard.destroy();var c=i._oContext.i18n.getText("genWizard_wizardTitle_new")+" "+r.getName(),l=i._oContext.i18n.getText("componentGenWizard_wizardSummary"),p=!1,f=function(){return i._fnGenerateComponent(i._oWizard.getModel(),i).then(function(){p=!0})};if(!s||e.isEmpty(s))i.openComponentWizardUI(t,n);else{var d=function(){p&&a.report("template","ComponentCreated",i._oWizard.getModel().getProperty("/selectedTemplate").getId()).done()};o.createWizard(u,c,"",[s[0]],l,f,d).then(function(e){i._oWizard=e,i._oWizard.selectedTemplate=r,i._oWizard.getModel().setProperty("/selectedTemplate",r),i._oWizard.getModel().setProperty("/selectedDocument",n),i._setDefaultComponentPath(n),i._setDefaultOverwriteValue(),i._oWizard.open(),i._addWizardStepsToWizard(s,i._oWizard)}).done()}}).done()},_addWizardStepsToWizard:function(e,t){if(t.getModel().oData.neoapp?t.getModel().oData.neoapp.destinations=void 0:t.getModel().oData.destinations=void 0,void 0!==e)for(var n=1;n0&&e[0].document&&"D"!==e[0].stageTableRow.Status})}}}),define("sap.watt.ideplatform.gitclient/command/GitBlame",["sap/watt/ideplatform/plugin/gitclient/command/Constants"],function(e){"use strict";return{execute:function(){var e=this,t=this.context.service;return t.selection.getSelection().then(function(t){var n=t&&t[0];if(n){var r=n.document;return e.context.service.selection.getOwner().then(function(t){return t.getContentStatus(!0).then(function(n){return e.context.service.gitblame.getGitBlameDocument(r).then(function(r){return r.getProject().then(function(t){e.context.service.usagemonitoring.report("git","gitblame","from_command",t.getTitle()).done()}).done(),e.context.service.content.open(r,t).then(function(){return e.context.service.selection.getOwner().then(function(e){return e.gotoLine(n.cursorPosition.row+1,0)})})})})})}})},isAvailable:function(){var e=this.context.service;return e.git.isFeatureSupported("gitBlame").then(function(t){return!!t&&e.selection.getSelection().then(function(e){var t=e.length>0&&e[0];if(t){var n=t.document,r=n.getEntity().getBackendData();if(r&&r.git&&(!n.getExtInfo()||!n.getExtInfo().type||"blame"!==n.getExtInfo().type))return!0}return!1})})},isEnabled:function(){return!0}}}),define("sap.watt.ideplatform.gitclient/command/GitBlameToHistory",[],function(){"use strict";return{_getCommitID:function(e){var t;if(e&&e.length>0){var n=e[0];if(n){var r=n.value;t=r.split("\t")[0]}}return t},execute:function(){var e=this;return e.context.service.selection.getOwner().then(function(t){return t.getContentStatus(!0,!0).then(function(n){return t.getSelection().then(function(t){var r=t.document;r.getProject().then(function(t){e.context.service.usagemonitoring.report("git","gitblameHistory","from_command",t.getTitle()).done()}).done();var i=e._getCommitID(n.aRowTokens);return e.context.service.gitlog.searchInHistory(i,r.getExtInfo().originDocument)})})})},isAvailable:function(){var e=this.context.service;return e.git.isFeatureSupported("gitBlame").then(function(t){return!!t&&e.selection.getSelection().then(function(e){var t=e&&e.length>0&&e[0];if(t){var n=t.document;if(n&&n.getExtInfo()&&n.getExtInfo().type&&"blame"===n.getExtInfo().type)return!0}return!1})})},isEnabled:function(){return!0}}}), define("sap.watt.ideplatform.gitclient/command/Compare",["sap/watt/ideplatform/plugin/gitclient/command/Constants"],function(e){"use strict";return{execute:function(){var t=this.context.service.selection,n=this;return t.getSelection().then(function(t){var r=t[0];if(!r.stageTableRow||!(r.document&&t[0].document.getEntity()&&r.document.getEntity().getBackendData()&&t[0].document.getEntity().getBackendData().git))throw new Error("Compare failed");var i=r.document,o=r.stageTableRow.Stage,a=r.stageTableRow.Status;return n.context.service.gitdispatcher.openCompareEditor(i,o,"C"===a,e._ACTIVATED_FROM_COMMAND)})},isAvailable:function(){return!0},isEnabled:function(){return this.context.service.selection.getSelection().then(function(e){if(e.length>0&&e[0].document){var t=e[0].stageTableRow.Status;return"M"===t||"C"===t}return!1})}}}),define("sap.watt.ideplatform.gitclient/service/Decorator",{CONFLICT:{text:" ",styleClass:"rdeRepositoryBrowserPrefixGitConflict"},GIT:{text:" ",styleClass:"rdeRepositoryBrowserPrefixGitCommitted"},DELETED:{text:" ",styleClass:"rdeRepositoryBrowserPrefixGitDeleted"},STAGE:{text:" ",styleClass:"rdeRepositoryBrowserPrefixGitModifiedStaged"},MODIFIED:{text:" ",styleClass:"rdeRepositoryBrowserPrefixGitModified"},NEW:{text:" ",styleClass:"rdeRepositoryBrowserPrefixGitStagedInitial"},UNTRACKED:{text:" ",styleClass:"rdeRepositoryBrowserPrefixGitStagedUntracked"},decorate:function(e,t){if(e&&e.getEntity()&&e.getEntity().getBackendData()&&e.getEntity().getBackendData().git){var n,r={prefix:this.GIT},i=this,o=[],a=e.getEntity().getBackendData().git;return o.push(this.context.service.gitclient.getStatusForNode(e).then(function(e){e&&(r.prefix=e.stage?i.STAGE:i[e.status])})),e.getEntity().isProject()&&o.push(e.getParent().then(function(e){if(e.getEntity().isRoot())return i.context.service.git.getLocalBranches(a).then(function(e){return i.context.service.git.getCurrentBranchName(e).then(function(e){n=e})})})),Q.allSettled(o).then(function(){return n&&(r.suffix=[{text:"["+n+"]",styleClass:"rdeRepositoryBrowserSuffixRepo"}]),r})}}}),define("sap.watt.ideplatform.gitclient/service/GitClient",["sap/watt/platform/plugin/platform/service/ui/AbstractPart","sap/watt/ui/control/sidepane/SidePane"],function(e){"use strict";var t=e.extend("sap.watt.ideplatform.plugin.gitclient.service.GitClient",{_oGitPaneView:void 0,_oSelectedDocument:void 0,_oContextMenuGroup:void 0,_oSelectedStageTableRow:void 0,_mStatus:{},_mDefer:{},init:function(){},configure:function(t){var n=this;return t&&t.prePush&&n.context.service.taskRunner.getPrePushName().then(function(e){return n.context.service.taskRunner.setTask(e,t.prePush)}).done(),e.prototype.configure.apply(this,arguments).then(function(){if(n._aStyles&&n.context.service.resource.includeStyles(n._aStyles).done(),t.contextMenu)return n.context.service.commandGroup.getGroup(t.contextMenu).then(function(e){n._oContextMenuGroup=e})})},getFocusElement:function(){return this.getContent()},getSelection:function(){var e=this;return e._oSelectedDocument&&e._oSelectedStageTableRow?[{stageTableRow:e._oSelectedStageTableRow,document:e._oSelectedDocument}]:[]},setSelection:function(e){this._oSelectedStageTableRow=e.stageTableRow,this._oSelectedDocument=e.document},getContent:function(){var e=this;return this._oGitPaneView||(this._oGitPaneView=sap.ui.view({viewName:"sap.watt.ideplatform.plugin.gitclient.view.GitPane",type:sap.ui.core.mvc.ViewType.XML,viewData:{context:this.context,menuGroup:this._oContextMenuGroup}})),e._oGitPaneView},onAfterSetSelection:function(e){var t=e.params.owner,n=e.params.selection;if(t&&(t===this.context.service.repositorybrowser||t.instanceOf("sap.watt.common.service.editor.Editor"))&&n){if(n.length>1&&!this._analyzeMultiSelect(n))return this._oSelectedDocument=null,void(this._oSelectedStageTableRow=null);n[0]&&n[0].document&&n[0].document.getEntity().getBackendData()&&this.doUpdate(n[0].document,!1)}},_analyzeMultiSelect:function(e){for(var t=!1,n=null,r=0;r-1&&"folder"===e.getType())return{status:t[i].FullStatus,stage:t[i].Stage}})},_updateDecoration:function(e){var t=this;return e?this.context.service.decoration.updateDecorations(e,!0):this._oGitPaneView?this._oGitPaneView.getController().getDocument().then(function(e){return Q(e?e:t.context.service.filesystem.documentProvider.getRoot()).then(function(e){return t.context.service.decoration.updateDecorations(e,!0)})}):this.context.service.filesystem.documentProvider.getRoot().then(function(e){return t.context.service.decoration.updateDecorations(e,!0)})},_updateChain:function(e,t){var n=this;return e.getEntity().isProject()?this.context.service.decoration.updateDecorations(e,!1,t):this.context.service.decoration.updateDecorations(e,!1,t).then(function(){return e.getParent().then(function(e){return n._updateChain(e,t)})})},_getProjectName:function(e){return e.getParentPath()?e.getParentPath().split("/")[1]:e.getName()}});return t}),define("sap.watt.ideplatform.gitclient/service/GitBlame",["sap/watt/lib/lodash/lodash","sap.watt.platform.filesystem/document/FileFolderEntity"],function(e,t){return{getGitBlame:function(e){var t=this,n=e.getExtInfo().git;return this.context.service.git.isFeatureSupported("gitBlame").then(function(r){if(r)return t.context.service.git.blame(n).then(function(n){var r=t._createBlameModel(n),i=e.getExtInfo().content;return t._createBlameString(r,i)})})},getGitBlameDocument:function(e){var n=e.getEntity(),r=n.getTitle()+"-Annotate",i=new t("file",r,n.getParentPath(),"gitBlameDao","");return this.context.service.document.getDocument(i).then(function(t){return e.getContent().then(function(n){return t.setExtInfo({type:"blame",git:e.getEntity().getBackendData().git,content:n,originDocument:e}),t.invalidate(),t})})},_createBlameString:function(t,n){var r="";return n=n.split("\n"),e.forEach(t,function(e,t){r=r+e.commitID+"\t"+e.date+"\t"+e.commiter+"\t"+n[t-1]+"\n"}),r=r.replace(/\r?\n?[^\r\n]*$/,"")},_createBlameModel:function(e){var t={},n=e.Children;if(!n)return{};for(var r=0;r0){for(var r=0;r0&&this._oOldEntity!==e.params.selection[0].document.getEntity().getName()&&(this._analyzeValidGitLog(e.params.selection)?e.params.selection[0]&&e.params.selection[0].document&&this.context.service.repositorybrowser.getStateLinkWithEditor().then(function(n){(e.params.owner===t.context.service.repositorybrowser||"aceeditor"===e.params.owner.getProxyMetadata().getName()&&n)&&(t._oOldEntity=e.params.selection[0].document.getEntity().getName(),t.doUpdate(e.params.selection[0].document))}).done():(t._oGitLogView&&t._oGitLogView.getController().clearPane(),t._oSelectedDocument=null))},onDocumentDeleted:function(e){var t=this;if(e&&e.params&&e.params.document){var n=e.params.document;this._oSelectedDocument===n&&this._oGitLogView?(this._oSelectedDocument=null,this._oGitLogView.getController().clearPane()):this._oSelectedDocument&&n&&t._oSelectedDocument.getProject(!0).then(function(e){if(e){var r=e.getEntity().getName(),i=n.getEntity().getName();r===i&&(t._oSelectedDocument=null)}else t._oSelectedDocument=null}).done()}},doUpdate:function(e){var t=this;return t.context.service.progress.startTask(t.context.i18n.getText("i18n","gitLogPane_Load_History"),t.context.i18n.getText("i18n","gitDispatcher_Initing")).then(function(n){return Q().then(function(){if(e=e||t._oSelectedDocument,e&&e.getEntity&&e.getEntity().getBackendData()){var n=t.isVisible();if(!e.getEntity().getBackendData().git)return t._oSelectedDocument=null,void(n&&t._oGitLogView&&t._oGitLogView.getController().clearPane());t._oSelectedDocument=e;var r=t._oSelectedDocument.getEntity();return n&&t._oGitLogView?t._oGitLogView.getController().updateGitLogPane(r,r.getName()):void 0}}).fin(function(){t.context.service.progress.stopTask(n).done()})})},setVisible:function(t,n){var r=this;return n=n?n:r._DEFAULT_LOG_LOCATION,e.prototype.setVisible.apply(this,arguments).then(function(){if(t)return r.context.service.usagemonitoring.report("gitlog","pane_open",n).done(),r.doUpdate()})},_analyzeValidGitLog:function(e){return!!(1===e.length&&e[0]&&e[0].document&&e[0].document.getEntity()&&e[0].document.getEntity().getBackendData()&&e[0].document.getEntity().getBackendData().git)},isEnabled:function(e){var t=this._analyzeValidGitLog(e);return t}});return t}),define("sap.watt.ideplatform.gitclient/service/Clone",{_oCloneView:void 0,configure:function(e){this._aStyles=e.styles,this._aStyles&&this.context.service.resource.includeStyles(this._aStyles).done()},getContent:function(){return this._oCloneView||(this._oCloneView=sap.ui.view({viewName:"sap.watt.ideplatform.plugin.gitclient.view.GitCloneDialog",type:sap.ui.core.mvc.ViewType.JS,viewData:{service:this.context.service,context:this.context}})),this._oCloneView},getFocusElement:function(){return this.getContent()},doClone:function(e,t){return this._oCloneView||this.getContent(),this._oCloneView.getController().open(e,t)}}),define("sap.watt.ideplatform.gitclient/utils/GitUtils",[],function(){"use strict";var e={callMessageDialog:function(e,t){if(!e.source||"git"!==e.source)throw e;var n=e.detailedMessage?"\n\n"+e.detailedMessage:"";switch(e.type){case"Warning":t.service.usernotification.warning(e.name+n).done();break;case"Info":t.service.usernotification.info(e.name+n).done();break;default:var r,i="hcproxy"===sap.watt.getEnv("server_type")?sap.watt.getEnv("help_url")+"/viewer/825270ffffe74d9f988a0f0066ad59f0/CF/en-US/bd0cb7ed7e2149b6b5170205cbde0de7.html":"https://help.sap.com/viewer/4505d0bdaf4948449b7f7379d24d0f0d/2.0.02/en-US/bd0cb7ed7e2149b6b5170205cbde0de7.html";n=n.replace(/\n/g,"
");var o=e.name+"

"+n,a=new sap.ui.commons.Link({text:t.i18n.getText("i18n","gitPane_TroubleshootingGuide",!0),href:i,target:"_blank"}),s=new sap.ui.commons.FormattedTextView;s.setHtmlText(o),s.addControl(a),s.addStyleClass("gitErrorFormattedTextView"),r=s,t.service.usernotification.alert(r).done()}}};return e}),define("sap.watt.ideplatform.gitclient/service/GitDispatcher",["sap.watt.ideplatform.gitclient/utils/GitUtils","sap/watt/lib/lodash/lodash"],function(e,t){function n(e){return t.get(e,"oAdditionalHeaders")?"SSO":void 0}var r={_DEFAULT_LOG_LOCATION:"from_pane",_oAuthenticationView:null,_oFetchView:null,_oBranchesView:null,_oAddBranchesView:null,_oUserInfoDialog:null,_oStashDialogView:null,_oUseStashDialogView:null,_oIgnoreSystemFilesDialogView:null,_oStorage:null,configure:function(e){this._aStyles=e.styles,this._aStyles&&this.context.service.resource.includeStyles(this._aStyles).done()},init:function(){jQuery.sap.require("jquery.sap.storage"),this._oStorage=jQuery.sap.storage(jQuery.sap.storage.Type.session)},initRepository:function(e,t){var n=this,r=e.getEntity();t=t?t:n._DEFAULT_LOG_LOCATION;var i="gitclient.setRemote";return this.context.service.progress.startTask(n.context.i18n.getText("i18n","gitDispatcher_InitStrated"),this.context.i18n.getText("i18n","gitDispatcher_Initing")).then(function(o){return n.context.service.git.initRepository(r.getName(),r.getBackendData().location,r.getBackendData().location).then(function(){return n.context.service.gitclient.doUpdate(e,!0)}).then(function(){n.context.service.usagemonitoring.report("git","init",t).done(),n.context.service.usernotification.liteNotificationSuccess(n.context.i18n.getText("i18n","gitInit_ConfigurationDialogInfoMessageLocalRepoInitialized",!0),i,void 0,!1).done()}).fin(function(){n.context.service.progress.stopTask(o).done()}).fail(function(e){n._callMessageDialog(e)})})},setRemote:function(e,t){var n=this,r="git-client-git-set-remote-confuguration-view",i=sap.ui.getCore().byId(r);i&&i.destroy(),i=sap.ui.view(r,{viewName:"sap.watt.ideplatform.plugin.gitclient.view.GitSetRemote",type:sap.ui.core.mvc.ViewType.JS,viewData:{context:n.context,project:e,activator:t}}),i.getController().open()},addBranch:function(e,t,n,r,i){var o=this;return r=r?r:o._DEFAULT_LOG_LOCATION,o.context.service.progress.startTask(o.context.i18n.getText("i18n","gitDispatcher_CreateBranchStarted"),o.context.i18n.getText("i18n","gitDispatcher_CreatingBranch")).then(function(a){return o._getAddBranchDialog().getController().open(e,n,t,i).then(function(t){return o.context.service.progress.stopTask(a).done(),t&&(o.context.service.usagemonitoring.report("git","checkout_branch",r).done(),o.context.event.fireAddBranchCompleted({message:e?o.context.i18n.getText("i18n","gitDispatcher_CreateRemoteBranchCompletedSuccessfully",!0):o.context.i18n.getText("i18n","gitDispatcher_AddBranchCompletedSuccessfully",!0)}).done()),t})})},fetchFromUpstream:function(e,t){var r=this,i=!0,o=this.context.service.usagemonitoring;return t=t?t:r._DEFAULT_LOG_LOCATION,this._getRepositoryDetails(e,!1,"FETCH").then(function(a){return a?(o.startPerf("git","fetch").done(),r.context.event.fireOperationStarted({entity:e,name:"FETCH"}).done(),r.context.service.progress.startTask(r.context.i18n.getText("i18n","gitDispatcher_FetchStarted"),r.context.i18n.getText("i18n","gitDispatcher_Fetching")).then(function(s){return r.context.service.git.fetch(a.oGit,a.oDetails,a.sshPrivateKey,a.httpsPass,a.gitUsername,a.oAdditionalHeaders).then(function(e){r.context.event.fireFetchCompleted().done(),r._getFetchChangesDialog().getController().open(e),r.context.service.usernotification.liteInfo(r.context.i18n.getText("i18n","gitDispatcher_FetchCompletedSuccessfully",!0)).done(),o.report("git","fetch",t,n(a)).done()}).fail(function(n){return r._shouldRetryAfterSSOFailed(n,a.oAdditionalHeaders)?r.fetchFromUpstream(e,t):r._isNotAuthorized(n,a).then(function(e){return i=!e,Q.reject(n)})}).fin(function(){i&&r._saveToStorage(a),r.context.service.progress.stopTask(s).done()})}).fail(function(e){r._callMessageDialog(e)}).fin(function(){r.context.event.fireOperationStopped({entity:e,name:"FETCH"}).done()})):Q()})},stash:function(e,t,n){var r=this;t=t?t:r._DEFAULT_LOG_LOCATION;var i=e.getBackendData().git;return r.context.event.fireOperationStarted({entity:e,name:"STASH"}).done(),this.context.service.progress.startTask(r.context.i18n.getText("i18n","gitDispatcher_StashStrated"),this.context.i18n.getText("i18n","gitDispatcher_Stashing")).then(function(o){return r.context.service.git.getLocalBranches(i).then(function(a){return r.context.service.git.getCurrentBranchName(a).then(function(a){return r._getStashDialog().getController().open(a).then(function(a){return"CANCEL"!==a?r.context.service.git.stash(i,a,n).then(function(){r.context.service.usagemonitoring.report("git","stash",t).done(),r.context.event.fireStashCompleted({message:"gitDispatcher_StashCompletedSuccessfully"}).done()}).fail(function(e){r._callMessageDialog(e)}).fin(function(){r.context.service.usernotification.liteInfo(r.context.i18n.getText("i18n","gitDispatcher_StashCompletedSuccessfully",!0)).done(),r.context.event.fireOperationStopped({entity:e,name:"STASH"}).done(),r.context.service.progress.stopTask(o).done()}):void r.context.event.fireOperationStopped({entity:e,name:"STASH"}).done()})})}).fail(function(e){r._callMessageDialog(e)}).fin(function(){r.context.event.fireOperationStopped({entity:e,name:"STASH"}).done()})})},isStashAvailable:function(e){var t=e.getBackendData().git;return this.context.service.git.getStash(t).then(function(e){var t=!!(e.Children&&e.Children.length>0);return t})},useStash:function(e,t){var n=this;t=t?t:n._DEFAULT_LOG_LOCATION;var r=e.getBackendData().git;return n.context.event.fireOperationStarted({entity:e,name:"USESTASH"}).done(),n.context.service.git.getStash(r).then(function(i){return i.Children&&i.Children.length>0?n._getUseStashDialog().getController().open(i).then(function(i){return"CANCEL"!==i?this.context.service.progress.startTask(n.context.i18n.getText("i18n","gitDispatcher_UseStashStrated"),this.context.i18n.getText("i18n","gitDispatcher_UseStashing")).then(function(o){return n.context.service.git.useStash(r,i).then(function(){n.context.event.fireUseStashCompleted({message:"gitDispatcher_UseStashCompletedSuccessfully"}).done()}).fail(function(r){409===r.status&&n.context.service.gitclient.getStatus(e,!1).then(function(e){if(n.context.service.usagemonitoring.report("git","show stash",t).done(),e.length>0){r.detailedMessage=n.context.i18n.getText("i18n","gitDispatcher_UseStashConflictWithoutCommit",!0);for(var i=0;i0&&(o.setProperty("/sPushCompletedMessage",p.getText("i18n","gitDispatcher_pushCompletedWithTagErrors")),o.setProperty("/sFailedPushedTags",p.getText("i18n","gitDispatcher_pushFailedTags",[e.aFailedTags.join()])),o.setProperty("/isFailedPushedTags",!0)),e.aSuccessTags.length>0&&(o.setProperty("/sSuccessfullyPushedTags",p.getText("i18n","gitDispatcher_SuccessTags",[e.aSuccessTags.join()])),o.setProperty("/isSuccessfullyPushedTags",!0)),i.open()}else l.usernotification.liteInfo(p.getText("i18n","gitDispatcher_pushCompletedSuccessfully",!0)).done();u.context.event.firePushCompleted().done(),u.context.service.usagemonitoring.report("git","push",s,n(t)).done()}).fail(function(n){return u._shouldRetryAfterSSOFailed(n,t.oAdditionalHeaders)?u._pushInternal(e,r,i,o,a,s):u._isNotAuthorized(n,t).then(function(e){return c=!e,Q.reject(n)})}).fin(function(){c&&u._saveToStorage(t),u.context.service.progress.stopTask(f).done()})}):Q()}).fail(function(e){if("Warning"===e.type)l.usernotification.warning(e.name).done();else if("PushFailed"===e.status){var n=e.oErrorPushResponse,r=n.oPushedCommit,i=r?r.Result:"",o="";t.isEmpty(i)||(o=r&&r.Message?p.getText("i18n","gitDispatcher_pushErrorMessage",[p.getText("i18n","gitDispatcher_pushFailureReason")+" "+r.Message.charAt(0).toUpperCase()+r.Message.substring(1)+"\n\n"," "+i]):p.getText("i18n","gitDispatcher_pushErrorMessage",[""," "+i])),n.sDetailedMessage&&(o+=t.isEmpty(o)?p.getText("i18n","gitDispatcher_pushDetailedFailureReason",[""," "+n.sDetailedMessage]):p.getText("i18n","gitDispatcher_pushDetailedFailureReason",["\n\n ","\n "+n.sDetailedMessage])),n.aFailedTags.length>0&&(o+="\n\n "+p.getText("i18n","gitDispatcher_pushFailedTags",[n.aFailedTags.join()])),n.aSuccessTags.length>0&&(o+="\n\n "+p.getText("i18n","gitDispatcher_SuccessTags",[n.aSuccessTags.join()])),u._callMessageDialog({source:"git",name:e.name, detailedMessage:o})}else u._callMessageDialog(e)})},merge:function(e,t,n){var r=this;n=n?n:r._DEFAULT_LOG_LOCATION;var i=this.context.service,o=e.getBackendData().git;return this.context.event.fireOperationStarted({entity:e,name:"MERGE"}).done(),r.context.service.progress.startTask(r.context.i18n.getText("i18n","gitDispatcher_MergeStrated"),r.context.i18n.getText("i18n","gitDispatcher_Merging")).then(function(a){return Q.all([i.git.getLocalBranches(o),i.git.getRemoteBranches(o)]).spread(function(n,i){return r._getBranchesDialog().getController().open({localBranches:n,remoteBranches:i},e,"MERGE",t)}).then(function(e){e&&(i.usernotification.liteInfo(r.context.i18n.getText("i18n","gitDispatcher_MergeCompletedSuccessfully",!0)).done(),r.context.event.fireMergeCompleted().done(),r.context.service.usagemonitoring.report("git","merge",n).done())}).fail(function(e){r.context.event.fireMergeCompleted().done(),e&&r._callMessageDialog(e)}).fin(function(){r.context.event.fireOperationStopped({entity:e,name:"MERGE"}).done(),r.context.service.progress.stopTask(a).done()})})},rebase:function(e,t){var n=this;t=t?t:n._DEFAULT_LOG_LOCATION;var r=this.context.service,i=e.getBackendData().git;return this.context.event.fireOperationStarted({entity:e,name:"REBASE"}).done(),n.context.service.progress.startTask(n.context.i18n.getText("i18n","gitDispatcher_RebaseStrated"),n.context.i18n.getText("i18n","gitDispatcher_Rebasing")).then(function(o){return Q.all([r.git.getLocalBranches(i),r.git.getRemoteBranches(i)]).spread(function(t,r){return n._getBranchesDialog().getController().open({localBranches:t,remoteBranches:r},e,"REBASE")}).then(function(e){e?(n.context.event.fireRebaseCompleted({message:"gitDispatcher_RebaseCompletedSuccessfully"}).done(),n.context.service.usagemonitoring.report("git","rebase",t).done()):n.context.event.fireRebaseInteractive().done()}).fail(function(e){e&&e.message&&r.usernotification.alert(e.message).done()}).fin(function(){n.context.event.fireOperationStopped({entity:e,name:"REBASE"}).done(),n.context.service.progress.stopTask(o).done()})})},reset:function(e,t,n){var r=this,i=this.context.service,o=e.getBackendData().git;return n=n?n:r._DEFAULT_LOG_LOCATION,this.context.service.progress.startTask(this.context.i18n.getText("i18n","gitDispatcher_ResetStrated"),this.context.i18n.getText("i18n","gitDispatcher_Resting")).then(function(a){return t?i.usernotification.confirm(r.context.i18n.getText("i18n","gitDispatcher_resetInRebaseInteractiveConfirmation",["\n\n"])).then(function(t){if(t.bResult)return r.context.event.fireOperationStarted({entity:e,name:"RESET"}).done(),i.git.resetBranch(o,"HARD").then(function(){r.context.event.fireResetCompleted().done(),i.usernotification.liteInfo(r.context.i18n.getText("i18n","gitDispatcher_ResetCompletedSuccessfully",!0)).done(),r.context.service.usagemonitoring.report("git","reset",n).done()})}).fin(function(){r.context.event.fireOperationStopped({entity:e,name:"RESET"}).done(),r.context.service.progress.stopTask(a).done()}):(r.context.event.fireOperationStarted({entity:e,name:"RESET"}).done(),Q.all([i.git.getLocalBranches(o),i.git.getRemoteBranches(o)]).spread(function(t,n){return r._getBranchesDialog().getController().open({localBranches:t,remoteBranches:n},e,"RESET")}).then(function(e){e&&(r.context.event.fireResetCompleted().done(),i.usernotification.liteInfo(r.context.i18n.getText("i18n","gitDispatcher_ResetCompletedSuccessfully",!0)).done(),r.context.service.usagemonitoring.report("git","reset",n).done())}).fin(function(){r.context.event.fireOperationStopped({entity:e,name:"RESET"}).done(),r.context.service.progress.stopTask(a).done()}))})},ignore:function(e,t){var n=this;return t=t?t:n._DEFAULT_LOG_LOCATION,this.context.service.git.setIgnore(e).then(function(){return n.context.service.usagemonitoring.report("git","ignore",t).done(),n.context.event.fireIgnoreCompleted()})},untrackAndIgnore:function(e){var t=this,n=e.getBackendData().git;return t.context.service.git.untrack(n).then(function(){return t.context.service.git.setIgnore(e).then(function(){return t.context.event.fireIgnoreCompleted()})}).fail(function(e){e&&t._callMessageDialog(e)})},ignoreSystemFiles:function(e,t){var n=this;return t=t?t:n._DEFAULT_LOG_LOCATION,this.context.service.git.setIgnoreSystemFiles(e).then(function(t){if(t&&e.getEntity().getBackendData()&&e.getEntity().getBackendData().git)return n._getIgnoreSystemFilesDialog().getController().open().then(function(t){if("CANCEL"!==t){var r=t,i=e.getEntity().getBackendData().git;return n.verifyUserInfo(e.getEntity()).then(function(t){return n.context.service.git.isGerritSupported(e.getEntity().getBackendData().git).then(function(o){return n.context.service.git.commit(i,r,t,!1,o).then(function(){return n.context.service.git.getLocalBranches(i).then(function(t){return n.context.service.git.getCurrentBranchName(t).then(function(t){return n.push(e.getEntity(),o,void 0,!0,void 0)})})})})})}})}).fin(function(){return n.context.service.usagemonitoring.report("git","ignoreSystemFiles",t).done(),n.context.event.fireIgnoreSystemFilesCompleted({document:e})})},openCompareEditor:function(e,t,n,r){var i=this;return r=r?r:"from_pane",i._openCompareEditor(e,t,n).then(function(){i.context.service.usagemonitoring.report("git","compare",r).done()})},_openCompareEditor:function(e,t,n){var r=this;if(e){if(n){var i=[e.getVersion("CONFLICT_NEW","gitFileDao"),e.getVersion("CONFLICT_OLD","gitFileDao")];return Q.all(i).spread(function(e,t){return r.context.service.compare.compare(e,t)})}return t?Q.all([r.context.service.git.getFileHead(e.getEntity().getBackendData().git,t),r.context.service.git.getFileNew(e.getEntity().getBackendData().git,t)]).spread(function(t,n){return r.context.service.compare.compare(e,t,n)}):this.context.service.git.getFileHead(e.getEntity().getBackendData().git,t).then(function(t){return r.context.service.compare.compare(e,t)})}},_saveToStorage:function(e){if(e.saveToCache){var t=URI(e.oDetails.GitUrl).host(),n=URI(e.oDetails.GitUrl).protocol();"ssh"===n?this.context.service.keystorage.setSsh(t,e.gitUsername,e.sshPrivateKey).done():"https"===n&&this.context.service.keystorage.setHttps(t,e.gitUsername,e.httpsPass).done()}},createRemoteBranch:function(e,t,n,r){var i=this,o=!0;return this._getRepositoryDetails(r,!1,!0).then(function(e){return e?(i._getAddBranchDialog().getController().closeDialog(),i.context.service.progress.startTask(i.context.i18n.getText("i18n","gitDispatcher_CreateRemoteBranchStarted"),i.context.i18n.getText("i18n","gitDispatcher_CreateRemoteBranch")).then(function(r){return i.context.service.git.createRemoteBranch(t,n,e.oGit,e.oDetails,e.sshPrivateKey,e.httpsPass,e.gitUsername,e.oAdditionalHeaders).fail(function(t){return i._isNotAuthorized(t,e).then(function(e){return o=!e,Q.reject(t)})}).fin(function(){return o&&i._saveToStorage(e),i.context.service.progress.stopTask(r).done()})})):Q()})},_getRepositoryDetails:function(e,t,n){var r=this,i=e.getBackendData().git;return this.context.event.fireOperationStarted({entity:e,name:n}).done(),this.context.service.git.getRepositoryDetails(i).then(function(o){return r.context.event.fireOperationStopped({entity:e,name:n}).done(),r.useHcpSso(o.GitUrl).then(function(n){return n&&!t?Q({oEntity:e,oGit:i,oDetails:o,saveToCache:!1,oAdditionalHeaders:{headers:{Authorization:"HCP-Session"}}}):r.getAuthenticationView().getController().open(o.GitUrl,t).then(function(t){return t?Q({oEntity:e,oGit:i,oDetails:o,gitUsername:t.userName,sshPrivateKey:t.sshPrivateKey,httpsPass:t.httpsPassword,change:t.change,saveToCache:t.saveToCache}):Q()})})})},verifyUserInfo:function(e){var n=this,r=e.getBackendData().git;return Q(r?this.context.service.git.getRepositoryConfigurations(r):[]).then(function(i){var o={sEmail:t.get(t.find(i,{Key:"user.email"}),"Value"),sName:t.get(t.find(i,{Key:"user.name"}),"Value")};if(!(o.sEmail&&o.sName&&o.sEmail[0]&&o.sName[0]))return n.context.service.git.getGitSettings().then(function(t){return t&&t.sEmail?void(r&&n.context.service.git.setRepositoryConfiguration(r,{Key:"user.email",Value:t.sEmail}).then(function(){return n.context.service.git.setRepositoryConfiguration(r,{Key:"user.name",Value:t.sName})}).done()):n.context.service.system.getSystemInfo().then(function(t){var r=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,i=n._getUserInfoDialog(),o=i.getModel();return t&&r.test(t.sEMail)?(o.setProperty("/commitData/email",t.sEMail),o.setProperty("/commitData/user",t.sFirstName+" "+t.sLastName),o.setProperty("/commitData/bButtonEnabled",!0)):o.setProperty("/commitData/bButtonEnabled",!1),o.setProperty("/commitData/bError",!1),o.setProperty("/entity",e),i.open(),n._oUserInfoPromis=Q.defer(),n._oUserInfoPromis.promise})})})},_handleUserInfo:function(e){var t=this,n=this._getUserInfoDialog(),r=n.getModel(),i=r.getProperty("/entity").getBackendData().git,o={sEmail:r.getProperty("/commitData/email"),sName:r.getProperty("/commitData/user")};return n.close(),"sapescape"===e.type||e.getSource().data("close")?void t._oUserInfoPromis.reject():void Q(i?this.context.service.git.setRepositoryConfiguration(i,{Key:"user.email",Value:o.sEmail}).then(function(){return t.context.service.git.setRepositoryConfiguration(i,{Key:"user.name",Value:o.sName})}):"").then(function(){return t.context.service.git.setGitSettings(o.sEmail,o.sName).then(function(){t._oUserInfoPromis.resolve()})}).fail(function(e){t._oUserInfoPromis.reject(),t._callMessageDialog(e)}).done()},_callMessageDialog:function(t){e.callMessageDialog(t,this.context)},_getUserInfoDialog:function(){if(!this._oUserInfoDialog){var e={commitData:{email:"",user:"",bSaved:!0,bButtonEnabled:!1,bError:!1},entity:{}};this._oUserInfoDialog=sap.ui.jsfragment("sap.watt.ideplatform.plugin.gitclient.view.GitUserInfoDialog",this),this._oUserInfoDialog.setModel(new sap.ui.model.json.JSONModel(e)),this.context.i18n.applyTo(this._oUserInfoDialog)}return this._oUserInfoDialog},getAuthenticationView:function(){return this._oAuthenticationView||(this._oAuthenticationView=sap.ui.view({viewName:"sap.watt.ideplatform.plugin.gitclient.view.GitAuthentication",type:sap.ui.core.mvc.ViewType.JS,viewData:{context:this.context}})),this._oAuthenticationView},_getFetchChangesDialog:function(){return this._oFetchView||(this._oFetchView=sap.ui.view({viewName:"sap.watt.ideplatform.plugin.gitclient.view.GitFetchDialog",type:sap.ui.core.mvc.ViewType.JS,viewData:{context:this.context}})),this._oFetchView},_getBranchesDialog:function(){return this._oBranchesView||(this._oBranchesView=sap.ui.view({viewName:"sap.watt.ideplatform.plugin.gitclient.view.GitBranchesDialog",type:sap.ui.core.mvc.ViewType.JS,viewData:{context:this.context}})),this._oBranchesView},_getAddBranchDialog:function(){return this._oAddBranchesView||(this._oAddBranchesView=sap.ui.view({viewName:"sap.watt.ideplatform.plugin.gitclient.view.GitAddBranchDialog",type:sap.ui.core.mvc.ViewType.JS,viewData:{context:this.context}})),this._oAddBranchesView},_getIgnoreSystemFilesDialog:function(){return this._oIgnoreSystemFilesDialogView||(this._oIgnoreSystemFilesDialogView=sap.ui.view({viewName:"sap.watt.ideplatform.plugin.gitclient.view.GitIgnoreSystemFilesDialog",type:sap.ui.core.mvc.ViewType.JS,viewData:{context:this.context}})),this._oIgnoreSystemFilesDialogView},_getStashDialog:function(){return this._oStashDialogView||(this._oStashDialogView=sap.ui.view({viewName:"sap.watt.ideplatform.plugin.gitclient.view.GitStashDialog",type:sap.ui.core.mvc.ViewType.JS,viewData:{context:this.context}})),this._oStashDialogView},_getUseStashDialog:function(){return this._oUseStashDialogView||(this._oUseStashDialogView=sap.ui.view({viewName:"sap.watt.ideplatform.plugin.gitclient.view.GitUseStashDialog",type:sap.ui.core.mvc.ViewType.JS,viewData:{context:this.context}})),this._oUseStashDialogView},_getPushNotificationfragment:function(){if(this._oPushNotificationfragment){var e=this._oPushNotificationfragment.getModel();e.setProperty("/sSuccessfullyPushedTags",""),e.setProperty("/sFailedPushedTags",""),e.setProperty("/aNotificationLinks",[])}else{var t=new sap.ui.model.json.JSONModel;t.setData({aNotificationLinks:[],sChanges:"",sSuccessfullyPushedTags:"",sFailedPushedTags:"",isSuccessfullyPushedTags:!1,isFailedPushedTags:!1,sPushCompletedMessage:""}),this._oPushNotificationfragment=sap.ui.jsfragment("sap.watt.ideplatform.plugin.gitclient.view.GitPushNotification",this),this._oPushNotificationfragment.setModel(t),this.context.i18n.applyTo(this._oPushNotificationfragment)}return this._oPushNotificationfragment},_getPushNotificationUrls:function(e){for(var t=e.indexOf("New Changes:")>-1?e.substring(e.indexOf("New Changes:")).trim():e.substring(e.indexOf("Updated Changes:")).trim(),n=t.split("\n"),r=[],i=1;i-1?n=!0:e.oErrorPushResponse&&e.oErrorPushResponse.sDetailedMessage.indexOf(r)>-1&&(n=!0),n&&t&&t.oDetails&&t.oDetails.GitUrl){var i=URI(t.oDetails.GitUrl).host(),o=URI(t.oDetails.GitUrl).protocol();if("ssh"===o)return this.context.service.keystorage.delete(i,o,t.gitUsername,t.sshPrivateKey).then(function(){return!0});if("https"===o)return this.context.service.keystorage.delete(i,o,t.gitUsername,t.httpsPass).then(function(){return!0})}return Q(!1)},_isHcpGitRepository:function(e){return!!("hcproxy"===sap.watt.getEnv("server_type")&&!sap.watt.getEnv("che_server")&&e&&e.length>0)&&this.context.service.hcpconnectivity.getLandscapeDomain().then(function(t){var n=new RegExp("^https://git..*"+t+".*");return!!e.match(n)})},useHcpSso:function(e){var t=this._oStorage.get("gitHcpSsoFailed_"+URI(e).host());return Q(!t&&this._isHcpGitRepository(e))}};return r}),define("sap.watt.ideplatform.gitclient/service/KeyStorage",{_oSsh:{},_oHttps:{},get:function(e,t){if("SSH"===t.toUpperCase())return this._oSsh[e];if("HTTPS"===t.toUpperCase())return this._oHttps[e];throw new Error("Unsupported type")},setSsh:function(e,t,n){this._oSsh[e]={username:t,key:n}},setHttps:function(e,t,n){this._oHttps[e]={username:t,password:n}},delete:function(e,t,n,r){if("SSH"===t.toUpperCase()){var i=this._oSsh[e];i&&i.username===n&&i.key===r&&(this._oSsh[e]={})}else if("HTTPS"===t.toUpperCase()){var o=this._oHttps[e];o&&o.username===n&&o.password===r&&(this._oHttps[e]={})}},resetKeys:function(){this._oSsh={},this._oHttps={}}}),define("sap.watt.ideplatform.gitclient/service/GitCheckoutConflictsHandler",{_oCheckoutConflictsFragment:null,_oCheckoutConflictsDeferred:null,_aBranches:null,_oEntity:null,getContent:function(){this._oCheckoutConflictsFragment||(this._oCheckoutConflictsFragment=sap.ui.jsfragment("sap.watt.ideplatform.plugin.gitclient.view.GitCheckoutConflicts",this),this._oCheckoutConflictsFragment.setModel(new sap.ui.model.json.JSONModel),this.context.i18n.applyTo(this._oCheckoutConflictsFragment))},_getBranches:function(e){var t=this;return this.context.service.git.getLocalBranches(e).then(function(e){t._aBranches=e}).fail(function(e){t.callMessageDialog(e),t._oCheckoutConflictsDeferred.reject(e)})},callMessageDialog:function(e){if(!e.source||"git"!==e.source)throw e;var t=e.detailedMessage?"\n\n"+e.detailedMessage:"";switch(e.type){case"Warning":this._oContext.service.usernotification.warning(e.name+t).done();break;case"Info":this._oContext.service.usernotification.info(e.name+t).done();break;default:this._oContext.service.usernotification.alert(e.name+t).done()}},openDialog:function(e,t,n){var r=this;this._oEntity=e,this._aBranches=n;var i=e.getBackendData().git;return this._oCheckoutConflictsFragment||this.getContent(),Q(this._aBranches?this._aBranches:this._getBranches(i)).then(function(){r._oCheckoutConflictsFragment.open()}).done(),this._oCheckoutConflictsFragment.getModel().setData(t),this._oCheckoutConflictsDeferred=Q.defer(),this._oCheckoutConflictsDeferred.promise},cancel:function(){this._oCheckoutConflictsFragment.close(),this._oCheckoutConflictsDeferred.resolve(!1)},resetHard:function(){var e=this,t=this._oEntity.getBackendData().git;this._oCheckoutConflictsFragment.close(),this.context.service.git.getRemoteBranchOfCurrent(e._aBranches).then(function(n){return e.context.service.usernotification.confirm(e.context.i18n.getText("i18n","gitDispatcher_resetInRebaseInteractiveConfirmation",["\n\n"])).then(function(r){return r.bResult?e.context.service.git.resetBranch(t,"HARD",n).then(function(){e._oCheckoutConflictsDeferred.resolve(!0)}):void e._oCheckoutConflictsDeferred.resolve(!1)})}).fail(function(t){e._oCheckoutConflictsDeferred.reject(t)}).done()}}),define("sap.watt.ideplatform.gitclient/service/GitSettings",["sap/watt/platform/plugin/platform/service/ui/AbstractConfig"],function(e){"use strict";var t="server_type",n="hcproxy";return e.extend("sap.watt.common.plugin.gitclient.service.GitSettings",{_oContent:null,getUserPreferenceContent:function(){var e=this;return this._oContent||(this._oContent=this._createUI()),e.context.service.git.getGitSettings().then(function(t){return Q(t&&t.sEmail?t:e.context.service.system.getSystemInfo().then(function(t){var n=e._isGerritAvailable(),r=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;if(t&&r.test(t.sEMail)){var i=e.context.i18n.getText("gITSettings_auto_fill_IDP");return i+=e.context.i18n.getText("gITSettingsDialog_Git_Email_Address")+" "+t.sEMail+"\n\n",(t.sLastName||t.sFirstName)&&(i+=e.context.i18n.getText("gITSettingsDialog_Git_User_Name")+" ",i+=t.sLastName?t.sLastName+" ":"",i+=t.sFirstName),i+=e.context.i18n.getText("gIT_data_protection"),e.context.service.usernotification.confirm(i).then(function(r){return r.bResult?(e.context.service.git.setGitSettings(t.sEMail,t.sLastName+" "+t.sFirstName).fail(function(t){e._callMessageDialog(t)}).done(),{sName:t.sLastName+" "+t.sFirstName,sEmail:t.sEMail,bShowGerritPane:n}):{sName:"",sEmail:"",bShowGerritPane:n}})}return{sName:"",sEmail:"",bShowGerritPane:n}})).then(function(t){return e._oContent.getModel().setProperty("/modelData",t),e._oContent})}).fail(function(t){e._callMessageDialog(t)})},saveUserPreference:function(){var e=this._oContent.getModel().getData().modelData,t=this;return this.context.service.git.setGitSettings(e.sEmail,e.sName,e.bShowGerritPane).fail(function(e){t._callMessageDialog(e)})},_isGerritAvailable:function(){return sap.watt.getEnv("internal")&&this._isGerritAvailableFotServerType()},_isGerritAvailableFotServerType:function(){return sap.watt.getEnv(t)===n},_callMessageDialog:function(e){if(!e.source||"git"!==e.source)throw e;var t=e.detailedMessage?"\n\n"+e.detailedMessage:"";switch(e.type){case"Warning":this.contextcontextcontext.service.usernotification.warning(e.name+t).done();break;case"Info":this.contextcontext.service.usernotification.info(e.name+t).done();break;default:this.context.service.usernotification.alert(e.name+t).done()}},_createUI:function(){var e,t=new sap.ui.commons.TextField({width:"100%",value:"{sEmail}",editable:"{isUserAndEmailSupported}",layoutData:new sap.ui.layout.GridData({span:"L7 M7 S7"})}),n=new sap.ui.commons.Label({labelFor:t,text:"{i18n>gITSettingsDialog_Git_Email_Address}",width:"100%",layoutData:new sap.ui.layout.GridData({span:"L3 M3 S5",linebreak:!0})}),r=new sap.ui.commons.TextField({width:"100%",value:"{sName}",editable:"{isUserAndEmailSupported}",layoutData:new sap.ui.layout.GridData({span:"L7 M7 S7"})}),i=new sap.ui.commons.Label({labelFor:r,text:"{i18n>gITSettingsDialog_Git_User_Name}",width:"100%",layoutData:new sap.ui.layout.GridData({span:"L3 M3 S5",linebreak:!0})}),o=new sap.ui.commons.Label({text:"{i18n>gIT_data_protection}",tooltip:"{i18n>gIT_data_protection}",width:"100%",wrapping:!0,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0})}).addStyleClass("gitDataProtection");this._isGerritAvailableFotServerType()&&(e=new sap.ui.commons.CheckBox({text:"{i18n>gITSettings_ShowGerritPane}",tooltip:"{i18n>gITSettings_ShowGerritPane}",checked:"{bShowGerritPane}"}));var a=new sap.ui.layout.Grid({vSpacing:1,width:"100%",content:[n,t,i,r,e,o]});return a.setModel(new sap.ui.model.json.JSONModel({modelData:{sName:"",sEmail:"",bShowGerritPane:!0}})),a.bindElement("/modelData"),this.context.i18n.applyTo(a),a}})}),define("sap.watt.ideplatform.gitclient/service/GitConfigurations",["sap/watt/platform/plugin/platform/service/ui/AbstractConfig"],function(e){"use strict";return e.extend("sap.watt.ideplatform.gitclient.service.GitConfigurations",{_oContent:null,_oGit:null,_aCandidatesToDelete:[],getProjectSettingContent:function(e,t){var n=this;return n._aCandidatesToDelete=[],this.context.service.selection.getSelection().then(function(e){return e&&e[0]&&e[0].document&&e[0].document.getEntity().getBackendData().git?(n._oGit=e[0].document.getEntity().getBackendData().git,n._getAndUpdateRepositoryConfigurations().then(function(){return n._oContent})):n._setMissingConfigurations()}).fail(function(e){n._callMessageDialog(e)})},saveProjectSetting:function(e,t){if(this._oContent){var n=this,r=[],i=this._oContent.getModel();i.getProperty("/modelData/isKeyValid")&&i.getProperty("/modelData/isValueValid")&&r.push({operation:"add"});for(var o=this._oContent.getContent(),a=0;a0)return n._getAndUpdateRepositoryConfigurations()})}},_getAndUpdateRepositoryConfigurations:function(){var e,t=this;return t.context.service.git.getRepositoryConfigurations(this._oGit).then(function(n){return n&&0!==n.length?(t._oContent||(jQuery.sap.includeStyleSheet("resources/sap/watt/ideplatform/plugin/gitclient/css/gitConfigurations.css"),t._oContent=t._createUI(),e=new sap.ui.model.json.JSONModel,e.setData({configurations:[],modelData:{key:"",value:"",isKeyValid:!1,isValueValid:!1,isAddLineVisible:!1}}),t._oContent.setModel(e),t.context.i18n.applyTo(t._oContent)),e=t._oContent.getModel(),e.setProperty("/configurations",[]),e.setProperty("/configurations",n),void e.setProperty("/modelData/isAddLineVisible",!1)):t._setMissingConfigurations()})},_getLineIndex:function(e){var t=e.getSource().getBindingContext().sPath,n=t.split("/");return n[n.length-1]},_deleteConfigEntry:function(e){var t=this._getLineIndex(e),n=this._oContent.getModel(),r=n.getProperty("/configurations"),i=r[t];this._aCandidatesToDelete.push({operation:"delete",index:t,entryToDelete:i}),r.splice(t,1),n.setProperty("/configurations",r)},_editConfigEntry:function(e){for(var t=e.getSource().getParent(),n=t.getContent(),r=0;rgit_configuration_no_configurations}"});return this.context.i18n.applyTo(e),e},_callMessageDialog:function(e){if(!e.source||"git"!==e.source)throw e;var t=e.detailedMessage?"\n\n"+e.detailedMessage:"";switch(e.type){case"Warning":this.context.service.usernotification.warning(e.name+t).done();break;case"Info":this.context.service.usernotification.info(e.name+t).done();break;default:this.context.service.usernotification.alert(e.name+t).done()}},_addParamLineTemplate:function(){var e=new sap.ui.commons.Label({width:"100%",text:"{Key}",layoutData:new sap.ui.layout.GridData({span:"L3 M3 S3"})}),t=new sap.ui.commons.TextField({width:"100%",value:"{Value}",enabled:!1,liveChange:[this._verifyValueInputIsNotEmpty,this],layoutData:new sap.ui.layout.GridData({span:"L5 M5 S5"})}).data("value","value").addStyleClass("gitConfigurationTextView"),n=new sap.m.Button({icon:"sap-icon://watt/delete",lite:!0,tooltip:"{i18n>git_configuration_delete_tooltip}",press:[this._deleteConfigEntry,this],layoutData:new sap.ui.layout.GridData({span:"L1 M1 S1"})}).addStyleClass("gitConfigurationButtonLiteHover sapUiTinyMarginBeginEnd"),r=new sap.m.Button({icon:"sap-icon://edit",lite:!0,tooltip:"{i18n>git_configuration_edit_tooltip}",press:[this._editConfigEntry,this],layoutData:new sap.ui.layout.GridData({span:"L1 M1 S1"})}).addStyleClass("gitConfigurationButtonLiteHover sapUiTinyMarginBeginEnd"),i=new sap.m.Button({icon:"sap-icon://save",lite:!0,tooltip:"{i18n>git_configuration_save_tooltip}",press:[this._saveConfigEntry,this],enabled:!1,layoutData:new sap.ui.layout.GridData({span:"L1 M1 S1"})}).data("save","save").addStyleClass("gitConfigurationButtonLiteHover sapUiTinyMarginBeginEnd"),o=new sap.ui.commons.layout.HorizontalLayout({content:[r,n,i],layoutData:new sap.ui.layout.GridData({span:"L3 M3 S3"})}).data("lineLayout","lineLayout"),a=new sap.ui.layout.Grid({width:"100%",hSpacing:0,content:[e,t,o],layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"})});return a},_createUI:function(){var e=this,t=new sap.ui.commons.Label({text:"{i18n>git_configuration_key}",design:"Bold",textAlign:"Begin",width:"100%",layoutData:new sap.ui.layout.GridData({span:"L3 M3 S3"})}),n=new sap.ui.commons.Label({text:"{i18n>git_configuration_value}",design:"Bold",width:"100%",layoutData:new sap.ui.layout.GridData({span:"L5 M5 S5"})}),r=new sap.ui.layout.Grid({content:[t,n],width:"100%",vSpacing:0,hSpacing:0,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"})}),i=new sap.ui.layout.Grid({width:"100%",vSpacing:0,hSpacing:0,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"})}).data("grid","grid"),o=this._addParamLineTemplate();i.bindAggregation("content",{path:"/configurations",template:o});var a=new sap.m.Button({text:{path:"isAddLineVisible",formatter:function(t){return t?e.context.i18n.getText("git_configuration_hide_button"):e.context.i18n.getText("git_configuration_add_button")}},tooltip:"{i18n>git_configuration_add_tooltip}",layoutData:new sap.ui.layout.GridData({span:"L2 M2 S2"}),press:[this._changeConfigEntryLineState,this]}).addStyleClass("riverControlSmall sapUiTinyMarginBeginEnd"),s=new sap.ui.commons.Label({text:"{i18n>git_configuration_key}",required:!0,design:"Bold",tooltip:"{i18n>git_configuration_newLineKeyTooltip}",visible:"{isAddLineVisible}",layoutData:new sap.ui.layout.GridData({span:"L1 M1 S1"})}),u=new sap.ui.commons.TextField({width:"100%",value:"{key}",visible:"{isAddLineVisible}",tooltip:"{i18n>git_configuration_newLineKeyTooltip}",liveChange:[this._verifyKeyInput,this],layoutData:new sap.ui.layout.GridData({span:"L3 M3 S3"})}),c=new sap.ui.commons.Label({text:"{i18n>git_configuration_value}",required:!0,design:"Bold",tooltip:"{i18n>git_configuration_newLineValueTooltip}",visible:"{isAddLineVisible}",layoutData:new sap.ui.layout.GridData({span:"L1 M1 S1"})}),l=new sap.ui.commons.TextField({width:"100%",value:"{value}",visible:"{isAddLineVisible}",tooltip:"{i18n>git_configuration_newLineValueTooltip}",liveChange:[this._verifyValueInput,this],layoutData:new sap.ui.layout.GridData({span:"L4 M4 S4"})}),p=new sap.ui.commons.Label({width:"100%",text:"{i18n>gIT_data_protection}",wrapping:!0,tooltip:"{i18n>gIT_data_protection}",layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0})}).addStyleClass("gitDataProtection"),f=new sap.m.Button({icon:"sap-icon://save",lite:!0,tooltip:"{i18n>git_configuration_save_tooltip}",press:[this._addAndSaveConfigEntry,this],enabled:{parts:["isKeyValid","isValueValid"],formatter:function(e,t){return e&&t}},visible:"{isAddLineVisible}",layoutData:new sap.ui.layout.GridData({span:"L1 M1 S1"})}).addStyleClass("gitConfigurationButtonLiteHover sapUiTinyMarginBeginEnd"),d=new sap.ui.layout.Grid({width:"100%",vSpacing:0,hSpacing:0,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),containerQuery:!0,content:[a,s,u,c,l,f]}).addStyleClass("gitConfigurationGridHeight");d.bindElement("/modelData");var h=new sap.ui.layout.Grid({layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),content:[d,r,i,p]}).addStyleClass("sapUiSizeCompact");return h}})}),define("sap.watt.ideplatform.aceeditor/command/BaseCommand",[],function(){"use strict";function e(){}return e.prototype={isAvailable:function(){return Q(!0)},isEnabled:function(){return this.getCodeEditor().then(function(e){return!!e})},getCodeEditor:function(){return this.context.service.selection.getOwner().then(function(e){return e&&e.instanceOf&&e.instanceOf("sap.watt.common.plugin.aceeditor.service.Editor")?e:null})},executeEditorCommand:function(e){return this.getCodeEditor().then(function(t){if(t)return t.executeCommand(e)})}},e}),define("sap.watt.ideplatform.aceeditor/command/Find",["./BaseCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.execute=function(){return this.getCodeEditor().then(function(e){if(e)return e.showFind()})},t}),define("sap.watt.ideplatform.aceeditor/command/GoToLine",["./BaseCommand"],function(e){ "use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.execute=function(){var e=this;return this._getDocAndStatus().then(function(t){t.doc.getProject().then(function(t){return t?e.context.service.usagemonitoring.report("editor","gotoline","from_command",t.getTitle()).done():e.context.service.usagemonitoring.report("editor","gotoline","from_command","").done(),e.getCodeEditor().then(function(t){if(t)return e.context.service.gotoline.openGoToLine().then(function(e){if(void 0!==e)return t.gotoLine(e)})})})})},t.prototype._getDocAndStatus=function(){return this.context.service.selection.getOwner().then(function(e){return e.getSelection().then(function(t){var n=t.document;return e.getContentStatus(!0,!0).then(function(e){return{doc:n,contentStatus:e}})})})},t}),define("sap.watt.ideplatform.aceeditor/command/BaseEditCommand",["./BaseCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.isEnabled=function(){return Q.spread([this.isDocumentReadOnly(),e.prototype.isEnabled.call(this)],function(e,t){return!e&&t})},t.prototype.isDocumentReadOnly=function(){return this.context.service.selection.getSelection().then(function(e){return!(!e[0]||!e[0].document)&&e[0].document.isReadOnly()})},t}),define("sap.watt.ideplatform.aceeditor/command/FindAndReplace",["./BaseEditCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.execute=function(){return this.getCodeEditor().then(function(e){if(e)return e.showReplace()})},t}),define("sap.watt.ideplatform.aceeditor/command/Comment",["./BaseEditCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.execute=function(){var e=this;return this.getCodeEditor().then(function(t){if(t)return t.toggleComment().then(function(){return e.context.service.focus.setFocus(t)})})},t}),define("sap.watt.ideplatform.aceeditor/command/BlockComment",["./BaseEditCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.execute=function(){var e=this;return this.getCodeEditor().then(function(t){if(t)return t.toggleBlockComment().then(function(){return e.context.service.focus.setFocus(t)})})},t}),define("sap.watt.ideplatform.aceeditor/command/Invisibles",["./BaseCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.execute=function(){return this.getCodeEditor().then(function(e){if(e)return e.toggleShowInvisibles()})},t}),define("sap.watt.ideplatform.aceeditor/command/Todo",["./BaseEditCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.execute=function(){var e=this;return this.getCodeEditor().then(function(t){if(t)return t.addTodo().then(function(){return e.context.service.focus.setFocus(t)})})},t.prototype.isAvailable=function(){var t=this;return e.prototype.isAvailable.call(this).then(function(e){return!!e&&t.getCodeEditor().then(function(e){return!!e&&Q.spread([e.hasTodoTag(),e.getCurrentFilePath()],function(e,t){return e&&/\.js$|\.xsjs$|\.xsjslib$/.test(t)})})})},t}),define("sap.watt.ideplatform.aceeditor/command/Indent",["./BaseEditCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.execute=function(e){return this.executeEditorCommand(e)},t}),define("sap.watt.ideplatform.aceeditor/command/Outdent",["./BaseEditCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.execute=function(e){return this.executeEditorCommand(e)},t}),define("sap.watt.ideplatform.aceeditor/command/MoveLinesUp",["./BaseEditCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.execute=function(e){return this.executeEditorCommand(e)},t}),define("sap.watt.ideplatform.aceeditor/command/MoveLinesDown",["./BaseEditCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.execute=function(e){return this.executeEditorCommand(e)},t}),define("sap.watt.ideplatform.aceeditor/command/CopyLinesUp",["./BaseEditCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.execute=function(e){return this.executeEditorCommand(e)},t}),define("sap.watt.ideplatform.aceeditor/command/CopyLinesDown",["./BaseEditCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.execute=function(e){return this.executeEditorCommand(e)},t}),define("sap.watt.ideplatform.aceeditor/command/ExpandAll",["./BaseCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.execute=function(){var e=this;return this.getCodeEditor().then(function(t){if(t)return t.expandAll().then(function(){e.context.service.focus.setFocus(t)})})},t});define("sap.watt.ideplatform.aceeditor/command/CollapseAll",["./BaseCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.execute=function(){var e=this;return this.getCodeEditor().then(function(t){if(t)return t.collapseAll().then(function(){e.context.service.focus.setFocus(t)})})},t});define("sap.watt.ideplatform.aceeditor/service/EditorFactory",{create:function(e,t){return e=e||"aceeditor",t=jQuery.extend(t||{},{implements:"sap.watt.common.plugin.aceeditor.service.Editor",module:"sap.watt.ideplatform.aceeditor/service/EditorImpl"}),this.context.create(e,t)}}),define("sap.watt.ideplatform.aceeditor/service/EditorMode",[],function(){function e(e){var t;return t=/\^/.test(e)?e.replace(/\|(\^)?/g,function(e,t){return"$|"+(t?"^":"^.*\\.")})+"$":"^.*\\.("+e+")$",new RegExp(t,"gi")}var t=function(t,n,r){this.type=t,this.desc=n,this.mode="ace/mode/"+t,this.extensions=r,this.extRe=e(r)};return t.prototype={supportsFile:function(e){return e.match(this.extRe)},updateExtension:function(t){this.extensions=this.extensions+"|"+t,this.extRe=e(this.extensions)}},t}),define("sap.watt.ideplatform.aceeditor/service/EditorContextMenu",[],function(){var e=function(e,t){this.extension=e,this.menuGroup=t};return e}),define("sap.watt.ideplatform.aceeditor/service/EditorGutterContextMenu",[],function(){var e=function(e,t){this.extension=e,this.menuGroup=t};return e}),jQuery.sap.declare("sap.watt.common.plugin.aceeditor.control.Editor"),jQuery.sap.require("sap.watt.ideplatform.plugin.aceeditor.control.lib.ace-noconflict.ace"),jQuery.sap.require("sap.watt.ideplatform.plugin.aceeditor.control.lib.ace-noconflict.ext-searchbox"),sap.ui.core.Control.extend("sap.watt.common.plugin.aceeditor.control.Editor",{metadata:{properties:{width:{type:"sap.ui.core.CSSSize",defaultValue:"100%"},height:{type:"sap.ui.core.CSSSize",defaultValue:"100%"},value:"string",showPrintMargin:{type:"boolean",defaultValue:!1},annotations:{type:"object",defaultValue:{}},readOnly:{type:"boolean",defaultValue:!1},fontFamily:{type:"string"},fontSize:{type:"int",defaultValue:12},behavioursEnabled:{type:"boolean",defaultValue:!0},useSoftTabs:{type:"boolean",defaultValue:!1},showInvisibles:{type:"boolean",defaultValue:!1},highlightSelectedWord:{type:"boolean",defaultValue:!0},drawFullLineMarker:{type:"boolean",defaultValue:!1},theme:{type:"string",defaultValue:"ace/theme/sap-cumulus"},codeFolding:{type:"string",defaultValue:"markbegin"},newLineMode:{type:"string",defaultValue:"auto"},mode:{type:"string",defaultValue:"ace/mode/javascript"},gutterAnnotations:{type:"array",defaultValue:[]}},events:{liveChange:{},renderDone:{},beforeClosing:{},editorScroll:{},changeSession:{},editorNativeContextMenu:{},editorGutterMousedown:{},contentFormatted:{}}},init:function(){this._sTargetFile="",this._mSessions={},this._isDocumentOpening=!1,this._aSapThemes=["sap-basement","sap-cumulus","sap-flowerpower","sap-morlock"],ace.config.set("basePath",jQuery.sap.getModulePath("sap.watt.ideplatform.plugin.aceeditor.control.lib.ace-noconflict")),ace.config.set("modePath",jQuery.sap.getModulePath("sap.watt.ideplatform.plugin.aceeditor.control.lib.ace-noconflict")),ace.config.set("themePath",jQuery.sap.getModulePath("sap.watt.ideplatform.plugin.aceeditor.control.lib.ace-noconflict")),ace.config.set("workerPath",jQuery.sap.getModulePath("sap.watt.ideplatform.plugin.aceeditor.control.lib.ace-noconflict")),this._loadSapThemes(),sap.ui.core.ResizeHandler.register(this,jQuery.proxy(this._onResize,this));var e=ace.require("ace/lib/event");e&&(e.nextTick=void 0),this.attachBrowserEvent("contextmenu",function(e){e.preventDefault(),"ace_text-input"!==e.target.className&&"ace_content"!==e.target.className||(this.setFocus(),this.fireEditorNativeContextMenu({mouseEvent:e}))},this)},_loadSapThemes:function(){var e=jQuery.sap.getModulePath("sap.watt.ideplatform.plugin.aceeditor.themes");this._aSapThemes.forEach(function(t){var n=e+"/theme-"+t+".js";ace.config.setModuleUrl("ace/theme/"+t,n)})},_onResize:function(){this.refresh()},refresh:function(){this.oEditor&&this.oEditor.resize(!0)},getSession:function(){return this._mSessions[this._sTargetFile]||(this.oEditor?this.oEditor.getSession():null)},setSession:function(e){this.oEditor&&this.oEditor.setSession(e)},getValue:function(){return this.getSession()&&this.getSession().getValue()},setValue:function(e){this.getSession().setValue(e)},getDocument:function(){this.getSession().getDocument()},_getUndoManager:function(){return this.getSession()&&this.getSession().getUndoManager()},undo:function(){this.oEditor&&(this.oEditor.undo(),this.setFocus())},redo:function(){this.oEditor&&(this.oEditor.redo(),this.setFocus())},hasUndo:function(){var e=this._getUndoManager();return!!e&&e.hasUndo()},hasRedo:function(){var e=this._getUndoManager();return!!e&&e.hasRedo()},markClean:function(){var e=this._getUndoManager();e&&e.markClean()},isClean:function(){var e=this._getUndoManager();return!!e&&e.isClean()},setShowPrintMargin:function(e){this.setProperty("showPrintMargin",e,!0),this.oEditor&&this.oEditor.setShowPrintMargin(e)},setReadOnly:function(e){if(this.setProperty("readOnly",e,!0),this.oEditor){this.oEditor.setReadOnly(e);var t=$(".ace_gutter-layer ");e?t.addClass("acereadOnlyGutter"):t.removeClass("acereadOnlyGutter")}},setFontFamily:function(e){this.setProperty("fontFamily",e,!0),this.oEditor&&this.oEditor.setOptions({fontFamily:e})},setFontSize:function(e){this.setProperty("fontSize",e,!0),this.oEditor&&this.oEditor.setFontSize(e)},setBehavioursEnabled:function(e){this.setProperty("behavioursEnabled",e,!0),this.oEditor&&this.oEditor.setBehavioursEnabled(e)},setShowInvisibles:function(e){this.setProperty("showInvisibles",e,!0),this.oEditor&&this.oEditor.setShowInvisibles(e)},setUseSoftTabs:function(e){this.setProperty("useSoftTabs",e,!0),this.getSession()&&this.getSession().setUseSoftTabs(e)},setHighlightSelectedWord:function(e){this.setProperty("highlightSelectedWord",e,!0),this.oEditor&&this.oEditor.setHighlightSelectedWord(e)},setDrawFullLineMarker:function(e){this.setProperty("drawFullLineMarker",e,!0),this.oEditor&&this.oEditor.setSelectionStyle(e?"line":"text")},setCodeFolding:function(e){this.setProperty("codeFolding",e,!0),this.getSession()&&this.getSession().setFoldStyle(e)},setNewLineMode:function(e){this.setProperty("newLineMode",e,!0),this.getSession()&&this.getSession().setNewLineMode(e)},setAnnotations:function(e){this.formatAnnotations(e),this.setProperty("annotations",e,!0),this.getSession()&&this.getSession().setAnnotations(e)},setTheme:function(e){this.setProperty("theme",e,!0),this.oEditor&&this.oEditor.setTheme(e)},setMode:function(e){this.setProperty("mode",e,!0)},clearAnnotations:function(){this.getSession()&&(this.getSession().clearAnnotations(),this.clearInlineAnnotations())},hasAnnotations:function(){return this.getAnnotations()&&this.getAnnotations().length>0},getSessionMarkers:function(){var e=this.getSession();return e?(e._aMarkerId||(e._aMarkerId=[]),e._aMarkerId):[]},formatAnnotations:function(e){if(e&&e.length>0)for(var t=0;t'+n.text.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/",n.text=void 0)}},clearInlineAnnotations:function(){for(;this.getSessionMarkers()&&this.getSessionMarkers().length>0;){var e=this.getSessionMarkers().pop();this.removeMarker(e[0])}},setInlineAnnotations:function(e){var t=[],n=[];if(e&&e.length>0)for(var r=0;r=0&&n.className.indexOf("errorType")>=0){for(var r=n.className.split(" "),i=-1,o="",a=0;a=0){var s=r[a].split("_");if(s.length>1){i=parseInt(s[1]);break}}if(i>-1)for(var a=0;a=0&&n.className.indexOf("errorId")>=0&&e._oToolTip&&e._oToolTip.hide()}),e._oToolTip&&e._oToolTip.hide(),e._errorTooltipTimer=null})},showInlineErrorToolTip:function(e,t){if(this._oToolTip||(this._oToolTip=this.getToolTip()),this._oToolTip){this._oToolTip.setHtml(t),this._oToolTip.show();var n=e.getBoundingClientRect(),e=this._oToolTip.getElement(),r=e.style,i=n.right,o=n.bottom,a=e.offsetWidth,s=e.offsetHeight,u=jQuery(this.oEditor.container).offset(),c=u.left+this.oEditor.container.offsetWidth,l=u.top+this.oEditor.container.offsetHeight;i+a>c&&(i=c-a),o+s>l&&(o=n.top-s),r.left=i+"px",r.top=o+"px"}},getToolTip:function(){var e=ace.require("ace/tooltip").Tooltip;return new e(this.oEditor.container)},getTextRange:function(e,t,n,r){var i=this.getRange(e,t,n,r);return this.getSession()&&this.getSession().getDocument().getTextRange(i)},getRange:function(e,t,n,r){var i=ace.require("ace/range").Range;return new i(e,t,n,r)},setCursorPosition:function(e){this._cursorPosition=e},setDocument:function(e){this._oDocument=e},open:function(e,t){return this._oDocument=e,this._isDocumentOpening=!0,e.getContent().then(function(n){var r=!1;n instanceof Blob&&(n="Binary Data...",r=!0),this.setReadOnly(e.isReadOnly()||r),this.setMode(t);var i=e.getEntity().getFullPath();this._sTargetFile=i,this._setActiveSession(i,n),this.oEditor&&(this.setReadOnly(this.getReadOnly()),this.oEditor.setSession(this._mSessions[this._sTargetFile]),this.setFocus()),this._isDocumentOpening=!1}.bind(this))},_setActiveSession:function(e,t){var n=this._mSessions[e];if(!n){n=ace.createEditSession("",this.getMode()),this._setUseWorker(n);var r=this;n.on("change",function(e){if(!r._isDocumentOpening){var t=e.action;!t||t.indexOf("insert")==-1&&t.indexOf("remove")==-1||setTimeout(function(){r.fireLiveChange()},0)}});var i=function(){r.fireEditorScroll()};n.on("changeScrollTop",i),n.on("changeScrollLeft",i),this._mSessions[e]=n}n.getValue()!==t&&(n.setValue(t),n.getValue()!==t&&r.fireContentFormatted({document:r._oDocument,value:n.getValue()})),n.setUseSoftTabs(this.getUseSoftTabs()),n.setFoldStyle(this.getCodeFolding()),n.setNewLineMode(this.getNewLineMode())},_setUseWorker:function(e){var t=this._sTargetFile.match(/\.js$|\.xsjs$|\.xsjslib$|\.json$|\.xml$/);t&&e.setUseWorker(!1)},close:function(e){var t=e.getEntity().getFullPath();this._mSessions[t]&&(this.fireBeforeClosing(),this._mSessions[t].destroy(),delete this._mSessions[t],this._sTargetFile="")},onBeforeRendering:function(){this.oEditor=null},onAfterRendering:function(){this._createEditor(),this._sTargetFile&&this.oEditor.setSession(this._mSessions[this._sTargetFile]),this.setReadOnly(this.getReadOnly()),setTimeout(function(){this.setFocus()}.bind(this))},_adjustCommandKeys:function(){var e=this.oEditor.commands.commands.foldOther,t=this.oEditor.commands.commands.foldall,n=this.oEditor.commands.commands.unfoldall,r=this.oEditor.commands.commands.copylinesup,i=this.oEditor.commands.commands.copylinesdown,o=this.oEditor.commands.commands.togglecomment,a=this.oEditor.commands.commands.toggleBlockComment,s=this.oEditor.commands.commands.tolowercase,u=this.oEditor.commands.commands.touppercase,c=this.oEditor.commands.commands.paste;e.bindKey={win:"Alt-F2",mac:"Command-Option-F2"},t.bindKey={win:"Ctrl-Alt-F2",mac:"Command-Alt-F2"},n.bindKey={win:"Alt-Shift-F2",mac:"Alt-Shift-F2"},r.bindKey={win:"Alt-Shift-Up",mac:"Alt-Shift-Up"},i.bindKey={win:"Alt-Shift-Down",mac:"Alt-Shift-Down"},o.bindKey={win:"Ctrl-/|Alt-7",mac:"Command-/|Alt-H"},a.bindKey={win:"Ctrl-Shift-/|Ctrl-Shift-7",mac:"Command-Shift-/|Command-Shift-7"},s.exec=function(e){return!e.selection.isEmpty()&&void e.toLowerCase()},u.exec=function(e){return!e.selection.isEmpty()&&void e.toUpperCase()},c.exec=function(e,t){e.isFocused()&&e.$handlePaste(t)},this.oEditor.commands.removeCommand("gotoline"),this.oEditor.commands.removeCommand("foldOther"),this.oEditor.commands.removeCommand("foldall"),this.oEditor.commands.removeCommand("unfoldall"),this.oEditor.commands.removeCommand("copylinesup"),this.oEditor.commands.removeCommand("copylinesdown"),this.oEditor.commands.removeCommand("togglecomment"),this.oEditor.commands.removeCommand("toggleBlockComment"),this.oEditor.commands.removeCommand("tolowercase"),this.oEditor.commands.removeCommand("touppercase"),this.oEditor.commands.removeCommand("paste"),this.oEditor.commands.addCommand(e),this.oEditor.commands.addCommand(t),this.oEditor.commands.addCommand(n),this.oEditor.commands.addCommand(r),this.oEditor.commands.addCommand(i),this.oEditor.commands.addCommand(o),this.oEditor.commands.addCommand(a),this.oEditor.commands.addCommand(s),this.oEditor.commands.addCommand(u),this.oEditor.commands.addCommand(c)},_createEditor:function(){this.oEditor=ace.edit(this.getId()),this.setTheme(this.getTheme()),this.setFontFamily(this.getFontFamily()),this.setFontSize(this.getFontSize()),this.setDrawFullLineMarker(this.getDrawFullLineMarker()),this.setHighlightSelectedWord(this.getHighlightSelectedWord()),this.setShowInvisibles(this.getShowInvisibles()),this.setBehavioursEnabled(this.getBehavioursEnabled()),this.setShowPrintMargin(this.getShowPrintMargin()),this.oEditor.$blockScrolling=1/0;var e=this;this.oEditor.on("changeSession",function(){e.fireChangeSession({control:e})}),this.oEditor.renderer.on("afterRender",function(){e.bindInlineToolTipEvents(),e.fireRenderDone({control:e})}),this.oEditor.on("guttermousedown",function(t){e.setFocus(),setTimeout(function(){e.fireEditorGutterMousedown({mouseEvent:t})})}),this._adjustCommandKeys()},reload:function(e){this.getSession()&&(this.getSession().setValue(e),this.oEditor.renderer.updateFull(!0))},renderer:function(e,t){e.write(""),t.getValue()&&e.writeEscaped(t.getValue()),e.write("")},addEventListener:function(e,t){var n=this.getSession();n&&("changeCursor"==e?n=n.selection:"gutterclick"==e&&(n=this.oEditor),n.addEventListener(e,t))},removeEventListener:function(e,t){var n=this.getSession();n&&("changeCursor"==e?n=n.selection:"gutterclick"==e&&(n=this.oEditor),n.removeEventListener(e,t))},getMarkers:function(e){return this.getSession()?this.getSession().getMarkers(e):null},removeMarker:function(e){this.getSession()&&this.getSession().removeMarker(e)},indexToPosition:function(e,t){return this.getSession()&&this.getSession().doc?this.getSession().doc.indexToPosition(e,t):null},positionToIndex:function(e,t){return this.getSession()&&this.getSession().doc?(null!==e&&void 0!==e||(e=this.oEditor.selection.getCursor()),this.getSession().doc.positionToIndex(e,t)):null},getLine:function(e){return this.getSession()&&this.getSession().getDocument()?this.getSession().getDocument().getLine(e):null},getAllLines:function(){return this.getSession()&&this.getSession().getDocument()?this.getSession().getDocument().getAllLines():null},addMarker:function(e,t,n,r){return this.getSession()?this.getSession().addMarker(e,t,n,r):null},setModuleUrl:function(e,t){ace.config.setModuleUrl(e,t)},gotoLine:function(e,t,n){this.oEditor&&(this.oEditor.renderer.updateFull(!0),this.oEditor.gotoLine(e,t,n))},replace:function(e,t){this.getSession()&&this.getSession().replace(e,t)},getSelectionRange:function(){return this.oEditor?this.oEditor.getSelectionRange():null},setSelectionRange:function(e,t){if(this.oEditor){var n=this.getRange(e.row,e.column,e.row,e.column+t),r=this.getSelection();r&&n&&(this.gotoLine(e.row),r.setSelectionRange(n))}return null},getSelection:function(){return this.oEditor?this.oEditor.getSelection():null},clearSelection:function(){this.oEditor&&this.oEditor.clearSelection()},getCursorPosition:function(){return this.oEditor?this.oEditor.getCursorPosition():null},moveCursorTo:function(e,t){this.oEditor&&this.oEditor.moveCursorTo(e,t)},setFocus:function(){this.oEditor&&this.oEditor.focus()},getFocusElement:function(){return this.oEditor?this.oEditor.textInput.getElement():this},navigateTo:function(e,t){this.oEditor&&this.oEditor.navigateTo(e,t)},getContainer:function(){return this.oEditor?this.oEditor.container:null},getFileURI:function(){return this.getId()},getAnnotations:function(){return this.getSession()?this.getSession().getAnnotations():null},setBreakpoint:function(e,t){this.getSession()&&this.getSession().setBreakpoint(e,t)},clearBreakpoint:function(e){this.getSession()&&this.getSession().clearBreakpoint(e)},removeGutterDecoration:function(e,t){this.getSession()&&this.getSession().removeGutterDecoration(e,t)},addGutterDecoration:function(e,t){this.getSession()&&this.getSession().addGutterDecoration(e,t)},replaceAll:function(e,t){return this.oEditor?this.oEditor.replaceAll(e,t):null},find:function(e,t,n){this.oEditor&&this.oEditor.find(e,t,n)},getTabSize:function(){return this.getSession()?this.getSession().getTabSize():null},moveCursorToPosition:function(e){this.selection&&this.selection.moveCursorToPosition(e)},setCurrentFilePath:function(e){this._sTargetFile=e},getCurrentFilePath:function(){return this._sTargetFile},getNativeEditor:function(){return this.oEditor},deleteCurrentSelection:function(){this.getSession()&&this.getSession().remove(this.oEditor.getSelectionRange())},isVisible:function(){return Object.keys(this._mSessions).length>0},toggleComment:function(){this.oEditor&&this.oEditor.toggleCommentLines()},toggleBlockComment:function(){this.oEditor&&this.oEditor.toggleBlockComment()},toggleShowInvisibles:function(){this.setShowInvisibles(!this.oEditor.getShowInvisibles())},expandAll:function(){this.oEditor&&this.oEditor.session.unfold()},collapseAll:function(){this.oEditor&&this.oEditor.session.foldAll()},setDocValue:function(e){this.getSession()&&this.getSession().getDocument()&&this.getSession().getDocument().setValue(e)},executeCommand:function(e){this.oEditor&&this.oEditor.commands.commands[e]&&this.oEditor.commands.commands[e].exec(this.oEditor)},showGutter:function(e){this.oEditor&&this.oEditor.renderer&&this.oEditor.renderer.setShowGutter(e)}}),define("sap.watt.ideplatform.aceeditor/control/Editor",function(){}),define("sap.watt.ideplatform.aceeditor/service/FontUtil",[],function(){"use strict";function e(e){r.style.fontFamily=e,document.body.appendChild(r);var t=r.clientWidth;return document.body.removeChild(r),t}function t(){r||(r=document.createElement("div"),r.innerHTML=""+Array(100).join("wi")+"",r=r.firstChild,i=e("monospace"),o=e("serif"),a=e("sans-serif"))}function n(e){return u.filter(function(t){return e.isFontAvailable(t)})}var r,i,o,a,s,u=["Andale Mono","Arial Monospaced","Arial Monospaced for SAP","Bitstream Vera","Consolas","Courier","Courier New","DejaVu Sans Mono","Droid Sans Mono","Everson Mono","Everson Mono Unicode","Fixed","Fixedsys","Fixedsys Excelsior","HyperFont","Inconsolata","Letter Gothic","Liberation Mono","Lucida Console","Lucida Sans Typewriter","Lucida Typewriter","Menlo","Monaco","MS Mincho","Nimbus Mono L","PragmataPro","Prestige","Prestige Elite","ProFont","Proggy programming fonts","SF Mono","Source Code Pro","Terminal","Ubuntu Mono","Vera Sans Mono"].sort(),c=["width:auto","font-size:128px","position:absolute","left:-99999px"];return{getAvailableMonospaceFonts:function(){return s?s:s=n(this)},isFontAvailable:function(n){return t(),i!==e(n+",monospace")||o!==e(n+",serif")||a!==e(n+",sans-serif")},_getWellKnownMonospaceFonts:function(){return u}}}),define("sap.watt.ideplatform.aceeditor/service/EditorImpl",["./EditorMode","./EditorContextMenu","./EditorGutterContextMenu","../control/Editor","sap/watt/platform/plugin/platform/service/ui/AbstractEditor","./FontUtil","sap/watt/lib/lodash/lodash"],function(e,t,n,r,i,o,a){"use strict";var s=i.extend("sap.watt.common.plugin.aceeditor.service.AceEditor",{});return jQuery.extend(s.prototype,{_oEditor:null,_oDocument:null,_oUserSettings:null,_mEditorModes:null,_mEditorContextMenus:null,_mEditorGutterContextMenus:null,_oSettingsModel:null,init:function(){this._aStyles=[],this._aStyles.push({uri:"sap.watt.ideplatform.aceeditor/css/aceeditor.css"}),this._mEditorModes={},this.context.service.aceeditor.config.attachEvent("preferencesSaved",this.onPreferencesSaved,this);var e=this;return this._initUserSettings().then(function(){return e.context.event.fireInit()})},configure:function(e){e.modes&&this._createEditorModes(e.modes),e.modeExtension&&this._updateEditorModeWithExtension(e.modeExtension),e.editorContextMenu&&this._createEditorContextMenu(e.editorContextMenu),e.editorGutterContextMenu&&this._createEditorGutterContextMenu(e.editorGutterContextMenu),e.styles&&(this._aStyles=this._aStyles.concat(e.styles)),this._todoTag=e.todoTag},_onEditorNativeContextMenu:function(e){var t=e.mParameters.mouseEvent.clientX,n=e.mParameters.mouseEvent.clientY,r=this._oDocument.getEntity().getFileExtension(),i=this._getMenuGroup(r);this.context.service.commandGroup.getGroup(i).then(function(e){return this.context.service.contextMenu.open(e,t,n)}.bind(this)).done()},_onEditorGutterMousedown:function(e){var t=this;if(2===e.mParameters.mouseEvent.getButton()){var n=e.mParameters.mouseEvent.domEvent.clientX,r=e.mParameters.mouseEvent.domEvent.clientY,i=this._oDocument.getEntity().getFileExtension(),o=this._getGutterMenuGroup(i);this.context.service.commandGroup.getGroup(o).then(function(e){return t.context.service.contextMenu.open(e,n,r)}).done()}},_getMenuGroup:function(e){try{return this._mEditorContextMenus[e].menuGroup}catch(e){return"commonContextMenu"}},_getGutterMenuGroup:function(e){try{return this._mEditorGutterContextMenus[e].menuGroup}catch(e){return}},onPreferencesSaved:function(e){this._oSettingsModel.setData(e.params.settings)},_createEditorModes:function(t){for(var n=0;n1&&i.start+o>r.column&&i.value[0]===i.value[o-1]&&("'"===i.value[0]||'"'===i.value[0]))return t.prefix=i.value.substring(1,r.column-i.start),i.value.substring(1,o-1)}},_checkComment:function(e){var t=e.getSession(),n=e.getCursorPosition(),r=t.getTokenAt(n.row,n.column);return!!(r&&r.type.indexOf("comment")>=0)},addString:function(e,t,n){if(t||(t=this._getEditor().oEditor),n){var r=t.getCursorPosition().row,i=t.getSession().getLine(r),o=t.getSession().getMode().$getIndent(i);e=e.replace(/\n/g,"\n"+o)}t.getSession().insert(t.getCursorPosition(),e)},getCurrentSelection:function(e){return e||(e=this._getEditor().oEditor),e.getSelection().isEmpty()?"":e.getCopyText()},cutCurrentSelection:function(e){e||(e=this._getEditor().oEditor);var t=e.getSelection().isEmpty()?"":e.getCopyText();return e.remove(e.getSelectionRange()),t},deleteCurrentSelection:function(){this._getEditor().deleteCurrentSelection()},getSelectionRanges:function(e){e||(e=this._getEditor().oEditor);var t=null;return e.getSelection().isEmpty()||(t=e.getSelection().toJSON(),t instanceof Array||(t=[t])),t},setSelectionRange:function(e,t){var n=this._getEditor();n&&n.setSelectionRange(e,t)},setHighlight:function(e,t,n){var r;if(e&&e.length>0){this._getEditor().oEditor.getSelection().fromJSON(e),t||(t="ace_highlight-marker"),n||(n="background");var i,o,a,s;if(this._getEditor().oEditor.getSelection().rangeCount>0){r=this._getEditor().oEditor.getSelection().ranges;var u=Math.min(r.length,e.length);for(i=0;i0?n.insert(o.start,i.newText):0===i.newText.length?n.remove(o):i.newText.length>0&&n.replace(o,i.newText)}t&&this._getEditor().gotoLine(t.line,t.character,!0)},getReadOnly:function(){var e=this._getEditor();return!!e&&e.getReadOnly()}}),s}),define("sap.watt.ideplatform.aceeditor/service/GoToLine",[],function(){"use strict";return{_oGoToLineDialog:null,_oDeferred:null,_onSapEnterDelegate:null,init:function(){this._onSapEnterDelegate={onsapenter:this.onEnterPress}},configure:function(e){e&&e.styles&&this.context.service.resource.includeStyles(e.styles).done()},onOk:function(){var e=this._oGoToLineDialog.getModel();this._oGoToLineDialog.close(),this._oDeferred.resolve(e.getProperty("/gotoline"))},onCancel:function(){this._oGoToLineDialog.close()},onAfterClose:function(){this._oDeferred.resolve(),this._oGoToLineDialog.removeEventDelegate(this._onSapEnterDelegate,this),this._oGoToLineDialog.destroy()},onLineLiveChange:function(e){var t=this._oGoToLineDialog.getModel(),n=e.getParameter("newValue");t.setProperty("/okEnabled",this._isValidLineNumber(n))},onEnterPress:function(){var e=this._oGoToLineDialog.getModel(),t=e.getProperty("/okEnabled");t&&this.onOk()},openGoToLine:function(){this._oDeferred=Q.defer();var e=sap.ui.xmlfragment("sap.watt.ideplatform.plugin.aceeditor.fragment.GoToLine",this);this._oGoToLineDialog=sap.ui.getCore().byId(e.getId()),this.context.i18n.applyTo(this._oGoToLineDialog);var t=new sap.ui.model.json.JSONModel;return this._oGoToLineDialog.addEventDelegate(this._onSapEnterDelegate,this),t.setData({okEnabled:!1}),this._oGoToLineDialog.setModel(t),this._oGoToLineDialog.open(),this._oDeferred.promise},_isValidLineNumber:function(e){return/^\d+$/.test(e)}}}),define("sap.watt.ideplatform.aceeditor/service/EditorConfig",["sap/watt/platform/plugin/platform/service/ui/AbstractConfig","sap/watt/lib/lodash/lodash","./FontUtil","../control/Editor"],function(e,t,n){"use strict";return e.extend("sap.watt.common.plugin.aceeditor.service.EditorConfig",{_oUIModel:null,_oSettings:null,_sDemoScript:"/**\n* This is a sample sum function \n*/\ngetSum: function(a, b) {\n var i;\n i = a + b;\n return i;\n}",_oContent:null,_aThemes:[{text:"theme_cumulus",key:"ace/theme/sap-cumulus"},{text:"theme_flower",key:"ace/theme/sap-flowerpower"},{text:"theme_github",key:"ace/theme/github"},{text:"theme_tomorrow",key:"ace/theme/tomorrow"},{text:"theme_tomorrow_night",key:"ace/theme/tomorrow_night"},{text:"theme_tomorrow_night_blue",key:"ace/theme/tomorrow_night_blue"},{text:"theme_tomorrow_night_bright",key:"ace/theme/tomorrow_night_bright"},{text:"theme_tomorrow_night_80s",key:"ace/theme/tomorrow_night_eighties"},{text:"theme_basement",key:"ace/theme/sap-basement"},{text:"theme_morlock",key:"ace/theme/sap-morlock"}],init:function(){this._oUIModel=new sap.ui.model.json.JSONModel},configure:function(e){this._oPreferenceModel=new this.PreferenceModel(e.preferenceService),this._aStyles=e.styles},getUserSetting:function(){if(this._oSettings)return Q(t.clone(this._oSettings));var e=this;return this._oPreferenceModel.beginSession().then(function(r){var i=e._mergeSettings(e._getDefaultSettings(),r);return e._findThemeIndex(e._aThemes,i.theme)||(i.theme=e._aThemes[0].key),e._oSettings=i,e._oSettings.fontFamily&&!n.isFontAvailable(e._oSettings.fontFamily)&&(e._oSettings.fontFamily=""),t.clone(e._oSettings)})},_findThemeIndex:function(e,t){for(var n=0;n0&&(u=t+u),u=p+u,a=e.substring(0,l),$.inArray(u,n)>-1&&r.push(u)}return r},getDefaultEditor:function(e){var t,n=this;if(e){var r=e.getEntity().getFileExtension();return r=r.toLowerCase(),t=n._defFileExtensionEditor[r]?Q(n._defFileExtensionEditor[r]):this._getDefaultContentTypeEditorForDocument(e).then(function(e){return e?e:n._defEditor}),t.then(function(e){if(e)return n._isEditorAvailable(e).then(function(t){return t?e:n._defEditor})})}return n._defEditor},_isEditorAvailable:function(e){return e.service.isAvailable().fail(function(t){var n="Error checking availability for editor "+e.service.getProxyMetadata().getName()+": "+t;return this.context.service.log.error("Editor",n,["user"]).done(),!1}.bind(this))},_filterAvailableEditors:function(t){var n=this;return Q.all(t.map(function(e){return n._isEditorAvailable(e).then(function(t){return t?e:null})})).then(function(t){return e.compact(t)})}}}),define("sap.watt.ideplatform.editor/service/ContentTypeUi",["sap/watt/platform/plugin/platform/service/ui/AbstractConfig"],function(e){"use strict";return e.extend("sap.watt.ideplatform.editor.service.ContentTypeUi",{init:function(){var e=this;return this._sPreferencesNode=this.context.self.getProxyMetadata().getName(),this.context.service.preferences.get(this._sPreferencesNode).then(function(t){e._oPreferences=t})},_createView:function(){this._oView=sap.ui.view({viewName:"sap.watt.ideplatform.editor.view.contentTypeUi",type:sap.ui.core.mvc.ViewType.XML,viewData:{context:this.context}}),this.context.i18n.applyTo(this._oView)},getEditorForContentType:function(e){if(this._oPreferences)return this._oPreferences[e]},_getUserContentTypeSettings:function(e){var t,n=this,r={},i=[];return _.forEach(e,function(e){t=n.context.service.editor.getDefaultEditorForContentType(e.getId()).then(function(t){t&&(r[e.getId()]={sSelectedEditor:t.id})}),i.push(t)}),Q.spread(i,function(){return r})},getUserPreferenceContent:function(){var e=this;return this._oView||this._createView(),this._createContentTypeList().then(function(){return e._oView})},_createContentTypeList:function(){var e,t,n=this,r=[];return r.push(this.context.service.editor.getConfiguredEditors()),r.push(n.context.service.contenttypemanager.getAllContentTypes()),Q.all(r).spread(function(r,i){return t=i,e=r,n._getUserContentTypeSettings(i).then(function(r){n._oView.getController().createContentTypeList(t,e,r)})})},saveUserPreference:function(){var e=this._oView.getModel().getProperty("/contentTypes"),t={};_.forEach(e,function(e){t[e.id]=e.sSelectedEditor}),this._oPreferences=t,this.context.service.preferences.set(t,this._sPreferencesNode).done()}})}),define("sap.watt.ideplatform.outlinepane/service/OutlinePane",["sap/watt/platform/plugin/platform/service/ui/AbstractPart","sap/watt/ui/control/sidepane/SidePane"],function(e){"use strict";var t=e.extend("sap.watt.ideplatform.outlinepane.service.OutlinePane",{_oEditor:null,_oOutlineService:null,_mOutlines:[],_mOutlinesNames:[],init:function(){},configure:function(e){var t=this;this._mOutlines=e.outlines,jQuery.each(this._mOutlines,function(e,n){var r=n.service;t._mOutlinesNames.push(r._sName),r.attachEvent("visibilityChanged",t._onVisibilityChanged,t)}),t.context.service.log.debug("Outline","Available outline services "+JSON.stringify(this._mOutlinesNames),["user"]).done()},_getView:function(){return this._oView||(this._oView=sap.ui.view({viewName:"sap.watt.ideplatform.outlinepane.view.OutlinePane",type:sap.ui.core.mvc.ViewType.XML}),this.context.i18n.applyTo(this._oView),this._getController().init(this.context)),this._oView},_getController:function(){return this._oController||(this._oController=this._getView().getController()),this._oController},getContent:function(){var t=this;return e.prototype.getContent.apply(this,arguments).then(function(){return t._getView()}).fail(function(e){throw t.context.service.log.error("Outline","Failed to get outline view "+e.message,["user"]).done(),e})},_onVisibilityChanged:function(e){var t=this,n=e.source.context.self;if(t.context.service.log.debug("Outline","Visibility changed to "+e.params.visible,["user"]).done(),e.params.visible)return n.getContent().then(function(e){ try{return t._getController().placeOutlineView(e)}catch(e){throw t.context.service.log.error("Outline","Failed to place outline view "+e.message,["user"]).done(),e}});if(this._oOutlineService===n){this._oEditor&&(this._oEditor.detachEvent("closed",t._onEditorClose,t),this._oEditor=null,this._oDoc=null),this._oOutlineService=null;try{return this._getController().removeOutlineView()}catch(e){throw t.context.service.log.error("Outline","Failed to place outline view "+e.message,["user"]).done(),e}}},_getSelectedDocument:function(e){var t=null;return $(e).map(function(e,n){if(n&&n.document)return t=n.document,!1}),t},onSelectionChanged:function(e){this.context.service.log.debug("Outline","Selected document chanegd",["user"]).done();var t=this,n=e.params.owner,r=this._getSelectedDocument(e.params.selection),i=[];return t._oEditor===n&&t._oDoc===r?Q():n.instanceOf("sap.watt.common.service.editor.Editor")?n.getState().then(function(o){if(o)return t._oOutlineService?t._oOutlineService.setVisible(!1):Q();var a=t._oOutlineService;return jQuery.each(t._mOutlines,function(o,s){var u=!1;if(s.fileExtension&&r.getEntity().getFileExtension()===s.fileExtension?u=!0:!s.fileExtension&&n.instanceOf(s.editor)&&(u=!0),u){var c=s.service;i.push(c.canHandle(e).then(function(e){return e?(t._oEditor&&t._oEditor.detachEvent("closed",t._onEditorClose,t),t._oEditor=n,t._oDoc=r,n.attachEvent("closed",t._onEditorClose,t),a=c,c.setVisible(!0)):t._oOutlineService?t._oOutlineService.setVisible(!1):void 0}))}else t._oOutlineService&&s.service===t._oOutlineService&&i.push(s.service.setVisible(!1))}),Q.all(i).then(function(){if(a)return t._oOutlineService=a,t._oOutlineService.onSelectionChanged(e)})}).fail(function(e){throw t.context.service.log.error("Outline","Failed to react on document selection change "+e.message,["user"]).done(),e}):Q()},_onEditorClose:function(e){var t=this;return this.context.service.content.getCurrentEditor().then(function(e){if(e!==t._oEditor)return t._oOutlineService.setVisible(!1)})}});return t}),define("sap.watt.ideplatform.indexmanager/command/JsModuleReferences",[],function(){"use strict";return{execute:function(){var e=this.context.service;return e.usagemonitoring.startPerf("editor","where_used").done(),e.selection.getSelection().then(function(t){var n=t[0].document.getEntity().getFullPath(),r={targetFile:n,providerType:"modulefindreferences",token:{value:n.substr(n.lastIndexOf("/")+1),type:"module"}};return t[0].document.getProject().then(function(t){e.usagemonitoring.report("where_used","file",t.getName()).done()}).done(),e.filesearch.triggerFindReferences(r)})},_isSupported:function(){return this.context.service.selection.getSelection().then(function(e){if(0===e.length)return!1;var t=e[0].document.getEntity().getFileExtension().toLowerCase();return"js"===t})},isAvailable:function(){return this._isSupported()},isEnabled:function(){return!0}}}),define("sap.watt.ideplatform.indexmanager/service/util/remoteDocUtil",[],function(){"use strict";function e(e){if(!e){var t=this.i18n.getText("i18n","log_emptypath");return Q.reject(new Error(t))}return this.docProvider.getDocument(e).then(function(e){if(e)return e.getContent().then(function(e){return e})}).fail(function(e){return Q.reject(e)})}function t(e,t){if(!e){var n=this.i18n.getText("i18n","log_emptypath");return Q.reject(new Error(n))}var r=this.docProvider,o=this.i18n;return i(e,r,o).then(function(){return r.getDocument(e).then(function(n){if(n)return n.setContent(t).then(function(){return n.save()});var r=o.getText("i18n","log_failtoopen",[e]);return Q.reject(new Error(r))})}).fail(function(e){return Q.reject(e)})}function n(e){if(!e){var t=this.i18n.getText("i18n","log_emptypath");return Q.reject(new Error(t))}var n=this.i18n;return this.docProvider.getDocument(e).then(function(t){if(t)return t.delete();var r=n.getText("i18n","log_failtoopen",[e]);return Q.reject(new Error(r))}).fail(function(e){return Q.reject(e)})}function r(e){if(!e){var t=this.i18n.getText("i18n","log_emptypath");return Q.reject(new Error(t))}return this.docProvider.getDocument(e).then(function(e){if(e)return e.getEntity().oMetadata}).fail(function(e){return Q.reject(e)})}function i(e,t,n){return t.getDocument(e).then(function(r){if(r)return Q();var i=e.lastIndexOf("/");if(i<0){var a=n.getText("i18n","log_invalidpath",[e]);return Q.reject(new Error(a))}var s=e.substring(0,i),u=e.substring(i+1);return o(s,t,n).then(function(e){if(e)return e.createFile(u);var t=n.getText("i18n","log_failtocreateopen",[s]);return Q.reject(new Error(t))})})}function o(e,t,n){return t.getDocument(e).then(function(r){if(r)return Q(r);var i=a(e);if(i){var s=e.substring(i.length+1);return o(i,t,n).then(function(e){return e.createFolder(s)})}var u=n.getText("i18n","log_failtocreatenoroot",[e]);return Q.reject(new Error(u))}).fail(function(n){return t.getDocument(e)})}function a(e){if(e&&e.trim()){e=e.trim(),"/"==e[e.length-1]&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");if(!(t<0))return e.substring(0,t)}}function s(e,t){if(!e||!t)throw new Error;this.docProvider=e,this.i18n=t}return s.prototype={loadDocument:e,saveDocument:t,deleteDocument:n,getDocumentMetadata:r},{RemoteDocUtil:s}}),define("sap.watt.ideplatform.indexmanager/service/util/indexUtil",["./remoteDocUtil","sap/watt/lib/orion/javascript/esprima/esprimaVisitor","sap/watt/lib/orion/javascript/esprima/esprimaJsContentAssist","sap/watt/lib/lodash/lodash"],function(e,t,n,r){"use strict";function i(e){return e&&e.toLowerCase()===E}function o(e,n,i,o){var a,s=[],u=[],c=this,l=Q();return i||(l=this.remoteDocUtil.loadDocument(e).then(function(e){i=t.parse(e)})),l.then(function(){return c._aConfigDependencies.forEach(function(t){s.push(c._searchDependenciesByType(t.identifier,e,i,n,o).then(function(e){for(var n=0;n0){var s=[];return a[0].value&&s.push(a[0]),s&&s.length>0&&s.forEach(function(e){t.declare.push(e.value)}),!1}}}}return!0}function l(e,t){if(!e||!e.getFullPath()){var n=this.i18n.getText("i18n","log_emptypath");return Q.reject(new Error(n))}var r=this.remoteDocUtil,i=t,o=/".+"/i,a=e.getFullPath();return r.loadDocument(a).then(function(e){e=e||"";var t=i.exec(e);if(t&&t[0]){var n=o.exec(t[0]);if(n&&n[0]){var r={id:n[0].substring(1,n[0].length-1),path:a};return Q(r)}return Q.reject()}return Q.reject()}).fail(function(t){return a=e.getFullPath(),console.log("Document "+a+" out of scope "+t),Q({id:"Unknown "+a,path:a})})}function p(e){function t(e){var t=/jQuery\.sap\.declare\(".+"\);/i,n=/".+"/i;return e.getContent().then(function(e){var r=t.exec(e);if(r&&r[0]){var i=n.exec(r[0]);return i&&i[0]?i[0].substring(1,i[0].length-1):Q.reject()}return Q.reject()}).fail()}var n=Q.defer(),r={bContentSearch:!0,nStart:0,nRows:999,sFileType:"*.js",sFolderName:e+"/",sSearchTerm:"jQuery.sap.declare"},i=[],o=[],a={};return this._docProvider.search(r).then(function(e){return e.aFileEntries.forEach(function(e){i.push(e),o.push(t(e))}),Q.allSettled(o).then(function(e){for(var t=0;t=2&&"Literal"===r[0].type&&r[0].value.indexOf(".Component")===r[0].value.length-".Component".length){var i=r[0].value;return t.namespace=i.substr(0,i.lastIndexOf(".")),!1}}return!0}function v(e){if(!e)return Q();if(!this._projectInfo[e]){var n={nRows:1,nStart:0,sFileType:"*.js",sFolderName:e+"/",sSearchTerm:"Component"};this._projectInfo[e]=this.remoteDocUtil.docProvider.search(n).then(function(e){if(e&&e.numFound>0){var n=e.aFileEntries[0];return n.getContent().then(function(e){try{var r=t.parse(e),i={namespace:""};if(t.visit(r,i,g),!i.namespace)return null;var o=i.namespace.replace(/\./g,"/"),a=n.getEntity().getFullPath(),s=a.slice(0,a.lastIndexOf("/"));return{namespace:o,rootPath:s}}catch(e){return null}})}}).fail(function(){return Q()})}return this._projectInfo[e]}function y(e,t,n){if(!n)return Q();if("."===n.charAt(0)){var r=new URI(n);return Q(r.absoluteTo(t).toString()+".js")}return this.getUI5ProjectInfo(e).then(function(e){if(e){var t=e.namespace;return n.slice(0,t.length)===t?e.rootPath+n.slice(e.namespace.length)+".js":n}})}function x(e,n,r){try{var i={id:n,cursorOffset:r,require:[]};return t.visit(e,i,b),i}catch(e){console.warn(e)}}function b(e,t){if("CallExpression"===e.type&&e.callee&&e.arguments){var n=e.callee,r=n.property,i=n.name,o=null;if("define"===i||r&&"define"===r.name)o="define";else{if(!("require"===i||r&&"require"===r.name))return!0;o="require"}for(var a=n;a.object;)o=a.object.property?a.object.property.name+"."+o:a.object.name+"."+o,a=a.object;if(o===t.id){var s=e.arguments;if(s.length>0){var u=[];if("ArrayExpression"===s[0].type&&s[0].elements){if(u=s[0].elements,t.cursorOffset&&t.cursorOffset>s[0].range[0]&&t.cursorOffsetp.range[0]&&t.cursorOffset=p.range[0]&&t.cursorOffset<=p.range[1]){t.insideDependencies=p;break}}t.insideDependencies||(t.insideDependencies={type:"Blank",range:[t.cursorOffset,t.cursorOffset]})}}else for(var f=0;f0&&u.forEach(function(e){t.require.push(e.value)}),t.id.indexOf("require")>=0}}}return!0}function _(e,t){for(var n in e)if(e[n]===t)return!0;return!1}function w(t,n,r,i){if(!t||!n)throw new Error;this._docProvider=t,this._visitDeclare=S,this._getFilePathFromID=m,this._getFilePathFromUI5DefineDependency=y,this._isArrayContains=_,this._mapProjectModules=p,this._searchDependenciesByType=u,this.remoteDocUtil=new e.RemoteDocUtil(t,n),this.i18n=n,this._projectInfo={},this._summaryFromMetaProvider=r,this._aConfigDependencies=i}var E="js",S=function(e){return e.getContent().then(function(n){var r=t.parse(n),i={fullPath:e.getEntity().getFullPath(),id:"jQuery.sap.declare",declare:[]};return t.visit(r,i,c),i})};return w.prototype={isSupported:i,getModule:l,getTimestamp:a,generateIndexJson:s,mapProjectModules:p,searchProjectModules:f,getProjectPath:h,getUI5ProjectInfo:v,searchDependencies:o},{IndexUtil:w}}),define("sap.watt.ideplatform.indexmanager/service/util/DependencyGraphManager",["sap/watt/lib/lodash/lodash"],function(e){"use strict";function t(e,t,n){this._oContext=t,this._indexUtil=n,this._oProjectDocument=e,this._oDependencyGraph={}}var n=1048576,r=80;return t.prototype.buildDependencyGraph=function(e){this._oDependencyGraph={};var t={include:[".*[.]js$"],exclude:[".*/[.].*"]},i=this;return this._oContext.service.projectsearchutil.searchProjectFiles(this._oProjectDocument,t,n).then(function(t){if(t.length>r)return Q([]);for(var n=[],o=0;o0;){var n=e.aMarkerId.pop();e._oEditorControl.removeMarker(n)}if(e._oEditorControl.clearSelection(),t)if(e.escapePosition)e._oEditorControl.moveCursorTo(e.escapePosition.row,e.escapePosition.column);else if(e.aLinkPositions&&e.aLinkPositions.length>0){var r=e.aLinkPositions.pop();e._oEditorControl.moveCursorTo(r.end.row,r.end.column+1)}e.bLinkPosition=!1,e.bLinkGroup=!1,e.aLinkPositions=[],e.aLinkGroups=[],e._oEditorControl.removeEventListener("change",e._onEditorChange)},r=function(){if(e.bLinkPosition){var t=e._oEditorControl.getCursorPosition(),r=e._getLinkPositionIndexByCursor(e.aLinkPositions,t);if(r<0)n(!1);else{if(e.aLinkPositions.length<2)return;r0?r--:r=e.aLinkPositions.length-1}e._setSelection(e.aLinkPositions[r])}else if(e.bLinkGroup){var t=e._oEditorControl.getCursorPosition(),r=e._getLinkGroupIndexByCursor(t);if(r<0)n(!1);else{if(e.aLinkGroups.length<2)return;r>0?r--:r=e.aLinkGroups.length-1}e._setGroupSelection(e.aLinkGroups[r])}},o=function(){return e&&(e.bLinkPosition||e.bLinkGroup)},a=function(t){if(!o())if(void 0!=t.groups&&null!=t.groups&&0!=t.groups.length||void 0!=t.positions&&null!=t.positions&&0!=t.positions.length){if(e.bLinkPosition=!1,e.bLinkGroup=!1,t.escapePosition?e.escapePosition=e._offsetToPos(t.escapePosition):e.escapePosition=null,e._onEditorChange=function(t){if(!e.bIgnoreChange){var r=t.action.indexOf("remove")!==-1,i=t.action.indexOf("insert")!==-1,o={start:t.start,end:t.end},a=-1;e.bLinkPosition?(r?a=e._getLinkPositionIndexByRange(e.aLinkPositions,o,"remove"):i&&(a=e._getLinkPositionIndexByRange(e.aLinkPositions,o,"insert")),a<0?n(!1):r?e._updateLinkMode(a,t,"remove"):i&&e._updateLinkMode(a,t,"insert")):e.bLinkGroup&&(r?a=e._getLinkGroupIndexByRange(o,"remove"):i&&(a=e._getLinkGroupIndexByRange(o,"insert")),a<0?n(!1):r?e._updateLinkMode(a,t,"remove"):i&&e._updateLinkMode(a,t,"insert"))}},e._oEditorControl.addEventListener("change",e._onEditorChange),t.positions&&t.positions.length>0){e.bLinkPosition=!0,e.aLinkPositions=[],e.aMarkerId=[];for(var r=0;r0){e.bLinkGroup=!0,e.aLinkGroups=[],e.aMarkerId=[];for(var r=0;r0;){var r=this.aMarkerId.pop();this._oEditorControl.removeMarker(r)}if(this.bLinkPosition){if("remove"==n){var i=t.end.column-t.start.column;this.aLinkPositions[e].end.column-=i;for(var o=e+1;o=this.aLinkPositions[e].end.column&&(this.escapePosition.column-=i)}else if("insert"==n){var i=t.end.column-t.start.column;this.aLinkPositions[e].end.column+=i;for(var o=e+1;o=this.aLinkPositions[e].start.column&&(this.escapePosition.column+=i)}this.aMarkerId=[],this._setMarker(this.aLinkPositions)}else if(this.bLinkGroup){for(var a=[],o=0;on&&(e[s].start.row==e[n].start.row&&(e[s].start.column+=i-o,e[s].end.column+=i-o),u=this._oEditorControl.getRange(e[s].start.row,e[s].start.column,e[s].end.row,e[s].end.column)),this.bIgnoreChange=!0,a.session.bIgnoreChange=!0,this._oEditorControl.replace(u,r),a.session.bIgnoreChange=!1,this.bIgnoreChange=!1;for(var c=s+1;cthis.aLinkGroups[e][t].start.column&&(this.aLinkGroups[i][o].start.column-=n,this.aLinkGroups[i][o].end.column-=n)}else if("insert"==r){this.aLinkGroups[e][t].end.column+=n;for(var i=0;ithis.aLinkGroups[e][t].start.column&&(this.aLinkGroups[i][o].start.column+=n,this.aLinkGroups[i][o].end.column+=n)}},_getLinkGroupIndexByCursor:function(e){for(var t=0;t=0)return t}return-1},_getLinkPositionIndexByCursor:function(e,t){for(var n=0;n=e[n].start.row&&t.row<=e[n].end.row&&t.column>=e[n].start.column&&t.column<=e[n].end.column)return n;return-1},_getLinkGroupIndexByRange:function(e,t){for(var n=0;n=0)return n}return-1},_getLinkPositionIndexByRange:function(e,t,n){if("insert"==n){for(var r=0;r=e[r].start.column&&t.start.column<=e[r].end.column)return r}else if("remove"==n)for(var r=0;r=e[r].start.row&&t.start.row<=e[r].end.row&&t.end.column>=e[r].start.column&&t.end.column<=e[r].end.column)return r;return-1}},{initLinkMode:t,exitLinkMode:n,nextLinkPos:r,preLinkPos:i,getLinkMode:o,enterLinkMode:a}}),define("sap.watt.ideplatform.intellisence/service/contentassist/HintModeHelper",[],function(){var e,t=function(t){e=new p(t)},n=function(){return e&&e.bHintMode},r=function(t,n,r,i){if(e.bSuffix=i,void 0==t)return void(e.bHintMode&&(e._oHintElement.style.display="none",e.bHintMode=!1,e._replaceBySpace(e._oHintStatus,0)));e.parent.aProposals=t,e.parent.oCoords=n,e.parent.sPrefix=r;for(var o=0;o0){e.parent.selectedIndex||(e.parent.selectedIndex=0);var t=e.parent.aProposals[e.parent.selectedIndex],n="",r=e.parent.sPrefix,i="",o=0;t.proposal&&r&&t.proposal.toLowerCase().indexOf(r.toLowerCase())>=0&&(r=t.proposal.slice(0,t.proposal.toLowerCase().indexOf(r.toLowerCase())+r.length)),void 0==r&&(r="");var a,s=0;for(a=t.proposal;"\n"!=a[s]&&s=r.length||!t.overwrite&&n.length>=0){var u=e._getPosition(e.parent.selectedIndex),c=e.parent._oContainer.offsetWidth-60;c=c>20?c:1e3;var l=t.helpDescription,p=!1;l&&l.length>0&&l.indexOf("Deprecated!")!==-1&&(p=!0),t.overwrite?(i=p?""+n.substring(r.length)+"
":""+n.substring(r.length)+"
",o=n.substring(r.length).length):(i=p?""+n+"
":""+n+"
",o=n.length),e._oHintElement.innerHTML=i,h=jQuery(e._oHintElement).height(),e._oHintElement.style.top=e.parent.oCoords.pageY+"px",e._oHintElement.style.left=e.parent.oCoords.pageX+"px",e._oHintElement.style.display="block";var f=e.parent.aProposals.filter(function(e){return!e.unselectable});e.bHintMode?0==o&&1==e.parent.aProposals.length?(e._oHintElement.style.display="none",e.bHintMode=!1,e._replaceBySpace(e._oHintStatus,0)):f.length>1?e._replaceBySpace(e._oHintStatus,o+1):e._replaceBySpace(e._oHintStatus,o):0==o&&1==e.parent.aProposals.length?(e._oHintElement.style.display="none",e.bHintMode=!1):(e.bHintMode=!0,e._oHintStatus.length=0,f.length>1?e._replaceBySpace(e._oHintStatus,o+1):e._replaceBySpace(e._oHintStatus,o))}else e.bHintMode&&(e._oHintElement.style.display="none",e.bHintMode=!1,e._replaceBySpace(e._oHintStatus,0))}else e.bHintMode&&(e._oHintElement.style.display="none",e.bHintMode=!1,e._replaceBySpace(e._oHintStatus,0))},s=function(t,n){var r=jQuery(e.parent._oContainer).offset();return tr.left+e.parent._oContainer.offsetWidth||n>r.top+e.parent._oContainer.offsetHeight?void this.cancelHint():(e._oHintElement.style.top=n+"px",void(e._oHintElement.style.left=t+"px"))},u=function(){if(e._checkBottomIndex(e.parent.selectedIndex))return!1;var t=e.parent.selectedIndex===e.parent.aProposals.length-1?0:e.parent.selectedIndex+1;return e._lineDown(t)},c=function(){if(e._checkTopIndex(e.parent.selectedIndex))return!1;var t=0===e.parent.selectedIndex?e.parent.aProposals.length-1:e.parent.selectedIndex-1;return e._lineUp(t)},l=function(){var t=e.parent._oEditor;if(t){var n,i;Q.all([e.parent.getCodeCompletion(),t.getContentStatus(!0,!0)]).spread(function(t,r){return t&&r?(i=r,n=t,i.ignoreSnippetProposals=!0,i.ignoreContextProposals=!1,i.isAutoHint=!0,i.caseSensitive=!0,e.parent.oContentStatus=i,n.instanceOf("sap.watt.common.service.editor.PrefixCalculation")?n.getCalculatedPrefix(i).then(function(e){i.prefix=e}):Q()):Q.reject("No Hint Context")}).then(function(){i.bComment&&!e.parent._bHintComment||n.getWordSuggestions(i).then(function(n){return t.getContentStatus(!0,!0).then(function(t){if(t.targetFile===i.targetFile&&t.buffer===i.buffer&&t.offset===i.offset)if(t.prefix=i.prefix,n.isValue&&0===n.proposals.length)""===t.prefix&&e.bHintMode&&r(void 0,void 0,void 0,t.bSuffix);else{if(!e._canShowHint(t,n.proposals))return void r(void 0,void 0,void 0,t.bSuffix);r(n.proposals,t.coords,t.prefix,t.bSuffix)}})}).fail(function(e){console.warn(e)}).done()}).fail(function(e){console.warn(e)}).done()}},p=function(e){this.bHintMode=!1,this.parent=e,this._oContainer=e._oContainer,this._oEditorControl=e._oEditorControl,this._oHintStatus={column:-1,row:-1,length:0},this._initHintDiv()};return p.prototype={_initHintDiv:function(){var e=jQuery(".ace_autocomplete_hint"),t=!1;if(e&&e.length>0)for(var n=0;n0?(a=o.row,s=o.column,u=o.row,c=o.column,l=t):e.length>0&&0==t?(n||r?(a=e.row,s=e.column,u=e.row,c=e.column+e.length):(a=o.row,s=o.column,u=o.row,c=o.column+e.length),l=0):(u=e.column==o.column&&e.row==o.row?o.row:e.row,a=o.row,s=o.column,c=o.column+e.length,l=t),this._oHintStatus.length=t,this._oHintStatus.column=o.column,this._oHintStatus.row=o.row,this._oHintStatus.row!=u&&!r)return this._oHintStatus.column=-1,this._oHintStatus.row=-1,void(this._oHintStatus.length=0);for(var p="",f=0;f=this.parent.aProposals.length?"-100%":(t=this._checkTopIndex(e),n=this._checkBottomIndex(e),t&&n?"-100%":t||n?t?n?"-100%":"0%":"100%":"50%")},_canShowHint:function(e,t){if(0==e.offset)return!1;var n=e.buffer[e.offset-1];if("\n"==n||"\t"==n||" "==n)return!1;if(0==t.length)return!1;if(e.offset="a"&&r<="z"||r>="A"&&r<="Z"||r>="0"&&r<="9"||"_"===r)}return!0},_lineDown:function(e){for(;this.parent.aProposals[e].unselectable&&e0;)e--;return this.parent.selectedIndex=e,a(),!0},_checkTopIndex:function(e){if(e>=0&&e=0&&eintellisence_help_url_description","helpUrl"],formatter:n._linkDescriptionFormatter},linkHref:"{helpUrl}",unselectable:"{unselectable}"})},itemSelected:[n._onItemSelected,n],rightClicked:[n._onRightClicked,n],busyIndicatorDelay:300}),n._oContext.context.i18n.applyTo(n._oAutoCompletePopup),n._oAutoCompletePopupModel=new sap.ui.model.json.JSONModel,n._oAutoCompletePopupModel.setSizeLimit(n._MAX_PROPOSALS),n._oAutoCompletePopup.setModel(n._oAutoCompletePopupModel)})},_linkDescriptionFormatter:function(e,t){return t?e:""},_onRightClicked:function(){var e=this;this._oEditorControl&&setTimeout(function(){e._oEditorControl.setFocus()})},isI18nPopupMode:function(){return this._bIsI18nPopUp},showPopup:function(e,t,n,r,i){this._bIsI18nPopUp=i,this._oAutoCompletePopupModel.setData({proposals:t}),this._oAutoCompletePopup.setBusy(!!r),this._oAutoCompletePopup.open(n),e&&(this._oEditorControl=e)},updatePosition:function(e){this._oAutoCompletePopup.open(e)},isOpen:function(){return this._oAutoCompletePopup.isOpen()},closePopup:function(){this._oAutoCompletePopup.close()},_onItemSelected:function(e){var t=e.getParameter("index");this._fnProposalSelected.call(this._oContext,t),this._oEditorControl.setFocus()}}}),define("sap.watt.ideplatform.intellisence/service/contentassist/TermModeHelper",[],function(){var e,t,n,r,i,o,a=!1,s=function(t){a=!1,e=t._oEditorControl},u=function(){return a},c=function(s){s.prefix,s.offset;i=s.offset,o=s.prefix,a=!0,t=s;var u=e.getCursorPosition();n=u.column,r=u.row;var c,l,f=0,d=0;return o&&(f=o.length),s.stringValue&&(d=s.stringValue.length),c=n-f,l=n-f+d,p(r,c,r,l),{stringValue:s.stringValue,container:e.getContainer()}},l=function(t){if(t){if(e&&e.oEditor){var i,s,u=0;o&&(u=o.length),i=n-u,s=n;var c=f(r,i,r,s),l=e.getRange(c.start.row,c.start.column,c.end.row,c.end.column);e.replace(l,t),e.navigateTo(r,n)}}a=!1,setTimeout(function(){e.setFocus()},0)},p=function(t,n,r,i){var o=e.getRange(t,n,r,i),a=e.getSelection();a&&a.setSelectionRange(o)},f=function(o,a,s,u){for(var c=i,l=e.getLine(r),p=l.substring(0,n),f=p.lastIndexOf('"'),d=p.lastIndexOf("{"),h=!1;"<"!==t.buffer[c]&&(">"!==t.buffer[c]||">"===t.buffer[c]&&d===f+1);){if('"'===t.buffer[c]||"'"===t.buffer[c]){h=!0;break}c++}return c>i&&h&&(u+=c-i),{start:{row:o,column:a},end:{row:s,column:u}}};return{initTermMode:s,initTermsContext:c,replaceByTerm:l,getTermMode:u}}),define("sap.watt.ideplatform.intellisence/service/IntellisenceImpl",["./contentassist/LinkModeHelper","./contentassist/HintModeHelper","../util/AutoCompletePopupHelper","./contentassist/TermModeHelper","sap/watt/lib/lodash/lodash"],function(e,t,n,r,i){"use strict";var o=[],a=function(e,t,n,r,i){return e.isEmpty()||(t>=e.start.row&&t<=e.end.row&&(t>e.start.row?n-1<=e.end.column&&(t=e.start.row,n=e.start.column):n-1<=e.end.column&&n>=e.start.column&&(t=e.start.row,n=e.start.column)),r>=e.start.row&&r<=e.end.row&&(r=e.start.column&&(r=e.end.row,i=e.end.column):i<=e.end.column&&i+1>=e.start.column&&(r=e.end.row,i=e.end.column))),{start:{row:t,column:n},end:{row:r,column:i}}};return{_mCategoryIcon:{},init:function(){return n.initPopup(this._onProposalSelected,this)},configure:function(e){return o=o.concat(e.codeCompletion),this._sIconRoot=e.iconRoot,this._iHintLevel=e.hintLevel,this._oLocalI18nCodeCompletionService=e.localI18nCodeCompletion,this._aConfiguredLibraries=e.libraries,this._initCategoryIcons(e.categoryIcon),this.context.service.resource.includeStyles(e.styles)},registerCompletionProvider:function(e,t){var n=[];return n.push(t),o.push({contentType:n,service:e}),Q()},getConfiguredLibraries:function(e){for(var t=[],n=0;n0){var u=i.intersection(o.contentType,t);if(u&&u.length>0&&a===s)return n=o.service,!1}else if(o.fileExtension===e.toLowerCase()&&a===s)return n=o.service,!1}),n})})},getCodeCompletion:function(){var e=this.context.service.content,t=this;return e.getCurrentDocument().then(function(e){if(e){var n=e.getEntity().getFileExtension();return t._getCodeCompletionByParams(n,e)}})},onEditorBeforeClosing:function(e){this._oEditor=null,this.clearIntellisenceContext()},onScroll:function(e){this.updatePosition()},onSplitterPositionChanged:function(){this._positionChangeTimer&&jQuery.sap.clearDelayedCall(this._positionChangeTimer),this._positionChangeTimer=jQuery.sap.delayedCall(100,this,function(){this.updatePosition(),this._positionChangeTimer=null})},updatePosition:function(){var e=this;n.isOpen()&&this._oEditor.getContentStatus(!0,!1).then(function(t){var r=e._buildAutoCompleteCoord(t);n.updatePosition(r)}).done(),t.getHintMode()&&this._oEditor.getContentStatus(!0,!1).then(function(e){t.updatePosition(e.coords.pageX,e.coords.pageY)}).done()},onSelectionChanged:function(e){var t=e.params.owner,n=this;if(t&&(t.instanceOf("sap.watt.common.plugin.aceeditor.service.Editor")||t.instanceOf("sap.watt.common.service.editor.CodeCompletion"))){var r=!1;n._oEditor!=t&&(n._oEditor=t,t.detachEvent("beforeClosing",n.onEditorBeforeClosing,n),t.attachEvent("beforeClosing",n.onEditorBeforeClosing,n),t.detachEvent("scroll",n.onScroll,n),t.attachEvent("scroll",n.onScroll,n),r=!0);var i=e.params.selection[0]?e.params.selection[0].document:void 0;(n._oDocument!=i||r)&&(n._oDocument=i,t.getUI5Editor().then(function(e){e&&n.initIntellisenceContext(e)}).done())}},initIntellisenceContext:function(i){var o=this;this.context.service.intellisence.config.getUserSetting().then(function(e){o.setSetting(e)}).done(),setTimeout(function(){o._oContainer=i.getContainer(),o._oEditorControl=i,e.initLinkMode(o),t.initHintMode(o),r.initTermMode(o);var a=i.oEditor;o.getCodeCompletion().then(function(s){o._oCodeCompletionService=s,i.getContainer().onclick=function(e){if(t.getHintMode()&&t.cancelHint(!1,!0),r.getTermMode()){var n=o.context.service.translation;n&&n.hideTermUI().done()}},i.getContainer().onkeydown=function(n){var r=n.keyCode;n.altKey||n.ctrlKey;n.target&&"ace_text-input"!=n.target.className||(t.getHintMode()&&9!=r&&13!=r&&16!=r&&20!=r&&t.cancelHint(),e.getLinkMode()&&(9!=r&&13!=r||o._oEditorControl.deleteCurrentSelection()))},i.getContainer().onkeyup=function(e){var r=e.keyCode;e.target&&"ace_text-input"!=e.target.className||(n.isOpen()&&8===r?o._updatePopupProposals():2===o._iHintLevel&&8===r?(t.getHintMode()&&(t.setHintStatus(i.getCursorPosition().column),t.cancelHint()),t.tryShowHint()):1!==o._iHintLevel||110!==r&&190!==r||t.tryShowHint())},void 0==o.originalOnTextInput&&(o.originalOnTextInput=a.onTextInput),a._timeoutId=null,a._timeout=300,a._setAutoHintTimeout=function(e){null!==this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=setTimeout(function(){n.isOpen()||o._oCodeCompletionService&&e()},this._timeout)},a.onTextInput=function(r){if(n.isOpen())o.originalOnTextInput.call(a,r),o._updatePopupProposals();else if(t.getHintMode())"\n"==r||"\t"==r?o.replace():(o.originalOnTextInput.call(a,r),a._setAutoHintTimeout(t.tryShowHint));else if(e.getLinkMode())"\n"==r?e.exitLinkMode(!0):(o.originalOnTextInput.call(a,r),a._setAutoHintTimeout(t.tryShowHint));else{if(1===r.length&&7===r.charCodeAt(0))return;o.originalOnTextInput.call(a,r),o._iHintLevel>0&&(1==o._iHintLevel?"."===r&&a._setAutoHintTimeout(t.tryShowHint):2==o._iHintLevel&&a._setAutoHintTimeout(t.tryShowHint))}},a.commands.removeCommand("hideautocomplete"),a.commands.removeCommand("confirmautohint"),a.commands.removeCommand("shiftTab"),a.commands.removeCommand("delChar"),o.commandOriginalTab=a.commands.commands.indent.exec,a.commands.addCommand({name:"confirmautohint",bindKey:{win:"Tab",mac:"Tab",sender:"editor"},multiSelectAction:"forEach",exec:function(n,r,i){t.getHintMode()?o.replace():e.getLinkMode()?e.nextLinkPos():o.commandOriginalTab.call(a,n,r,i)}}),o.commandOriginalShiftTab=a.commands.commands.outdent.exec,a.commands.addCommand({name:"shiftTab",bindKey:{win:"Shift-Tab",mac:"Shift-Tab",sender:"editor"},multiSelectAction:"forEach",exec:function(t,n,r){e.getLinkMode()?e.preLinkPos():o.commandOriginalShiftTab.call(a,t,n,r)}}),a.commands.addCommand({name:"hideautocomplete",bindKey:{win:"Esc",mac:"Esc",sender:"editor"},exec:function(n,r,i){t.getHintMode()?t.cancelHint():e.getLinkMode()&&e.exitLinkMode(!1)}}),o.commandOriginalDel=a.commands.commands.del.exec,a.commands.addCommand({name:"delChar",bindKey:{win:"Delete",mac:"Delete|Ctrl-D|Shift-Delete",sender:"editor"},multiSelectAction:"forEach",exec:function(e,n,r){t.getHintMode()?t.cancelHint():o.commandOriginalDel.call(a,e,n,r)}}),void 0==o.originalLineDown&&(o.originalLineDown=a.commands.commands.golinedown.exec),void 0==o.originalLineUp&&(o.originalLineUp=a.commands.commands.golineup.exec),void 0==o.originalPageDown&&(o.originalPageDown=a.commands.commands.gotopagedown.exec),void 0==o.originalPageUp&&(o.originalPageUp=a.commands.commands.gotopageup.exec),void 0==o.originalGotoLeft&&(o.originalGotoLeft=a.commands.commands.gotoleft.exec),void 0==o.originalGotoRight&&(o.originalGotoRight=a.commands.commands.gotoright.exec),void 0==o.originalGotoLineStart&&(o.originalGotoLineStart=a.commands.commands.gotolinestart.exec),void 0==o.originalGotoLineEnd&&(o.originalGotoLineEnd=a.commands.commands.gotolineend.exec),a.commands.commands.golinedown.exec=function(e,n,r){t.getHintMode()?t.lineDown():o.originalLineDown.call(a,e,n,r)},a.commands.commands.golineup.exec=function(e,n,r){t.getHintMode()?t.lineUp():o.originalLineUp.call(a,e,n,r)},a.commands.commands.gotoright.exec=function(e,n,r){t.getHintMode()?o.replace():o.originalGotoRight.call(a,e,n,r)},a.commands.commands.gotoleft.exec=function(e,n,r){t.getHintMode()&&t.cancelHint(),o.originalGotoLeft.call(a,e,n,r)},a.commands.commands.gotopagedown.exec=function(e,n,r){t.getHintMode()&&t.cancelHint(),o.originalPageDown.call(a,e,n,r)},a.commands.commands.gotopageup.exec=function(e,n,r){t.getHintMode()&&t.cancelHint(),o.originalPageUp.call(a,e,n,r)},a.commands.commands.gotolinestart.exec=function(e,n,r){t.getHintMode()&&t.cancelHint(),o.originalGotoLineStart.call(a,e,n,r)},a.commands.commands.gotolineend.exec=function(e,n,r){t.getHintMode()&&t.cancelHint(),o.originalGotoLineEnd.call(a,e,n,r)},o.context.event.fireIntellisenceContextInitialized({editor:a,document:o._oDocument})}).done()},0)},clearIntellisenceContext:function(){if(t&&t.getHintMode()&&t.cancelHint(!0),e&&e.getLinkMode()&&e.exitLinkMode(!1),n.closePopup(),r&&r.getTermMode()){var i=this.context.service.translation;i&&i.hideTermUI().done()}this.oUIContainer&&this.oUIContainer.removeAllContent()},initTermsContext:function(e){return r.initTermsContext(e)},replaceByTerm:function(e){return r.replaceByTerm(e)},showSuggestions:function(e,t,r){if(!e||!t||!e.length)return void n.closePopup();this.aProposals=e,this.oCoords=t.coords,this.sPrefix=t.prefix;for(var o=0;o0}},setSetting:function(e){this._iHintLevel=e.hintCode?2:0},executeLinkModelHelper:function(t){setTimeout(function(){e.enterLinkMode(t)},0)},_onProposalSelected:function(e){this.replace(e)},_initCategoryIcons:function(e){for(var t=0;t-1&&t!==this.getSelectedIndex()&&this.fireTabClick({currentTabIndex:this.getSelectedIndex(),selectedTabIndex:t}),sap.ui.commons.TabStrip.prototype.selectTabByDomRef.apply(this,arguments)},renderer:{}})}(),define("sap.watt.ideplatform.multieditor/control/TabStrip",function(){}),define("sap.watt.ideplatform.multieditor/service/MultiEditor",["sap/watt/platform/plugin/platform/service/ui/AbstractEditor","../control/TabStrip"],function(e){"use strict";var t=e.extend("sap.watt.common.plugin.multieditor.service.MultiEditor",{});return jQuery.extend(t.prototype,{_aStyles:null,_aEditors:null,_aEditorsContent:null,_oTabStrip:null,_mSelectedIndexByDocument:null,init:function(){this._sPreferencesNode=this.context.self.getProxyMetadata().getName(),this._mSelectedIndexByDocument={},this._aEditors=[],this._aEditorsContent=[],this._aStyles=[],this._bSaveLastTab=!1,this._oTabStrip=new sap.watt.common.plugin.multieditor.control.TabStrip,this._oTabStrip.setWidth("100%"),this._oTabStrip.setHeight("100%"),this._oTabStrip.attachTabClick(this._onTabClick,this), this._oTabStrip.attachSelect(this._onTabSelect,this),this._oTabStrip.addStyleClass("multiEditor")},configure:function(e){this._bSaveLastTab=!!e.saveLastTab,e.styles&&(this._aStyles=this._aStyles.concat(e.styles)),e.doNotLoadDefaultCss||this._aStyles.push({uri:"sap.watt.ideplatform.multieditor/css/multieditor.css"}),e.editors&&(this._aEditors=e.editors),this._createTabs()},getContent:function(){var e=this;return e.context.service.resource.includeStyles(e._aStyles).then(function(){return e._oTabStrip})},getFocusElement:function(){return this.getActiveEditor()},open:function(t){e.prototype.open.apply(this,arguments);var n=this,r=Q();return n._mSelectedIndexByDocument[t.getKeyString()]||(n._getSaveLastTab()?r=n.context.service.preferences.get(n._sPreferencesNode).then(function(e){e?n._mSelectedIndexByDocument[t.getKeyString()]=e.ilastTabIndex:n._mSelectedIndexByDocument[t.getKeyString()]=0}):n._mSelectedIndexByDocument[t.getKeyString()]=0),r.then(function(){var e=n._mSelectedIndexByDocument[t.getKeyString()];return n._oTabStrip.setSelectedIndex(e),n._initEditorContent(n._oTabStrip.getSelectedIndex()).then(function(){return n.getActiveEditor().open(t)}).then(function(){if(n._aEditorsContent[e].getDomRef())return n.context.service.focus.setFocus(n.getActiveEditor())})})},close:function(e){if(!this.hasDocument(e))return Q();for(var t=[],n=this,r=0;r0},_getSaveLastTab:function(){return this._bSaveLastTab},_createTabs:function(){for(var e,t=0;t
"}),t._DocumentEditorMap[this._oDocument.getKeyString()].wrapperDiv=e),this.context.service.resource.includeStyles(this._aStyles).thenResolve(e)},open:function(e){return this._oDocument=e,this._doCompare(this._oDocument)},close:function(e){var t=this._DocumentEditorMap[e.getKeyString()].editor.getCompareView().getEditors()[1];jQuery(t._domNode).off("compareEditorModify",this._DocumentEditorMap[e.getKeyString()].handler),this._DocumentEditorMap[e.getKeyString()].editor=null;var n=jQuery("div[id='"+this._getDivId(e)+"']"),r=jQuery("span[id='"+this._getSpanId(this._oDocument)+"']");n&&n.remove(),r&&r.remove(),this._DocumentEditorMap[e.getKeyString()]=null},flush:function(){var e=this._DocumentEditorMap[this._oDocument.getKeyString()].editor;if(!this._DocumentEditorMap[this._oDocument.getKeyString()].options.newFile.readonly&&e){var t=e.getCompareView().getEditors()[1];return this._updateCompareColoring(t),this._oDocument.setContent(t.getText(),this.context.self)}},undo:function(){if(this._oDocument&&this._DocumentEditorMap[this._oDocument.getKeyString()]&&this._DocumentEditorMap[this._oDocument.getKeyString()].editor){var e=this._DocumentEditorMap[this._oDocument.getKeyString()].editor,t=e.getCompareView().getEditors()[1];return t._undoStack.undo()}return!1},redo:function(){if(this._oDocument&&this._DocumentEditorMap[this._oDocument.getKeyString()]&&this._DocumentEditorMap[this._oDocument.getKeyString()].editor){var e=this._DocumentEditorMap[this._oDocument.getKeyString()].editor,t=e.getCompareView().getEditors()[1];return t._undoStack.redo()}return!1},hasUndo:function(){if(this._oDocument&&this._DocumentEditorMap[this._oDocument.getKeyString()]&&this._DocumentEditorMap[this._oDocument.getKeyString()].editor){var e=this._DocumentEditorMap[this._oDocument.getKeyString()].editor,t=e.getCompareView().getEditors()[1];return this._undeRedoDetail.undo?this._undeRedoDetail.undo:t._undoStack.canUndo()}return!1},hasRedo:function(){if(this._oDocument&&this._DocumentEditorMap[this._oDocument.getKeyString()]&&this._DocumentEditorMap[this._oDocument.getKeyString()].editor){var e=this._DocumentEditorMap[this._oDocument.getKeyString()].editor,t=e.getCompareView().getEditors()[1];return this._undeRedoDetail.redo?this._undeRedoDetail.redo:t._undoStack.canRedo()}return!1},markClean:function(){if(this._oDocument&&this._DocumentEditorMap[this._oDocument.getKeyString()]&&this._DocumentEditorMap[this._oDocument.getKeyString()].editor){var e=this._DocumentEditorMap[this._oDocument.getKeyString()].editor,t=e.getCompareView().getEditors()[1];return t._undoStack.markClean()}return!1},isClean:function(){if(this._oDocument&&this._DocumentEditorMap[this._oDocument.getKeyString()]&&this._DocumentEditorMap[this._oDocument.getKeyString()].editor){var e=this._DocumentEditorMap[this._oDocument.getKeyString()].editor,t=e.getCompareView().getEditors()[1];return t._undoStack.isClean()}return!1},getState:function(){return null},getTitleForDocument:function(e){return e.getName()+" ["+this.context.i18n.getText("i18n","compare_title")+"]"},getTooltipForDocument:function(e){return e.getEntity().getFullPath()+" ["+this.context.i18n.getText("i18n","compare_title")+"]"},isRestorable:function(){return!1},isAvailable:function(){return!0},compare:function(e,t,n,r,i){var o=this,a=t,s=n;this._oDocument=e;var u=this._getDivId(e),c=e.getName(),l=e.getName(),p=o.context.i18n.getText("i18n","compare_title_left_side",[c]),f=o.context.i18n.getText("i18n","compare_title_right_side",[l]);return i&&(f=t.aAdditionalData[0],a=t.oContent,p=n.aAdditionalData[0],s=n.oContent),Q("string"==typeof a?a:a.getContent()).then(function(t){var n={parentDivId:u,newFile:{InitialContent:s,readonly:!!r,Name:p},oldFile:{readonly:!0,Content:t,Name:f}};return o._DocumentEditorMap[e.getKeyString()]||(o._DocumentEditorMap[e.getKeyString()]={}),o._DocumentEditorMap[e.getKeyString()].options=n,e.getProject().then(function(e){return e&&e.getTitle?e.getTitle():""}).then(function(e){return o.context.service.usagemonitoring.report("Compare","compare",r?"read_only":"read_write",e)}).done(),o.context.service.content.open(e,o.context.service.compare)})},getFocusElement:function(){return document.getElementById(this._getDivId(this._oDocument))},getSelection:function(){return{document:this._oDocument}},onSplitterPositionChanged:function(){var e=this;setTimeout(function(){if(e._oDocument&&e._DocumentEditorMap&&e._DocumentEditorMap[e._oDocument.getKeyString()]){var t=e._DocumentEditorMap[e._oDocument.getKeyString()].editor;if(t&&t.getCompareView()&&t.getCompareView().getWidget()){var n=t.getCompareView().getWidget();"twoWay"===n.type&&n._uiFactory.getSplitter()._resize()}}})},_doCompare:function(t){var n=this,r=this._DocumentEditorMap[t.getKeyString()].options;return Q(r.newFile.InitialContent?r.newFile.InitialContent:t.getContent()).then(function(i){var o=n._DocumentEditorMap[t.getKeyString()].editor;if(o){if(r.newFile.readonly)return;var a=o.getCompareView().getWidget();a.getEditors()[1].getTextView().setText(i),a.options.newFile.Content=i,a.options.mapper=null,a.refresh(!1)}else{sap.ui.getCore().applyChanges(),r.newFile.Content=i,r.showTitle=!0;var s=jQuery("div[id='"+n._getDivId(t)+"']");s.length>0&&s.empty(),o=n._DocumentEditorMap[t.getKeyString()].editor=new e(r,n._getSpanId(n._oDocument));var u=o.getCompareView().getEditors()[1];o.getCompareView().getEditors()[0];n._DocumentEditorMap[t.getKeyString()].handler=function(e){n._onKeyPress(u)},jQuery(u._domNode).on("compareEditorModify",n._DocumentEditorMap[t.getKeyString()].handler)}})},_onKeyPress:function(e){this._updateCompareColoring(e),this._oDocument.setContent(e.getText(),this.context.self).done()},_updateCompareColoring:function(e){var t=this._DocumentEditorMap[this._oDocument.getKeyString()].editor;if(t){var n=t.getCompareView().getWidget();n.options.newFile.Content=e.getText(),n.options.mapper=null,n.refresh(!1)}},_getDivId:function(e){return this.COMPARE_PREFIX+e.getKeyString()},_getSpanId:function(e){return this.CMD_COMPARE_PREFIX+e.getKeyString()}}}),define("sap.watt.ideplatform.hcpconnectivity/command/OpenCockpit",{execute:function(e,t){var n=this.context.service.hcpconnectivity;n.openCockpit(t).done()},isAvailable:function(){return!0},isEnabled:function(){var e=sap.watt.getEnv("server_type");return"java"!==e&&"local_hcproxy"!==e}}),define("sap.watt.ideplatform.hcpconnectivity/command/OpenUIThemeDesigner",{execute:function(e,t){var n=this.context.service.hcpconnectivity;n.openUIThemeDesigner(t).done()},isAvailable:function(){return!0},isEnabled:function(){var e=sap.watt.getEnv("server_type");return"java"!==e&&"local_hcproxy"!==e}}),define("sap.watt.ideplatform.hcpconnectivity/service/HCPConnectivity",["sap/watt/lib/lodash/lodash","sap/watt/lib/jszip/jszip-shim"],function(e,t){"use strict";var n,r=sap.watt.getEnv("context_root")+"api/html5api/accounts/",i=function(t,i,o){var a;if(n)a=Q.resolve(n);else{var s=r+t+"/applications";e.isEmpty(i)&&(i={Accept:"*/*"}),a=this.context.service.ajaxrequest.createClient(s,i,o).then(function(e){return n=e})}return a},o=function(e,t){throw{action:t,status:e.status,info:e.responseText?e.responseText:e.message}},a=function(e,t,n,r,i,o,a){return this.context.service.hcpauthentication.authenticate(!0).then(function(s){switch(o.username=s.username,o.password=s.password,o.type=e.mAuthenticationTypes.BASIC,e.clearCsrfToken(),t){case"GET":return e.get(n,r,i,o);case"POST":return e.post(n,r,i,o,a);case"PUT":return e.put(n,r,i,o,a);default:return e.get(n,r,i,o)}})},s=function(e,t,n,r,i,a,s,u,c){if(400===e.status&&e.responseText)try{var l=JSON.parse(e.responseText);if(l&&l.message&&"user email is missing"===l.message.toLowerCase())return this.executeCallWithBasicAuthentication(n,r,i,a,s,u,c).fail(function(e){o(e,t)})}catch(n){o(e,t)}return 403===e.status?this.executeCallWithBasicAuthentication(n,r,i,a,s,u,c).fail(function(e){o(e,t)}):void o(e,t)},u=function(t,n,i,o,a,s,u){var c=this;return this.context.service.system.getSystemInfo().then(function(l){var p=r+t,f=p+a,d=l.sEMail;n&&(d=n);var h={Accept:"*/*"};return c.getClient(t,h).then(function(t){var n;return n=d&&i?{username:d,password:i,type:t.mAuthenticationTypes.BASIC}:{type:t.mAuthenticationTypes.HCP_SSO},t.setAuthentication(n),s===!0&&(h=e.merge({"X-ResetBackEndSession":"dummyValue"},h),t.clearCsrfToken()),t.get(f,u,h,n).fail(function(e){return c.handleFailure(e,o,t,"GET",f,u,h,n)})})})},c=function(e,t,n,i,o,a){var s=this;return this.context.service.system.getSystemInfo().then(function(u){var c=r+e,l=c+"/applications"+o,p=u.sEMail;return t&&(p=t),s.getClient(e).then(function(e){var t,r={Accept:"*/*"};return t=p&&n?{username:p,password:n,type:e.mAuthenticationTypes.BASIC}:{type:e.mAuthenticationTypes.HCP_SSO},e.post(l,null,r,t,a).fail(function(n){return s.handleFailure(n,i,e,"POST",l,null,r,t,a)})})})},l=function(e,t,n,i,o,a){var s=this;return this.context.service.system.getSystemInfo().then(function(u){var c=r+e,l=c+"/applications"+o,p=u.sEMail;return t&&(p=t),s.getClient(e).then(function(e){var t;return t=p&&n?{username:p,password:n,type:e.mAuthenticationTypes.BASIC}:{type:e.mAuthenticationTypes.HCP_SSO},e.put(l,null,null,t,a).fail(function(n){return s.handleFailure(n,i,e,"PUT",l,null,null,t,a)})})})},p=function(e,t,n,r,i){var o={name:r};i&&(o.repository=i);var a="";return this.executePOSTCall(e,t,n,"hcp_connectivity_createapp",a,o)},f=function(e,t,n,r){var i="/applications";return this.executeGETCall(e,t,n,"hcp_connectivity_getapps",i,r)},d=function(e,t,n,r){var i="/applications/"+r;return this.executeGETCall(e,t,n,"hcp_connectivity_getappinfo",i)},h=function(e,n,r,i){var o={responseType:"arraybuffer"};return this.executeGETCall(e,n,r,"hcp_connectivity_getjszip",i,null,o).then(function(e){var n=new t(e);return n})},m=function(e,t,n,r,i){return this.executeGETCall(e,t,n,"hcp_connectivity_getblob",r,null,i)},g=function(e,t,n,r){var i="/applications/"+r+"/commits";return this.executeGETCall(e,t,n,"heliumGetCommits",i)},v=function(e,t,n,r){var i="/applications/"+r+"/versions";return this.executeGETCall(e,t,n,"heliumGetVersions",i).then(function(e){return e.appName=r,e})},y=function(e,t,n,r,i,o){var a={version:o,sCommitId:i},s="/"+r+"/versions";return this.executePOSTCall(e,t,n,"heliumSetAppVersion",s,a)},x=function(e,t,n,r,i){i=encodeURIComponent(i);var o="/"+r+"/versions/"+i+"/action",a="ACTIVATE";return this.executePOSTCall(e,t,n,"heliumActivateApp",o,a)},b=function(e,t,n,r){var i="/"+r+"/action",o="START";return this.executePOSTCall(e,t,n,"heliumActivateApp",i,o)},_=function(e,t,n,r){var i="/"+r+"/action",o="RESTART";return this.executePOSTCall(e,t,n,"heliumActivateApp",i,o)},w=function(e,t,n){var r=this,i=e.getEntity().getBackendData().git;return i?this.context.service.git.getRemotes(i).then(function(e){if(!e||!e.Children||e.Children.length<1)return null;var o=r.getHCPRemoteGitURL(e);return o?r.getHCPAccountByGitURL(i).then(function(e){return e?r.getHCPAppNameByGitURL(o,t,n,e):null}):null}):null},E=function(t,n,r,i){var o=null;return this.getApps(i,n,r).then(function(n){return o=e.find(n,function(e){return e.repository===t}),o?o.name:null})},S=function(e,t,n,r,i,o){var a="/"+r+"/versions/"+i+"/content";return this.executePUTCall(e,t,n,"heliumDeployContent",a,o)},C=function(e,t,n,i,o){var a=this;return this.context.service.system.getSystemInfo().then(function(o){var s=r+e,u=s+"/subscriptions",c=o.sUsername;return t&&(c=t),a.getClient(e).then(function(e){var r={Accept:"*/*"};i===!0&&(r["X-ResetBackEndSession"]="dummyValue",e.clearCsrfToken());var o;return o=t&&n?{username:c,password:n,type:e.mAuthenticationTypes.BASIC}:{type:e.mAuthenticationTypes.HCP_SSO},e.get(u,null,r,o)})})},T=function(e,t,n,r){if(!r)return null;var i=sap.watt.getEnv("context_root")+"services/v1/instances/"+r+"/accounts/v1/members/"+e+"/accountlist";return this.context.service.ajaxrequest.createClient(i).then(function(e){var r={Accept:"*/*"},o={username:t,password:n,type:e.mAuthenticationTypes.BASIC};return e.clearCsrfToken(),e.get(i,null,r,o).fail(function(e){throw{action:"hcp_connectivity_getaccounts",status:e.status,info:e.responseText?e.responseText:e.message}})})},D=function(e,t,n,r){var i=this;return r?this.getAccounts(e,t,n,r):this.getHCPDefaultAccount().then(function(r){return i.getAccounts(e,t,n,r)})},A=function(){return this.context.service.system.getSystemInfo().then(function(e){var t=e.sAccount?e.sAccount.toLowerCase():null;return t})},P=function(e){var t=this;return e?this.context.service.git.getRemotes(e).then(function(e){return t.getHCPRemoteGitURL(e)}).then(function(e){if(e){var t=e.split("/")[3];return t}}):void 0},k=function(e){var t=e.getEntity().getBackendData().git;return t?this.getHCPAccountByGitURL(t):null},I=function(e){this.getLinkToCockPit().then(function(t){e&&(e.location.href=t,e.focus())}).done()},F=function(){var e=window.location.origin;return e||(e=window.location.host),e},O=function(e){var t=this,n=sap.watt.getEnv("server_type");return"java"===n||"local_hcproxy"===n?null:Q(e?e:this.getHCPDefaultAccount()).then(function(e){var n=t.getWindowLocationOrigin(),r="dispatcher",i=n.substring(n.indexOf(r)+r.length),o=window.location.protocol+"//account"+i+"/cockpit";return null!==e&&(o+="#/acc/"+e+"/accountdashboard"),o})},N=function(){var e=sap.watt.getEnv("server_type");return"java"===e||"local_hcproxy"===e?null:this.context.service.system.getSystemInfo().then(function(e){var t=e.sAccount?e.sAccount.toLowerCase():null;if(t){var n=window.location.origin;n||(n=window.location.host);for(var r=n.split("."),i=window.location.protocol+"//themedesigner-"+t,o=1;o0)return r[0].GitUrl}return""},B=function(e){var n=new t(e),r=Object.keys(n.files).length;return r>0},U=function(e,t,n,r,i){var o=this,a="/api/html5api/accounts/"+n+"/applications/"+r+"/content?pathSuffixFilter="+i;return this.getClient(n).then(function(n){var r;r=e&&t?{username:e,password:t,type:n.mAuthenticationTypes.BASIC}:{type:n.mAuthenticationTypes.HCP_SSO};var i={Accept:"*/*"},s={responseType:"arraybuffer"};return n.get(a,s,i,r).then(function(e){return B(e)}).fail(function(e){return o.handleFailure(e,"isWelcomeFileExistOnHCP",n,"GET",a,s,i,r).then(function(e){return B(e)})})})};return{createApp:p,getApps:f,getAppInfo:d,getAppCommits:g,getAppVersions:v,createAppVersion:y,activateApp:x,startApp:b,restartApp:_,getHCPAppNameFromGitRepository:w,deploy:S,isWelcomeFileExistOnHCP:U,getSubscriptions:C,getHCPAccounts:D,getAccounts:T,getHCPDefaultAccount:A,getHCPAccountFromGitRepository:k,openCockpit:I,getLinkToCockPit:O,openUIThemeDesigner:j,getLinkToUIThemeDesigner:N,getIsSAPIdP:R,getLandscapeDomain:L,getHCPRemoteGitURL:M,handleFailure:s,getJSZipFromHCP:h,getBlobFromHCP:m,getHCPAppNameByGitURL:E,getHCPAccountByGitURL:P,getClient:i,executeGETCall:u,executePOSTCall:c,executePUTCall:l,getWindowLocationOrigin:F,executeCallWithBasicAuthentication:a}}),define("sap.watt.ideplatform.hcpconnectivity/service/HCPAuthentication",[],function(){var e,t,n,r=null,i=!0,o=function(e){return r=this.context,sap.watt.includeCSS(require.toUrl("sap.watt.ideplatform.hcpconnectivity/css/HCPConnectivity.css")),r.service.system.getSystemInfo().then(function(t){return r.service.keystorage.get(t.sAccount,"HTTPS").then(function(n){return n&&n.username&&n.password?(n.account=t.sAccount,n.member=t.sUsername,r.service.hcpconnectivity.getSubscriptions(n.account,n.username,n.password).then(function(){return n})):e===!0?s(t):r.service.hcpconnectivity.getSubscriptions(t.sAccount).then(function(){return n=n||{},n.account=t.sAccount,n.member=t.sUsername,n}).fail(function(e){if(403===e.status)return s(t);throw e})})})},a=function(o,a){var s=new sap.ui.commons.Dialog({title:r.i18n.getText("i18n","Authentication_LoginHeader"),resizable:!1,width:"480px",modal:!0,keepInWindow:!0}).addStyleClass("sapUiSizeCompact"),l=c(a);s.addContent(l);var p=function(){s.setBusy(!0);var e=t.password,n=t.username;return r.service.hcpconnectivity.getSubscriptions(a.sAccount,n,e).then(function(){var t={username:n,password:e,account:a.sAccount,member:a.sUsername};i&&r.service.keystorage.setHttps(a.sAccount,n,e).done(),s.setBusy(!1),s.close(),o.resolve(t)}).fail(function(e){s.setBusy(!1),u(401===e.status?r.i18n.getText("i18n","Authentication_Unauthorized"):403===e.status?r.i18n.getText("i18n","Authentication_Forbidden"):e.info)})},f=new sap.m.Button({text:r.i18n.getText("i18n","Authentication_Login"),enabled:!1,press:function(){p()}});return s.addButton(f),s.setDefaultButton(f),s.setInitialFocus(e),s.addButton(new sap.m.Button({text:r.i18n.getText("i18n","Authentication_Cancel"),press:function(){s.close();var e=new Error("Authentication_Cancel");o.reject(e)}})),l.attachEvent("validationResult",function(e){n.setText(""),t=e.mParameters.result,f.setEnabled(t.isValid)}),s},s=function(e){var t=Q.defer(),n=a(t,e);return n.open(),t.promise},u=function(e){n.addStyleClass("hcpConnectivityErrorText"),n.setText(e)},c=function(t){var o=null;if(i=!0,"hcproxy"===sap.watt.getEnv("server_type")){for(var a=sap.watt.getEnv("orion_preview"),s=a.split("/")[2],u=s.split("."),c=u.length-3,l=[],p=0;p<3;p++)l.push(u[c+p]);o=l.join(".")}else o="neo.ondemand.com";var f="";t&&(f=t.sAccount.toLowerCase());var d="";t&&t.sEMail&&(d=t.sEMail.toLowerCase());var h=new sap.ui.commons.Label({text:r.i18n.getText("i18n","Authentication_Account"),textAlign:"Left",required:!0,layoutData:new sap.ui.layout.GridData({span:"L3 M3 S12"})}).addStyleClass("hcpConnectivityLabel"),m=new sap.ui.commons.TextField({value:f,width:"100%",enabled:!1,tooltip:r.i18n.getText("i18n","Authentication_AccountTooltip"),layoutData:new sap.ui.layout.GridData({span:"L6 M6 S12"}),liveChange:function(e){g(e)},accessibleRole:sap.ui.core.AccessibleRole.Textbox}),g=function(e){var t=e.getParameter("liveValue");m.setValue(t),I()},v=new sap.ui.layout.Grid({width:"100%",layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),content:[h,m]}),y=new sap.ui.commons.Label({required:!0,text:r.i18n.getText("i18n","Authentication_Username"),textAlign:"Left",layoutData:new sap.ui.layout.GridData({span:"L3 M3 S12"})}).addStyleClass("hcpConnectivityLabel"),x=new sap.ui.commons.TextField({value:d,width:"100%",enabled:!0,tooltip:r.i18n.getText("i18n","Authentication_UsernameTooltip"),layoutData:new sap.ui.layout.GridData({span:"L6 M6 S12"}),liveChange:function(e){b(e)},accessibleRole:sap.ui.core.AccessibleRole.Textbox}),b=function(e){var t=e.getParameter("liveValue");x.setValue(t),I()},_=new sap.ui.layout.Grid({layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),content:[y,x]}),w=new sap.ui.commons.Label({required:!0,text:r.i18n.getText("i18n","Authentication_Password"),textAlign:"Left",layoutData:new sap.ui.layout.GridData({span:"L3 M3 S12"})}).addStyleClass("hcpConnectivityLabel");e=new sap.ui.commons.PasswordField({value:"",width:"100%",tooltip:r.i18n.getText("i18n","Authentication_PasswordTooltip"),layoutData:new sap.ui.layout.GridData({span:"L6 M6 S12"}),liveChange:function(e){E(e)},accessibleRole:sap.ui.core.AccessibleRole.Textbox}),e.focus();var E=function(t){var n=t.getParameter("liveValue");n!==e.getValue()&&(e.setValue(n),I())},S=new sap.ui.layout.Grid({layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),content:[w,e]});n=new sap.ui.commons.TextView({width:"100%",text:"",layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"})}).addStyleClass("hcpConnectivityErrorText");var C=new sap.ui.commons.CheckBox({text:r.i18n.getText("i18n","Authentication_RememberMe"),tooltip:r.i18n.getText("i18n","Authentication_RememberMeTooltip"),checked:!0,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),change:function(){i=this.getChecked()}}),T=new sap.ui.layout.Grid({width:"100%",layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),vSpacing:0,content:[v,_,S,C,n]}),D=function(e){var t={};return 0===e.length?(t.isValid=!1,t.message=r.i18n.getText("i18n","Authentication_EmptyAccountInfoMsg"),t.severity="info",t):(t.isValid=!0,t)},A=function(e){var t={};return 0===e.length?(t.isValid=!1,t.message=r.i18n.getText("i18n","Authentication_EmptyUsernameInfoMsg"),t.severity="info",t):(t.isValid=!0,t)},P=function(e){var t={};return 0===e.length?(t.isValid=!1,t.message=r.i18n.getText("i18n","Authentication_EmptyPasswordInfoMsg"),t.severity="info",t):(t.isValid=!0,t)},k=function(e){T.fireEvent("validationResult",{result:e})},I=function(){var t=m.getValue().trim(),n=D(t);if(n.isValid===!1)return void k(n);var r=x.getValue().trim(),i=A(r);if(i.isValid===!1)return void k(i);var o=e.getValue().trim(),a=P(o);if(a.isValid===!1)return void k(a);var s={};s.isValid=!0,s.account=t,s.username=r,s.password=o,k(s)};return T};return{authenticate:o}}),define("sap.watt.ideplatform.imageviewer/service/ImageViewerFactory",{create:function(e,t){return e=e||"imageviewer",t=jQuery.extend(t||{},{implements:"sap.watt.common.plugin.imageviewer.service.ImageViewer",module:"sap.watt.ideplatform.imageviewer/service/ImageViewerImpl"}),this.context.create(e,t)}}),define("sap.watt.ideplatform.imageviewer/service/ImageViewerImpl",["sap/watt/platform/plugin/platform/service/ui/AbstractEditor"],function(e){"use strict";var t=e.extend("sap.watt.common.plugin.imageviewer.service.ImageViewer",{});return jQuery.extend(t.prototype,{_oView:null,oDocument:null,configure:function(e){},init:function(){},open:function(e){var t=this;return this._oDocument=e,e.getContent().then(function(e){var n=t._oView.getController().getImage(),r=URL.createObjectURL(e);n.setSrc(r),n.setAlt(t._oDocument.getEntity().getFullPath()),t.focus()})},flush:function(){},close:function(t){this._oDocument=null;var n=this._oView.getController().getImage();n.setSrc(""),n.setAlt(""),e.prototype.close.apply(this,arguments).done()},getContent:function(){return this._oView||(this._oView=sap.ui.view("imageviewer",{viewName:"sap.watt.ideplatform.plugin.imageviewer.view.ImageViewer",type:sap.ui.core.mvc.ViewType.XML}),this._oView.setWidth("100%"),this._oView.setHeight("100%")),this._oView},getSelection:function(){return[{document:this._oDocument}]}}),t}),define("sap.watt.ideplatform.run/command/RunAsCommand",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{getConfiguration:function(e){if(e.oSelectedDocument)return e.oContext.service.configurationhelper.getConfigurationForRunner(e)},getRunnableDocument:function(e){var t=e.oSelectedDocument;return t?t.getProject(!0).then(function(t){var n=t?t.getEntity().getFullPath():"",r=e.oConfiguration;if(r&&!r._metadata.hasIssues&&r.filePath){var i=r.filePath;return e.oContext.service.filesearchutil.getRunnableDocument(i,n)}}):Q()}}}),define("sap.watt.ideplatform.run/command/RunCommand",["sap.watt.ideplatform.run/command/RunAsCommand","sap/watt/lib/lodash/lodash"],function(e,t){"use strict";var n=function(e){var t=e.oContext,n=e.oSelectedDocument;if(n)return t.service.configurationhelper.getRunnerAndConfiguration(n).then(function(t){return e.oRunner=t.oRunner,t.oConfiguration})},r=function(t){return t.oSelectedDocument=null,t.oProjectDocument=null,t.oRunner=null,t.oConfiguration=null,t.oRunnableDocument=null,t.oContext.service.runcommandstate.getSelectedConfigurationState().then(function(r){return r?(t.oConfiguration=r.configuration,t.oContext.service.run.getSelectedDocument().then(function(n){return t.oSelectedDocument=n,n.getProject().then(function(n){return t.oProjectDocument=n,e.getRunnableDocument(t).then(function(e){t.oRunnableDocument=e})})})):t.oContext.service.run.getSelectedDocument().then(function(r){if(t.oSelectedDocument=r,r)return Q.spread([n(t),r.getProject()],function(n,r){return t.oConfiguration=n,t.oProjectDocument=r,e.getRunnableDocument(t).then(function(e){return t.oRunnableDocument=e})})})})},i=function(e){return e.oContext=this.context,r(e).then(function(){return!0})},o=function(e){var t=[],n=e.oSelectedDocument;return t.push(this.context.service.run.isRunConfigurationViewActive()),t.push(this.context.service.perspective.getCurrentPerspective()),t.push(this.context.service.run.getRunnersForDocument(n)),Q.spread(t,function(e,t,r){return!(!n||e!==!1||"development"!==t&&"storyboard"!==t||!(r.length>0))})},a=function(){};return{isAvailable:i,isEnabled:o,execute:a,getConfiguration:n}}),define("sap.watt.ideplatform.run/command/RunPerformanceCommand",["sap.watt.ideplatform.run/command/RunAsCommand"],function(e){"use strict";var t=function(e){var t=e.oContext,n=e.oSelectedDocument;if(n)return t.service.configurationhelper.findRunner(n,t,"webapprunner").then(function(r){if(e.oRunner=r?r:null,e.oRunner)return t.service.configurationhelper.getAllPersistedConfigurations(n).then(function(e){for(var t=0;t0)})},i=function(e){return e.oContext=this.context,"local_hcproxy"!==sap.watt.getEnv("server_type")&&"xs2"!==sap.watt.getEnv("server_type")&&"orion"===sap.watt.getEnv("ws_server")&&n(e).then(function(){return e.isPerformance=!0,!0})},o=function(e){return r(e,this.context).then(function(t){ if(t){if(e.oRunner&&e.oRunner.oService.context.service.performancetoolkit){var n=e.oRunner.oService.context.service.performancetoolkit;return n.runner.isPerformanceRunEnabled(e)}return!1}return t})},a=function(){};return{isAvailable:i,isEnabled:o,execute:a,getConfiguration:t}}),define("sap.watt.ideplatform.run/command/SelectConfigurationCommandService",[],function(){"use strict";return{execute:function(e){return this.context.service.runcommandstate.setSelectedConfigurationState(e)},isAvailable:function(){return!0}}}),define("sap.watt.ideplatform.run/command/ProjectRecentlyUsedCommand",[],function(){return{_prepareCommand:function(e){return e.oSelectedDocument=null,e.oProjectDocument=null,e.oRunner=null,e.oConfiguration=null,e.oRunnableDocument=null,this.context.service.run.getSelectedDocument().then(function(t){if(e.oSelectedDocument=t,t)return t.getProject().then(function(t){e.oProjectDocument=t})})},execute:function(){},isAvailable:function(e){return e.oContext=this.context,this._prepareCommand(e).then(function(){return!0})},isEnabled:function(){return this.context.service.perspective.getCurrentPerspective().then(function(e){return"development"===e})}}}),define("sap.watt.ideplatform.run/command/RunConfigurationsCommand",["sap/watt/lib/lodash/lodash"],function(e){return{execute:function(){var e=this;return e._selectedDocument.getProject().then(function(t){return e._fixDuplicateConfigId().then(function(){return e.context.service.run.getProjectSettingContent().then(function(n){return e.context.service.run.open(n,t.getTitle())})})})},isAvailable:function(){return this.context.service.run.isRunConfigurationViewActive().then(function(e){return!e})},isEnabled:function(){var e=this,t=[];return t.push(this.context.service.perspective.getCurrentPerspective()),t.push(this.context.service.run.getSelectedDocument()),t.push(this.context.service.run.getRunnersForSelectedProject()),Q.spread(t,function(t,n,r){return"development"===t&&n&&r&&r.length>0?(e._selectedDocument=n,!0):(e._selectedDocument=void 0,!1)})},_fixDuplicateConfigId:function(){var t=this;return this.context.service.configurationhelper.getAllPersistedConfigurations(this._selectedDocument).then(function(n){for(var r=[],i=0;i=0)){var o=n[i]._metadata.id,a=e.findLastIndex(n,function(e){return e._metadata.id===o});a>=0&&a!==i&&r.push(a)}var s=[];for(i=0;i0?t.context.service.configurationhelper.writeConfigurationsToFile(n):void 0})})}}}),define("sap.watt.ideplatform.run/service/Run",["sap.watt.platform.commandgroup/module/ActionItem","sap/watt/lib/lodash/lodash","sap.watt.ideplatform.run/util/DocumentWindowsUtil","sap.watt.ideplatform.run/command/RunCommand","sap.watt.ideplatform.run/command/RunPerformanceCommand","sap.watt.ideplatform.run/command/RunAsCommand","sap.watt.ideplatform.run/error/ConfigurationError"],function(e,t,n,r,i,o,a){"use strict";var s=function(e){this.isFree=!0,this.oCommand=e.command,this.oCommand.setValue(e.index,"runAsCommandId")};s.prototype.assign=function(e){this.isFree=!1,this.sRunnerId=e.sRunnerId},s.prototype.free=function(){this.isFree=!0,this.sRunnerId=null};var u=function(e){this.sId=e.id,this.oService=e.service,this.displayName=e.displayName,this.aProjectTypesIds=e.projectTypesIds,this.fileTypes=e.fileTypes,e.internalOnly&&(this.internalOnly=e.internalOnly),this.registerRunConsole=e.registerRunConsole,this.bOpenNewWindow=!(e.doNotOpenNewWindow===!0)},c={_runAsCommands:[],_runners:{},_oMainDialogfragment:null,_oDocumentWindowsUtil:n,configure:function(e){if(e){for(var t=this._sortRunners(e.runners),n=0;n0&&(1===n.length?e._aSelectedDocuments=n:e._aSelectedDocuments=null),e._aSelectedDocuments){var r=e._aSelectedDocuments[0].document;if(r&&!r.getEntity().isRoot())return r}return null})})},_getProjectTypes:function(e){var n=this,r=[];return e?n.context.service.projectType.getProjectTypes(e).then(function(e){return t.forEach(e,function(e){e.isBuiltIn?r.unshift(e.id):r.push(e.id)}),r}):Q(r)},getRunnersForSelectedProject:function(){var e=this;return this.getSelectedDocument().then(function(t){return e.getRunnersForDocument(t)})},getRunnersForDocument:function(e){var n=this;return this._getProjectTypes(e).then(function(e){var r=[];return t.forEach(e,function(e){t.forEach(t.values(n._runners),function(t){t.aProjectTypesIds.indexOf(e)!==-1&&r.push(t)})}),r=t.uniqBy(r,"sId"),n._sortRunners(r)})},getRunnerForProject:function(e,n){return this.getRunnersForDocument(e).then(function(e){return t.find(e,{sId:n})})},isAppUrlRelevant:function(e){var t=this;return t.context.service.filesystem.documentProvider.getDocument(e).then(function(e){return t.context.service.configurationhelper.getRunnerAndConfiguration(e)}).then(function(e){return e.oRunner.oService.isAppUrlRelevant()}).then(function(e){return e=e!==!1})},getItems:function(e){var t=this;return"run.runAsGroup"===e?(this._freeAllRunAsCommands(),this.getRunnersForSelectedProject().then(function(e){for(var n=[],r=0;r0?e.setActiveItem(t[0]):e.unsetActiveItem()}).done()}).done(),this.context.service.runcommandstate.setSelectedConfigurationState({configuration:e}).done(),this.context.service.command.invalidateAll().done()},_getWindowForRunner:function(e,t){var r="config_"+t._metadata.id,i=n.getWindow(r);return i&&n.closeWindow(r),n.renameWindow(e,r),i=n.getWindow(r),n.closeWindow(e),i},_handleHasIssues:function(e,t){var r=this;if(n.closeWindow(t),this.isRunConfigurationViewActive())return this._runConfigurationsController.selectConfiguration(e),Q();this._oConfigurationIdWithIssues=e._metadata.id;var i=e._metadata.displayName;r.context.service.usagemonitoring.report("runConfiguration","configurationError",e._metadata.runnerId).done();var o=this.context.i18n.getText("i18n","error_notification",[i]);return this._openDialog(o).then(function(t){if(t)return r.context.service.command.getCommand("run.runConfigurations").then(function(t){return t.execute(e)})})},_openDialog:function(e){var t=Q.defer(),n=(new sap.ui.commons.Dialog).addStyleClass("runConfigurationExceptionDialog sapUiSizeCompact");n.setTitle(this.context.i18n.getText("i18n","run_Error"));var r=new sap.ui.commons.TextView;r.setText(e),n.addContent(r),n.setModal(!0),n.setMinWidth("600px");var i=this;return n.addButton(new sap.m.Button({text:i.context.i18n.getText("i18n","run_OpenRunConfigurations"),press:function(){n.close(),t.resolve(!0)}})),n.addButton(new sap.m.Button({text:i.context.i18n.getText("i18n","run_Cancel"),press:function(){n.close(),t.resolve(!1)}})),n.open(),t.promise},getRunnersWithConfigurations:function(){var e=this,n=[this.getRunnersForSelectedProject(),this.getSelectedDocument()];return Q.spread(n,function(n,r){return e.context.service.configurationhelper.getAllPersistedConfigurations(r).then(function(r){var i=[],o=[];return t.forEach(n,function(n){var a={};a.runner=n,a.configurations=[];var s=n.sId;t.forEach(r,function(e){e._metadata.runnerId===s&&a.configurations.push(e)}),i.push(a),o.push(e._updateConfigurationsHasIssuesState(n,a.configurations))}),Q.all(o).then(function(){return i})})})},_updateConfigurationsHasIssuesState:function(e,n){var r=[];return this.getSelectedDocument().then(function(i){return!i||t.isEmpty(n)?Q():(t.forEach(n,function(n){r.push(e.oService.isConfigurationValid(t.cloneDeep(n),i))}),Q.all(r).then(function(){for(var e=0;e0?this.context.service.runconfigurationhistory.remove(e):Q()},onDocumentDeleted:function(e){var t=e.params.document;if(t.getEntity().isProject()||".user.project.json"===t.getEntity().getName()){var n=this;return t.getProject(!0).then(function(e){var t=e.getEntity().getFullPath();return n.context.service.runconfigurationhistory.removeByProjectPath(t)})}},getUserPreferenceContent:function(){},saveUserPreference:function(){},_sortRunners:function(e){if(0===e.length)return e;for(var t=["webapprunner","qunitrunner","fiorirunner","embeddedrunner"],n=[-1,-1,-1,-1],r=[],i=[],o=0;o0?e.setActiveItem(t[0]):e.unsetActiveItem()}).done()}).done()}}}),define("sap.watt.ideplatform.run/service/ConfigurationHelper",["sap/watt/lib/lodash/lodash"],function(e){"use strict";var t=function(e,t){if(0===t.indexOf("*")){var n=e.getEntity().getFullPath(),r=t.substr(2);return n.substr(n.length-r.length)===r}var i=e.getEntity().getName();return i===t},n=function(e,n,r){for(var i=0;i0){var r=n[0];return t.context.service.run.getRunnerForProject(e,r._metadata.runnerId).then(function(e){return{oConfiguration:r,oRunner:e}})}return i(e,t.context).then(function(n){return n?t.getConfigurationForRunner({oSelectedDocument:e,oRunner:n}).then(function(e){return{oConfiguration:e,oRunner:n}}):{oConfiguration:void 0,oRunner:void 0}})})})},createConfiguration:function(e,t,n,r,i){var o=this;return r=!!r&&r,e?e.oService.createDefaultConfiguration(t,r,n).then(function(n){if(n)return o._getOtherConfigurationNames(r,i).then(function(r){return t.getProject().then(function(i){return o._createConfigurationMetadata(e,r,n,i).then(function(r){return n._metadata=r,e.oService.isConfigurationValid(n,t).then(function(e){return e.bValid||(n._metadata.hasIssues=!0),n})})})})}):Q()},extendRunnerConfiguration:function(e,t,n,r,i){var o=this;return t&&e?o._getOtherConfigurationNames(!0,r).then(function(r){return n.getProject().then(function(a){return o._createConfigurationMetadataGivenName(i,t,r,a).then(function(r){return e._metadata=r,t.oService.isConfigurationValid(e,n).then(function(t){return t.bValid||(e._metadata.hasIssues=!0),e})})})}):Q()},getAllPersistedConfigurations:function(e){return this.context.service.setting.user.get(this.context.service.run,e).then(function(e){return e||[]})},writeConfigurationsToFile:function(e,t){var n=this,r=t?Q(t):this.context.service.run.getSelectedDocument();return r.then(function(t){return n.context.service.setting.user.set(n.context.service.run,e,t).then(function(){n.context.event.fireRecentConfigurationsSaved({document:t,configurations:e}).done()})}).fail(function(e){return n.context.service.usernotification.alert(e.message).done(),Q.reject(e.message)})}}}),define("sap.watt.ideplatform.run/service/ProjectRecentlyUsedProvider",["sap.watt.platform.commandgroup/module/ActionItem","sap/watt/lib/lodash/lodash","sap.watt.ideplatform.run/command/RunAsCommand"],function(e,t,n){"use strict";return{_updateConfiguration:function(e,t){var r={};return r.oConfiguration=t,r.oSelectedDocument=e,r.oContext=this.context,n.getRunnableDocument(r).then(function(e){t.oRunnableDocument=e})},_getConfigurations:function(e){var t=this,n=[];return this.context.service.configurationhelper.getAllPersistedConfigurations(e).then(function(r){for(var i=0;i5&&(s=!0,a=t.slice(a,0,5)),s){r.setValue({type:"moreRunConfiguration",value:"moreRunConfiguration"},"moreProjectRunner");var u=new e({id:"moreProjectRunner",label:n.context.i18n.getText("i18n","run_MoreRunConfigurations")},r);a.push(u)}return a})})})})}}}),define("sap.watt.ideplatform.run/service/ListConfigurationsProvider",["sap.watt.platform.commandgroup/module/ActionItem","sap/watt/lib/lodash/lodash"],function(e,t){"use strict";return{getItems:function(){var n=this;return this.context.service.command.getCommand("run.selectConfiguration").then(function(r){return n.context.service.selection.getSelection().then(function(i){var o=[];if(1!==i.length)return n._emptyActionItems(o);var a=i[0].document;if(a.getEntity().isRoot())return n._emptyActionItems(o);var s={};return s.oSelectedDocument=a,n._isRunEnabled(s).then(function(i){return i?n.context.service.configurationhelper.getAllPersistedConfigurations(a).then(function(i){ var a;return t.forEach(i,function(n){var i="listConfigurations"+n._metadata.id,s=t.findIndex(o,function(e){return e.getId()===i});if(!(s>=0)){a||(a=i);var u=n._metadata.displayName,c=new e({id:i,label:u,iconLabel:u},r);c.setValue({configuration:n},i),o.push(c)}}),n.context.service.runcommandstate.getSelectedConfigurationState().then(function(e){return!e&&a?r.execute(r.getValue(a)).then(function(){return o}):o})}):n._emptyActionItems(o)})})})},_isRunEnabled:function(e){return this.context.service.command.getCommand("preview.run").then(function(e){return e.getState()}).then(function(e){return e.enabled})},_emptyActionItems:function(e){return this.context.service.runcommandstate.setSelectedConfigurationState(void 0).done(),e}}}),define("sap.watt.ideplatform.run/util/AppCacheBusterHelper",[],function(){"use strict";return{SETTINGS_FILE_NAME:"sap-ui-cachebuster-info.json",_oCreatePromise:Q(),_getSettingsDocument:function(e,t,n,r){var i=this;return this._oCreatePromise=this._oCreatePromise.then(function(){return n.service.filesystem.documentProvider.getRoot().then(function(t){var o=e.getEntity().getFullPath();return t.getCurrentMetadata().then(function(t){for(var a=0;albl_error}"}).addStyleClass("runConfigRtt");e.setTooltip(n)},_createControlData:function(e,t,n,r,i){var o={oControl:e,sControlId:t,isControlValid:n,sInvalidMessage:r,sValidMessage:i};return o},_getSelectedItem:function(e){var t=e.getAggregation("_dropdownList"),n=t.getSelectedItemId(),r=t.getItems(),i=r.filter(function(e){return e.sId===n}),o=i.length>0?i[0]:void 0;return o},_getItemKeyContainedInPath:function(e,t){if(t)for(var n=e.getAggregation("_dropdownList"),r=n.getItems(),i=0;i-1)return a}return""},_invalidKeyHandler:function(e,t){var n,r=e.getItems(),i=t.getData();1===r.length&&e.insertItem(new sap.ui.core.ListItem({key:"",text:"",additionalText:""})),n="",i.filePath=n,t.setData(i)},_validateAfterPathFieldRendering:function(e){var t=this,n=e.srcControl,r=n.getModel(),i=r.getData(),o=n.getAggregation("_dropdownList"),a=i.filePath,s=t._getItemKeyContainedInPath(n,a);s||t._invalidKeyHandler(o,r),o.setSelectedKey(s);var u=t._getSelectedItem(n);return u&&u.setText(s),t.validatePathInput(s).then(function(e){return t._createControlData(n,n.getId(),e.isValid,e.message,s)})},_validatePathFieldChange:function(e){var t=this,n="",r=e.getSource(),i=e.getParameter("selectedItem");if(null!=i){n=i.getKey();var o=i.getId()}var a=t._getSelectedItem(r);return a&&a.setText(n),t.validatePathInput(n).then(function(e){var i=r.getModel(),a=i.getData();return a.filePath=n,r.getAggregation("_dropdownList").setSelectedItemId(o),i.setData(a),t._createControlData(r,r.getId(),e.isValid,e.message,n)})},_validatePath:function(e){var t=this,n={isValid:!0,message:""};return e&&!/^\s*$/.test(e)||(n.isValid=!1,n.message=t.context.i18n.getText("msg_file_path_empty")),Q(n)}}),define("sap.watt.ideplatform.run/service/controlservices/RunConfigWithMock",[],function(){"use strict";return{_oController:void 0,getControl:function(){var e=this;return this._oController=this.context.service.withmockhandler,Q.sap.ui.define(["sap/watt/ideplatform/plugin/run/ui/WithMockControl"]).then(function(t){var n=new t({oController:e._oController});return n})}}}),define("sap.watt.ideplatform.run/service/handler/WithMockHandler",{updateCB:function(e,t,n){var r=e.getSource().getModel();r.setProperty(t,n?0:1)}}),define("sap.watt.ideplatform.run/service/controlservices/RunConfigPreview",[],function(){"use strict";return{_oController:void 0,getControl:function(){var e=this;return this._oController=this.context.service.previewhandler,Q.sap.ui.define(["sap/watt/ideplatform/plugin/run/ui/PreviewControl"]).then(function(t){var n=new t({oController:e._oController,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"})});return n})}}}),define("sap.watt.ideplatform.run/service/handler/PreviewHandler",{updatePreviewSelected:function(e,t,n){var r=e.getSource().getModel(),i=e.getSource(),o=r.getProperty(t);o===n&&i.setPressed(!0),r.setProperty(t,n)},onIconPressed:function(e,t,n){var r=e.getSource(),i=r.getParent(),o=i.getContent()[1];e.oSource=o,this.updatePreviewSelected(e,t,n)}}),define("sap.watt.ideplatform.run/service/controlservices/RunConfigurationUi5Versions",[],function(){"use strict";var e={_oController:void 0,getControl:function(e,t,n,r){var i=this;return this._oController=this.context.service.ui5versionhandler,this._oController.setServiceData(e,t,n,r).then(function(){return Q.sap.ui.define(["sap/watt/ideplatform/plugin/run/ui/Ui5VersionsCompositeControl"]).then(function(e){var o=new e({text:"{i18n>title_run_config_ui_a2a_ui5version}",layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"}),dropDownBoxItems:t,oController:i._oController,sUI5CurrentVersion:n,sUI5MinimalVersion:r});return o})})}};return e}),define("sap.watt.ideplatform.run/service/handler/Ui5VersionHandler",{_oDocument:null,_aUi5Version:null,_sUI5CurrentVersion:null,_sUI5MinimalVersion:null,setServiceData:function(e,t,n,r){this._oDocument=e,this._aUi5Version=t,this._sUI5CurrentVersion=n,this._sUI5MinimalVersion=r},getDocument:function(){return this._oDocument},getUIVersions:function(){return this._aUi5Version},rbSelectedUpdateModel:function(e,t){var n,r=e.getModel();r.setProperty("/isDefaultVersion",t),1!==t?r.setProperty("/ui5VerSource",null):(n=r.getProperty("/ui5ActiveVersion"),n&&null!==n&&""!==n||(n=this._sUI5CurrentVersion&&""!==this._sUI5CurrentVersion&&_.findIndex(this._aUi5Version,"value",this._sUI5CurrentVersion)>=0?this._sUI5CurrentVersion:this._getFirstVersionValueIfExists(),r.setProperty("/ui5ActiveVersion",n)))},_getFirstVersionValueIfExists:function(){var e=this._aUi5Version;if(e&&null!==e&&e.length>0)return e[0].value},dropdownBoxChangeUpdateModel:function(e,t){var n=e.getModel();if(n.setProperty("/isDefaultVersion",1),t&&this._aUi5Version&&this._aUi5Version.length>0){var r=_.find(this._aUi5Version,function(e){if(e.value===t)return e});n.setProperty("/ui5VerSource",r.source)}else n.setProperty("/ui5VerSource",null)},rbGetSelectedIndex:function(e){var t=e.getModel(),n=t.getProperty("/isDefaultVersion");return n},updateModelDropdownField:function(e){var t=e.getModel(),n=t.getProperty("/ui5ActiveVersion");n=_.findIndex(this._aUi5Version,"value",n)>=0?n:this._aUi5Version[0].value,t.setProperty("/ui5ActiveVersion",n)}}),define("sap.watt.ideplatform.run/service/controlservices/RunConfigResourceMapping",[],function(){"use strict";return{_oController:void 0,_extservice:void 0,configure:function(e){e&&e.externalservices&&e.externalservices.length>0&&(this._extservice=e.externalservices[0].service)},getControl:function(e){var t=this;return this._oController=this.context.service.resourcemappinghandler,this._oController.setServiceData(e,this._extservice).then(function(){return Q.sap.ui.define(["sap/watt/ideplatform/plugin/run/ui/ResourceMappingControl"]).then(function(e){return Q.sap.ui.define(["sap/watt/ideplatform/plugin/run/ui/ReuseLibraryElement"]).then(function(n){var r=new n({oController:t._oController}),i=new e({layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"}),oController:t._oController,rows:{path:"/appsVersion",template:r}});return i})})})}}}),define("sap.watt.ideplatform.run/service/handler/ResourceMappingHandler",{_oDocument:null,_extservice:null,setServiceData:function(e,t){this._oDocument=e,this._extservice=t},getDocument:function(){return this._oDocument},setOption:function(e,t){var n=["withoutWorkspace","withWorkspace"],r=e.getSource(),i=r.getModel();i.setProperty("/workspace",n[t])},onGetLibsVersionsClick:function(e){var t=this,n=e.getSource(),r=n.getModel();return this.getLibVersions(r).then(function(e){r.setProperty("/appsVersion",e),t._scrollToBottom()})},_scrollToBottom:function(){setTimeout(function(){var e=$(".sapUiHSplitterSecondPane"),t=e.height();e&&e.scrollTop(t)},100)},onLibVersionChange:function(e){var t=e.getSource(),n=t.getModel();n.setProperty(t.getBindingContext().getPath()+"/libraryVersion",t.getSelectedKey())},onResourceMappingChange:function(e){var t=this,n=e.getSource(),r=n.getChecked();t.setOption(e,r===!1?0:1)},getLibVersions:function(e){var t=this,n=[],r=!1;return this._extservice?t.context.service.neoapp.getAppllications(t._oDocument).then(function(i){if(i.length>0){if(void 0!==e){var o=e.getProperty("/workspace/");"withWorkspace"===o&&(r=!0)}return t._extservice.getLibsFromHCPandWorkspace(r).then(function(t){var r=t.hcp,o=t.ws;for(var a in i){var s=_.find(o,{externalName:i[a].name}),u=_.find(r,{externalName:i[a].name});if(void 0!==u&&void 0===s){var c,l,p=[{version:"Active",details:"Active"}];for(var f in u.versions)if(void 0!==u.versions[f].version){var d=u.versions[f].version;u.versions[f].isActive&&(c=u.versions[f].version),i[a].version===u.versions[f].version&&(l=u.versions[f].version),p.push({version:u.versions[f].version,details:d})}var h=void 0===i[a].version?"Active":i[a].version;n.push({libraryName:i[a].name,versions:p,activeVersion:c,neoappVersion:l,libraryVersion:h,detailVersion:h})}else n.push({libraryName:i[a].name,versions:[{version:"Workspace",details:"Version from Workspace"}]})}if(void 0!==e){var m=e.getProperty("/appsVersion/");if(void 0!==m)for(var g=0;glbl_error}"}).addStyleClass("runConfigRtt");e.setTooltip(n)},validateUrlParameter:function(e,t){var n={isValid:!0,message:""};return e&&!/^\s*$/.test(e)||!t||""===t?(n.isValid=!0,Q(n)):(n.isValid=!1,n.message=this.context.i18n.getText("msg_appl_param_empty"),Q(n))}}),define("sap.watt.ideplatform.run/service/controlservices/RunConfigDestinationMapping",[],function(){"use strict";return{_oController:void 0,getControl:function(e,t,n){var r=this;return this._oController=this.context.service.destinationmappinghandler,this._oController.setServiceData(e,t,n).then(function(){return Q.sap.ui.define(["sap/watt/ideplatform/plugin/run/ui/DestinationMappingControl"]).then(function(e){return Q.sap.ui.define(["sap/watt/ideplatform/plugin/run/ui/DestinationMappingRowControl"]).then(function(t){var n=new t({layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"}),oController:r._oController}),i=new e({oController:r._oController,rows:{path:"/backendSystem",template:n}});return i})})})}}}),define("sap.watt.ideplatform.run/service/handler/DestinationMappingHandler",[],function(){"use strict";return{_oDocument:null,_aSourceDestinations:null,_aTargetDestinations:null,setServiceData:function(e,t,n){this._oDocument=e,this._aSourceDestinations=t,this._aTargetDestinations=n},getDocument:function(){return this._oDocument},getSourceDestinations:function(){return this._aSourceDestinations},getTargetDestinations:function(){return this._aTargetDestinations},getBackendSystemModel:function(e){return e.getProperty("/backendSystem")},onTargetChanged:function(e,t,n){var r=e.getProperty("/backendSystem");r[t].destinations=n,e.setProperty("/backendSystem",r)},updateModel:function(e){var t=e.getModel().getProperty("/backendSystem"),n=this._aSourceDestinations,r=this._aTargetDestinations;if(t){if(!this._isModelUpdated(t,n)){for(var i=0;i0)for(var s=0;s0&&t.sort(this._backendSystemsCompare),e.getModel().setProperty("/backendSystem",t)}}else if(t=[],n&&n.length>0){for(var s=0;s0&&t&&t.length>0){if(!e||e.length!=t.length)return!1;for(var n=0;nt.source?1:0}}}),define("sap.watt.ideplatform.run/service/util/FileSearchUtil",{getRunnableFiles:function(e,t){var n=this;return e.getProject().then(function(e){if(null!==e){var r=e.getEntity();return r.isRoot()?null:e.getCurrentMetadata(!0,{hidden:!1}).then(function(e){var r=[],i=n._getValidationFunc(t);return n._searchRunnableFiles(e,r,i),r})}return null})},getRunnableDocument:function(e,t){var n=this,r=t+"/";return _.startsWith(e+"/",r)||(e=t+e),this.context.service.filesystem.documentProvider.getDocument(e).then(function(r){return r?r:(e=t+e,n.context.service.filesystem.documentProvider.getDocument(e))})},_getValidationFunc:function(e){var t=this;e||(e={include:[],exclude:[]});var n=e.include,r=e.exclude;return t._createValidationFunc(n,r)},_createValidationFunc:function(e,t){var n=function(n){try{for(var r=!1,i=!0,o=0;o=0){var t=this._oFilesTable.getModel().getProperty("/aFileList");this._sSelectedFilePath=t[e].fullPath}},enableOK:function(){this._oFilesTable.getSelectedIndex()>=0?this._oChooseFilePopupFragment.getButtons()[0].setEnabled(!0):this._oChooseFilePopupFragment.getButtons()[0].setEnabled(!1)},cellClick:function(){if(this._sSelectedFilePath){var t=e.openWindow();e.renameWindow(t,this._sWindowId),this._oChooseFilePopupFragment.close(),t=e.openWindow(),e.renameWindow(t,this._sWindowId),this._oDeferred.resolve(!0)}},getFocusElement:function(){},getTitle:function(){},getTooltip:function(){},setVisible:function(){},isVisible:function(){}};return n}),define("sap.watt.ideplatform.run/service/RunApi",[],function(){"use strict";return{onAllPluginsStarted:function(e){},getApplicationUrl:function(e,t){var n,r=this;return this._getDoc(e).then(function(e){return n=e,r._getRunner(n,t)}).then(function(e){return e.oService.getApplicationUrl(n,t)})},getRunConfigurations:function(e){var t=this;return this._getDoc(e).then(function(e){return t.context.service.configurationhelper.getAllPersistedConfigurations(e)})},_getRunner:function(e,t){return t?this._getRunnerForRunConfiguration(e,t):this._getRunnerForDocument(e)},_getRunnerForRunConfiguration:function(e,t){if(!t._metadata||!t._metadata.runnerId){var n=this.context.i18n.getText("i18n","run_configuration_error");throw this.context.service.log.error("RunApi",n,["user"]).done(),new Error(n)}return this.context.service.run.getRunnerForProject(e,t._metadata.runnerId)},_getRunnerForDocument:function(e){var t=this;return this.context.service.configurationhelper.findRunnerForDocument(e).then(function(e){if(!e){var n=t.context.i18n.getText("i18n","file_not_runnable");throw t.context.service.log.error("RunApi",n,["user"]).done(),new Error(n)}return e})},_getDoc:function(e){var t=this;return this.context.service.filesystem.documentProvider.getDocument(e).then(function(e){if(!e){var n=t.context.i18n.getText("i18n","file_not_found");throw t.context.service.log.error("RunApi",n,["user"]).done(),new Error(n)}return e})}}}),define("sap.watt.ideplatform.runregistry/service/RunRegistry",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{_oRunService:null,LINK_RELATION_WEB:"web url",LINK_RELATION_LOGS:"view logs",configure:function(e){e.setRun.filter(function(e){return"chebackend.run"===e.service._sName}).forEach(function(e){this._oRunService=e.service},this),this._oRunService&&this._oRunService.attachEvent("runProgress",this._fireRunProgress,this)},_fireRunProgress:function(e){this.context.event.fireRunProgress(e.params)},run:function(e,t){var n=this;return n._oRunService?n._oRunService.run(e,t):e.getProject().then(function(e){var t=e.getEntity().getName();n.context.service.log.error(t,n.context.i18n.getText("i18n","error_runservice"),["run"]).done()})},getProcesses:function(e){var t=this;return this._oRunService?this._oRunService.getProcesses(e):e.getProject().then(function(e){var n=e.getEntity().getName();t.context.service.log.error(n,t.context.i18n.getText("i18n","error_getProcessesService"),["run"]).done()})},getProcessInfo:function(t){var n=this,r={};return t?this.getProcesses(t).then(function(t){var i={};if(t){var o=t.length;if(o>0){t=e.orderBy(t,["creationTime"],["desc"]);var a=t[0];i.status=a.status,"RUNNING"===i.status&&(i.url=n._findUrl(a.links,n.LINK_RELATION_WEB),i.logUrl=n._findUrl(a.links,n.LINK_RELATION_LOGS),i.processId=a.processId,i.links=a.links)}r.process=i}return r}):Q(r)},_findUrl:function(e,t){if(Array.isArray(e)){var n=e.find(function(e){return e.rel===t});if(n)return n.href}},getAllProcesses:function(){if(this._oRunService)return this._oRunService.getAllProcesses()},getServiceMetadata:function(e,t){if(this._oRunService)return this._oRunService.getServiceMetadata(e,t)},stop:function(e,t){return this._oRunService?this._oRunService.stop(e,t):void this.context.service.log.error(t,this.context.i18n.getText("i18n","error_stopRunService"),["run"]).done()},refresh:function(e,t){var n=this;return n._oRunService?n._oRunService.refresh(e,t):e.getProject().then(function(e){var t=e.getEntity().getName();n.context.service.log.error(t,this.context.i18n.getText("i18n","error_refreshService"),["run"]).done()})}}}),define("sap.watt.ideplatform.projectType/service/ProjectType",["sap/watt/lib/lodash/lodash"],function(e){"use strict";function t(){this._oDao=null}return t.prototype.configure=function(e){ if(e&&e.dao)return this._oDao=e.dao.service,this._oDao.initProjectType(e);throw new Error("ProjectType dao service must be defined")},t.prototype.getAllTypes=function(e){return this._oDao.getAllTypes(e)},t.prototype.getType=function(e){return this._oDao.getType(e)},t.prototype.getIncludedTypes=function(e){return this._oDao.getIncludedTypes(e)},t.prototype.getProjectTypes=function(e){return this._oDao.getProjectTypes(e)},t.prototype.hasProjectType=function(t,n){return this.getProjectTypes(t).then(function(t){return e.isArray(t)&&e.includes(e.map(t,"id"),n)})},t.prototype.getProjectTypesPerCategories=function(e){return this._oDao.getProjectTypesPerCategories(e)},t.prototype.addProjectTypes=function(e,t){var n=this;return this._oDao.addProjectTypes(e,t).then(function(e){return n._fireProjectTypesUpdated(e)})},t.prototype.removeProjectTypes=function(e,t){var n=this;return this._oDao.removeProjectTypes(e,t).then(function(e){return n._fireProjectTypesUpdated(e)})},t.prototype.setProjectTypes=function(e,t){var n=this;return this._oDao.setProjectTypes(e,t).then(function(e){return n._fireProjectTypesUpdated(e)})},t.prototype.updateDecorations=function(e){var t=e.params.projectDocument;this.context.service.decoration.updateDecorations(t,!1,e)},t.prototype._fireProjectTypesUpdated=function(e){if(e&&(e.bForce||e.aAddedTypes.length>0||e.aRemovedTypes.length>0)){var t=this;return e.oTargetDocument.getProject().then(function(n){return t.context.event.fireProjectTypesUpdated({projectDocument:n,added:e.aAddedTypes,removed:e.aRemovedTypes})})}return Q()},new t}),define("sap.watt.ideplatform.projectType/service/ProjectTypeDecorator",{decorate:function(e){return e.getEntity().isProject()?this.context.service.projectType.getProjectTypes(e).then(function(e){if(e&&e.length>0){var t=e[0],n=t.icon;if(n)return{decoratorIconTopLeft:n};var r=t.decoratorIconStyleClass;if(r)return{decoratorIconStyleClass:r}}}):Q()}}),define("sap.watt.ideplatform.projectType/service/ProjectTypeConfig",["sap/watt/platform/plugin/platform/service/ui/AbstractConfig"],function(e){"use strict";return e.extend("sap.watt.ideplatform.projectType.service.ProjectTypeConfig",{_types:[],_dataModel:new sap.ui.model.json.JSONModel,_oProjectTypeConfigForm:void 0,init:function(){return this.context.service.resource.includeStyles([{uri:"sap.watt.ideplatform.projectType/css/projectTypeStyles.css",type:"css"}])},saveProjectSetting:function(e,t,n){var r=[];$.each(this._types,function(e,t){t.exists&&r.push(t.id)});var i=this;return n?this._getDocumentByPath(n).then(function(e){return i.context.service.projectType.setProjectTypes(e,r).then(function(){i.context.service.projectType.context.event.fireProjectTypeConfigSaved().done()})}):void 0},getProjectSettingContent:function(e,t,n){var r=this;return this._oProjectTypeConfigForm&&this._oProjectTypeConfigForm.isActive()?this._oProjectTypeConfigForm:this._getDocumentByPath(n).then(function(e){return r._initAllTypes(e).then(function(){return r.context.service.projectType.getProjectTypes(e).then(function(t){return r._handleProjectTypes(t,e),r._getUI()})})})},_initAllTypes:function(e){this._types=[];var t=this;return this.context.service.projectType.getAllTypes(e).then(function(e){var n=[];return $.each(e,function(e,r){r.isBuiltIn=!!r.isBuiltIn,r.isDefault=!!r.isDefault,r.exists=!1,r.isAvailable=!0,r.bMixable===!1&&(r.isAvailable=!1),r.enabled=!0,t._types.push(r),r.service&&r.service.isAvailable?n.push(r.service.isAvailable().then(function(e){if(r.isAvailable=e,e){if(r.service.isEnabled)return r.service.isEnabled().then(function(e){r.enabled=e})}else r.enabled=!1})):r.service&&r.service.isEnabled&&n.push(r.service.isEnabled().then(function(e){r.enabled=e}))}),Q.all(n)})},_setTypeBuiltIn:function(e,t){$.each(this._types,function(n,r){r.id===e&&(r.isBuiltIn=t)})},_setTypeExists:function(e,t){$.each(this._types,function(n,r){r.id===e&&(r.exists=t)})},_updateModel:function(){this._dataModel.setData(this._types)},_getBindingContextPath:function(e){return e.getPath()},_getModelObject:function(e,t){return e.getObject(t)},_getChangeHandler:function(){var e=this;return function(){var t=e._getBindingContextPath(this.getBindingContext()),n=e._getModelObject(this.getModel(),t),r=this.getChecked();return e._setTypeExists(n.id,r),r?void e.context.service.projectType.getIncludedTypes(n.id).then(function(t){$.each(t,function(t,n){e._setTypeExists(n,!0)}),e._updateModel()}):e._isUserConfirmConfigurationRemoval().then(function(t){t.bResult||(e._setTypeExists(n.id,!0),e._updateModel())})}},_handleProjectTypes:function(e){var t=this;$.each(e,function(e,n){var r=n.id;t._setTypeExists(r,!0),n.isBuiltIn&&t._setTypeBuiltIn(r,!0)}),t._updateModel()},_setBaseTypeUIPart:function(){var e=new sap.ui.layout.form.FormContainer({layoutData:new sap.ui.core.VariantLayoutData({multipleLayoutData:[new sap.ui.layout.GridData({span:"L4 M4 S4"})]})}),t=new sap.ui.core.Title({text:this.context.i18n.getText("i18n","project_type_base_type_title")});e.setTitle(t);var n=new sap.ui.commons.TextView({text:"{displayName}"}),r=new sap.ui.commons.RowRepeater({rows:{path:"/",template:n,filters:[new sap.ui.model.Filter("isBuiltIn",sap.ui.model.FilterOperator.EQ,!0)]},design:sap.ui.commons.RowRepeaterDesign.Transparent}).addStyleClass("projectTypeConfigBaseTypeRowRepeater");r.setModel(this._dataModel);var i=new sap.ui.layout.form.FormElement;return i.addField(r),e.addFormElement(i),e},_setAdditionTypesUIPart:function(){var e=this,t=new sap.ui.layout.form.FormContainer,n=new sap.ui.core.Title({text:this.context.i18n.getText("i18n","project_type_additional_types_title")});t.setTitle(n);var r=new sap.ui.commons.TextView({text:this.context.i18n.getText("i18n","project_type_config_description")}),i=new sap.ui.layout.form.FormElement;i.addField(r),t.addFormElement(i);var o=new sap.ui.table.Table({selectionMode:sap.ui.table.SelectionMode.None,visibleRowCount:e._types.filter(function(e){return!e.isBuiltIn}).length});o.addColumn(new sap.ui.table.Column({label:new sap.ui.commons.Label({text:this.context.i18n.getText("i18n","project_type_column_selected")}),template:new sap.ui.commons.CheckBox({change:this._getChangeHandler()}).bindProperty("checked","exists").bindProperty("enabled","enabled").addStyleClass("oAdditionTypesCB"),width:"100px"})),o.addColumn(new sap.ui.table.Column({label:new sap.ui.commons.Label({text:this.context.i18n.getText("i18n","project_type_column_project_type")}),template:(new sap.ui.commons.TextView).bindProperty("text","displayName").addStyleClass("oAdditionTypesLabel"),width:"200px"})),o.addColumn(new sap.ui.table.Column({label:new sap.ui.commons.Label({text:this.context.i18n.getText("i18n","project_type_column_description")}),template:(new sap.ui.commons.TextView).bindProperty("text","description").addStyleClass("oAdditionTypesLabel")})),o.setModel(e._dataModel);var a=[new sap.ui.model.Filter("isBuiltIn",sap.ui.model.FilterOperator.EQ,!1),new sap.ui.model.Filter("isAvailable",sap.ui.model.FilterOperator.EQ,!0)];o.bindRows("/",void 0,void 0,a);var s=new sap.ui.layout.form.FormElement;return s.addField(o),t.addFormElement(s),t},_getUI:function(){var e=this,t=e._setBaseTypeUIPart();if("xs2"!==sap.watt.getEnv("server_type"))var n=e._setAdditionTypesUIPart();return this._oProjectTypeConfigForm=new sap.ui.layout.form.Form({layout:new sap.ui.layout.form.GridLayout,formContainers:[t,n]}).addStyleClass("projectTypeConfigform"),this._oProjectTypeConfigForm},_getDocumentByPath:function(e){return this.context.service.document.getDocumentByPath(e)},_isUserConfirmConfigurationRemoval:function(){var e=this.context.i18n.getText("i18n","project_type_remove_project_type_confirm",[]),t=this.context.service.usernotification;return t.confirm(e)}})}),define("sap.watt.ideplatform.projectToolBox/service/ProjectToolBoxFactoryImpl",["sap/watt/lib/lodash/lodash"],function(e){"use strict";function t(e){this.services=e}var n={};return{configure:function(e){},getInstance:function(e){var r;return r=n.hasOwnProperty(e)?n[e]:new t(this.context.service)},onProjectTypeUpdated:function(e){return Q()}}}),define("sap.watt.ideplatform.runconsole/command/openRunConsole",["sap.watt.common.perspective/command/AbstractUIPartToggler"],function(e){"use strict";var t=function(){e.apply(this,arguments)};return t.prototype=jQuery.extend({},e.prototype,{isAvailable:function(){return e.prototype.isAvailable.apply(this,arguments).then(function(e){return e})}}),t}),define("sap.watt.ideplatform.runconsole/service/RunConsole",["sap/watt/platform/plugin/platform/service/ui/AbstractPart","sap.watt.ideplatform.run/util/DocumentWindowsUtil","sap/watt/lib/lodash/lodash"],function(e,t,n){"use strict";var r="web url",i="view logs",o=e.extend("sap.watt.ideplatform.plugin.runconsole.service.RunConsole",{_oCurrentDocument:null,_oView:null,_aTargets:null,_aProjectTypes:null,_runConsoleProvider:null,_sProjectPath:null,_oDocumentWindowsUtil:t,_sFormat:"",_iMaxLineCount:0,configure:function(e){if(e){var t;for(t=0;t0&&(this._runConsoleProvider=e.runConsoleProvider[0].service),e.setRunprogress.forEach(function(e){var t=e.service;t&&t.attachEvent("runProgress",this.onRunProgressChange,this)},this)}},init:function(){this._aTargets={},this._aProjectTypes={},this.context.service.log.attachEvent("changed",this.onLoggerEvent,this),this.context.service.selection.attachEvent("changed",this.onSelectionEvent,this),this.context.service.document.attachEvent("deleted",this.onDeletedDocument,this),this.context.service.run.attachEvent("runConfigurationExecuted",this.onRunConfigurationExecuted,this),this.context.service.runconsole.attachEvent("visibilityChanged",this.onVisibilityChanged,this)},isProjectTypeSupported:function(e){var t=!1,n=this._getDocumentType(e);return n&&this._aProjectTypes[n]&&(t=!0),t},onVisibilityChanged:function(e){e.params.visible&&this._getView().getController()._scrollToBottom()},_getView:function(){if(!this._oView){this._oView=sap.ui.view("RunConsole",{viewName:"sap.watt.ideplatform.plugin.runconsole.view.RunConsole",type:sap.ui.core.mvc.ViewType.XML,viewData:{context:this.context}}),this.context.i18n.applyTo(this._oView);var e=this._oView.getController();e._sFormat=this._sFormat,e._iMaxLineCount=this._iMaxLineCount}return this._oView},writeToLog:function(e,t){this.context.service.log.error(e,t,["run"]).done()},getContent:function(){return this._getView()},onLoggerEvent:function(e){var t=this,n=e.params.target;if(this._aTargets[n]){var r=e.params.node;if(r&&r.tag)return t.context.service.filesystem.documentProvider.getDocument(r.tag).then(function(e){if(e)return e.getProject(!0).then(function(e){var n=t._getView().getController(),i=e.getEntity().getFullPath();return n.addMessage(r,i)})}).fail(function(){})}},onSelectionEvent:function(e){var t=this;return t._getSelectedProject().then(function(e){if(e&&e.oMTADoc){var n=e.oMTADoc.getEntity().getFullPath();t._sProjectPath=n;var r=t._oCurrentDocument?t._oCurrentDocument.getEntity().getFullPath():null;if(!r||r!==n){var i=t._getView().getController();t._oCurrentDocument=e.oMTADoc;var o=t._getSelectedModulePath(e.oModuleDoc);return i.contextSwitch(n,o)}}})},_getSelectedProject:function(){var e=this.context.service.selection,t=this.context.service.repositorybrowser,n=this.context.service.aceeditor;return Q.all([e.isOwner(t),e.isOwner(n)]).then(function(t){if(t[0]||t[1])return e.isEmpty().then(function(t){if(!t)return e.getSelection().then(function(e){var t=e[0].document;return t.getProject(!0).then(function(e){return t.getProject().then(function(t){return{oMTADoc:e,oModuleDoc:t}})})})})})},_getSelectedModulePath:function(e){var t=this;if(e){var n=t._getDocumentType(e);if(n&&t._aProjectTypes[n])return e.getEntity().getFullPath()}},onDeletedDocument:function(e){var t=this,n=e.params.document;if("folder"===n.getType()){var r=n.getEntity().getFullPath();return n.getProject(!0).then(function(e){if(e){var n=t._getView().getController(),i=e.getEntity().getFullPath();return n.deleteModelEntity(r,i)}})}return Q()},onRunProgressChange:function(e){var t=this,n=this._getView().getController(),o=e.params.sProcessId,a=e.params.sStatus,s=e.params.sProject,u=t._findUrl(e.params.aLinks,i)||"";return this.context.service.run.isAppUrlRelevant(s).then(function(i){if(n.updateRunnerConfigurationProperty(s,o,"processId"),n.updateRunnerConfigurationProperty(s,a,"status"),i){var c=t._findUrl(e.params.aLinks,r);c=t._getUrl(c),n.updateRunnerConfigurationProperty(s,c,"url")}else n.updateRunnerConfigurationProperty(s,"","url");n.updateRunnerConfigurationProperty(s,u,"logUrl")})},stopRun:function(e,t){return this.context.service.runRegistry.stop(e,t).then(function(e){return!(!e||"STOPPED"!==e.status)}).fail(function(e){return!1})},startRun:function(e,t,n){var r,i,o=this,a=this.context.service.run,s=this._getView().getController();return e&&"webapprunner"!==n&&"fiorirunner"!==n&&(i=o.openWindow()),s.getExecutedConfigs(o._sProjectPath).then(function(e){if(e.forEach(function(e){t==e.sModulePath&&(r=e)}),r)return o.context.service.filesearchutil.getRunnableDocument(r.filePath,o._sProjectPath).then(function(e){e.getProject(!0).then(function(t){return a.run(i,r,t,e)})})})},openWindow:function(){return t.openWindow()},getRunner:function(e){return this.context.service.run.getRunnerById(e).then(function(e){return e})},getInitialStatus:function(e){var t={},n=this;return this.context.service.filesystem.documentProvider.getDocument(e).then(function(e){return n.context.service.runRegistry.getProcessInfo(e).then(function(e){if(e){var r=e.process;r?(t.status=r.status,"RUNNING"===t.status&&(t.url=n._getUrl(r.url),t.logUrl=r.logUrl,t.sProcessId=r.processId)):t={status:"FAILED",url:"",logUrl:""}}return t})})},onAllPluginsStarted:function(e){},_findUrl:function(e,t){if(Array.isArray(e)){var r=n.find(e,function(e){return e.rel===t});if(r)return r.href}},_getUrl:function(e){return e&&"xs2"!==sap.watt.getEnv("server_type")?"https://"+e:e},findRunAppFileRelativePath:function(e){var t=this.context.service.run;if(e&&e._metadata)return t.getRunnerById(e._metadata.runnerId).then(function(t){if(t)return t.oService.getAppRunnableFileRelativePath(e)})},_getDocumentType:function(e){if("object"==typeof e&&e.getEntity().isProject()){var t=e.getProjectMetadata();if(t)return t.type}},getConfigurationsExecuted:function(e){var t=this,r={};return this._runConsoleProvider.getLatestConfigurations(e).then(function(e){return n.forIn(e,function(n,i){var o=n.length>0?n[0].moduleType:"";t._aProjectTypes[o]&&(r[i]=e[i])}),r})},onRunConfigurationExecuted:function(e){var t=this,n=e.params.configuration,r=e.params.projectDocument;return r.getProject(!0).then(function(e){var i=r.getEntity().getFullPath(),o=e.getEntity().getFullPath(),a=t._getDocumentType(r),s=t._getDocumentType(e);if(a&&t._aProjectTypes[a]&&s&&"mta"===s){var u=t._getView().getController();return u.onConfigurationExecuted(o,i,n)}})}});return o}),define("sap.watt.ideplatform.preview/command/RunWOFrame",{execute:function(e,t){var n=this.context.service.selection,r=this.context.service.preview;return n.getSelection().then(function(e){return r.showPreview(e[0].document,t,!0)})},isAvailable:function(){return!0},isEnabled:function(){var e=this.context.service.preview;return this.context.service.selection.getSelection().then(function(t){return t.length>0&&e.isExecutable(t[0])})}}),define("sap.watt.ideplatform.preview/service/PreviewImpl",{_sLastUrl:null,_URI_QUERY_SIGN:"?",_URI_PARAM_SIGN:"&",configure:function(e){var t=this,n=sap.watt.getEnv("server_type");"xs2"!==n?e.adapter&&(this._adapter=e.adapter.service):e.cheadapter&&(this._adapter=e.cheadapter.service),this._adapter&&this._adapter.getPreviewUrl().fail(function(){}).done(),this._modes={},e.modes.forEach(function(e){t._modes[e.id]=e.service}),this._runner={},e.runner.forEach(function(e){t._runner[e.id]=e.service,e.service.showPreview().fail(function(){}).done(),e.service.attachEvent("buttonClicked",function(e){return t.context.event.fireButtonClicked(e.params)},t)}),this._preProcessors={},e.preprocessors.forEach(function(e){t._preProcessors[e.id]=e.service})},_addUrlParameters:function(e,t,n){var r=this,i=null;void 0!==n&&(i=n.sPerformanceWrapper),n=r._addOriginalUrl(e,n);var o={};n&&"fiorirunner"!==n.sRunnerId&&(o=n.oUrlParameters,this._addIdeUrlParams(["saml2idp"],o));var a=t;if(o&&o.length>0&&(a=this._addUrlParams(t,o)),i){var s=URI(a);a=s.removeSearch("sap-ui-xx-componentPreload","off"),a=i.indexOf(r._URI_QUERY_SIGN)===-1?require.toUrl(i)+r._URI_QUERY_SIGN+"url="+window.encodeURIComponent(a):require.toUrl(i)+r._URI_PARAM_SIGN+"url="+window.encodeURIComponent(a)}return a},_addIdeUrlParams:function(e,t){for(var n=0;n"),a=e.substr(0,o)+t+e.substr(o);return i.importFile(new Blob([a]),!1,!0,n).then(function(e){return r.context.service.preview.getPreviewUrl(e).then(function(e){return e.toString()})})})})}}),define("sap.watt.ideplatform.preview/service/PreviewFrameRunner",[],function(){return{_aWindows:[],_bEventListenerExists:!1,_bOpenNoFrame:!1,_oCurrentWindow:null,showPreview:function(e,t,n,r){var i=this;if(i._oCurrentWindow=e,!t)return Q();var o,a=t.toString();o=require.toUrl("sap.watt.ideplatform.preview/view/wrapper.html")+"?url="+window.encodeURIComponent(a);var s=window["sap-ide-env"];"about:blank"===a&&"java"===s.server_type&&(o=require.toUrl("/resources/sap/watt/ideplatform/plugin/preview/view/wrapper.html")+"?url="+window.encodeURIComponent(a));var u=Q.defer();u.promise.debugInfo&&(u.promise.debugInfo.finalized=!0);for(var c,l=i._getWindowName(i._oCurrentWindow),p=0;p",_preContainer:"",_postContainer:"",configure:function(){this.context.service.htmlproducer.getAllHtmlExtenders().fail(function(){}).done()},createHtmlFile:function(e,t,n){return this.context.service.filesystem.documentProvider.getDocument(e.getEntity().getParentPath()).then(function(e){return e.importFile(new Blob([n]),!1,!0,t)})},getExtendedHtmlFileContent:function(e,t){return Q(t?this._processHTML(e,t):e)},getExtendedHtmlElements:function(e){var t=this;return this.context.service.htmlproducer.getAllHtmlExtenders().then(function(n){var r={isExtendersExist:!1,isRejectedExtendersExist:!1,aExtenders:null};if(n){for(var i=[],o=0;o0?Q.allSettled(i).then(function(e){if(t._isAnyExtenderRejected(e))return{isExtendersExist:!0,isRejectedExtendersExist:!0,aExtenders:null};var n=t._getExtendersValue(e);return n&&n.length>0?{isExtendersExist:!0,isRejectedExtendersExist:!1,aExtenders:n}:r}):r}return r})},_isAnyExtenderRejected:function(e){var t=!1;return e.forEach(function(e){"rejected"===e.state&&(console.log(e.reason),t=!0)}),t},_getExtendersValue:function(e){return _.flatten(e.filter(function(e){return e.value}).map(function(e){return e.value}))},_processHTML:function(e,t){var n=this;return n._convertBackToHtml(t.reduce(function(e,t){return n._routeExtentionTypes(t,e)},n._parseHtml(e)))},_routeExtentionTypes:function(e,t){switch(e.type){case"script":t=this._routeScriptAction(t,e);break;case"head":break;case"style":}return t},_routeScriptAction:function(e,t){var n=e;switch(t.action){case"new":n=this._createNewScript(e,t);break;case"upd":n=this._updateScript(n,t)}return n},_createNewScript:function(e,t){return null!=t.position?this._insertScriptAfter(e,t):this._insertScriptAsLast(e,t),e},_insertScriptAfter:function(e,t){null!=t.position.anchor&t.position.anchor.length>0&&e.find("#"+t.position.anchor).after("\n\t"+t.content+"\n")},_insertScriptAsLast:function(e,t){var n=e[0].innerHTML.search("(| )*");return e[0].innerHTML=e[0].innerHTML.substr(0,n)+t.content+e[0].innerHTML.substr(n),e},_createHTMLContainer:function(e){return this._preContainer+e+this._postContainer},_updateScript:function(e,t){var n,r=this;if(null!=t.attributes)return t.attributes.forEach(function(t){switch(n=e.find("#"+t.id),t.action){case"upd":r._updateAttribute(n,t);break;case"new":r._insertAttribute(n,t);break;case"del":r._removeAttribute(n,t)}}),e},_updateAttribute:function(e,t){"undefined"!=typeof e.attr(t.name)&&e.attr(t.name,t.content)},_insertAttribute:function(e,t){e.attr(t.name,t.content)},_removeAttribute:function(e,t){e.removeAttr(t.name)},_parseHtml:function(e){e=e.replace(//i,"").replace(/(<\/?(?:html)|<\/?(?:head)|<\/?(?:body))/gi,"$1_temp");var t=this._createHTMLContainer(e);return jQuery(t)},_convertBackToHtml:function(e){var t=this,n=e[0].innerHTML;return n=n.replace(/<\/doctype>/,t._docType).replace(/(<\/?html)_temp/gi,"$1").replace(/(<\/?head)_temp/gi,"$1").replace(/(<\/?body)_temp/gi,"$1")}}),define("sap.watt.ideplatform.snippet/command/InsertSnippet",[],function(){return{isAvailable:function(){return this.context.service.selection.getOwner().then(function(e){return e.instanceOf("sap.watt.common.plugin.aceeditor.service.Editor")})},execute:function(e){var t;t=e.preSnippetInsertionHandler?e.preSnippetInsertionHandler.updateSnippetBeforeInsertion(e.snippetContent,e.currentDocument):Q(e.snippetContent);var n=this;return t.then(function(t){return e.currentEditor.addString(t)}).then(function(){return n.context.service.focus.setFocus(e.currentEditor)}).fail(function(e){var t=n.context.i18n.getText("error_inserting_snippet",[e.message]);return n.context.service.log.error("Snippet",e.message,["user"]).done(),n.context.service.usernotification.alert(t)})}}}),define("sap.watt.ideplatform.snippet/service/Snippet",[],function(){"use strict";return{_mSnippets:{},configure:function(e){var t=this;e.snippets.forEach(function(e){t._mSnippets[e.fileExtension]={snippets:e.snippets}})},getAllSnippets:function(e){var t=this._mSnippets[e],n=this;if(t)return this._loadTemplatesFromFiles(t).then(function(){ return t.snippets}).fail(function(e){return n.context.service.log.error("Snippet","Failed to loadTemplates From Files "+e.message,["user"]).done(),null})},_loadTemplatesFromFiles:function(e){var t=[];return e.snippetLoadingDefer||(e.snippets.forEach(function(e){var n=require.toUrl(e.filePath);t.push(Q.sap.ajax(n))}),e.snippetLoadingDefer=Q.all(t).then(function(t){for(var n=0;n0&&t.context.service.configurationhelper.getAllPersistedConfigurations(n).then(function(r){e=e.concat(r),t.context.service.configurationhelper.writeConfigurationsToFile(e,n).done()}).done()})}).fail(function(){t.context.service.log.info("Generation",t.context.i18n.getText("i18n","error_create_configs"),["user"]).done()}).done()},_getConfigurationsFromTemplate:function(e){var t=this,n=e.params.selectedTemplate.getTemplateClass().getProxyMetadata().getName(),r=e.params.selectedTemplate.getRunConfigurationsFileName(),i=r?e.params.selectedTemplate.getPath()+"/"+r:null;return this.context.service.pluginmanagement.getPluginFile(n,i,!1).then(function(e){try{var n=JSON.parse(e);return n}catch(e){throw t.context.service.log.info("Generation",t.context.i18n.getText("i18n","error_parse",[i]),["user"]).done(),e}}).fail(function(){return Q()})},_generateTemplateRunConfigurations:function(t,n){var r,i,o=t.runconfigurations;if(o&&o.length>0){for(var a=[],s=0;s0&&n[0]&&n[0].document&&(this._oLastDocSelection=n[0].document,this.getProblemsViewVisibility()))return this._oLastDocSelection.getProject().then(function(e){if(t._lastProjectSelection!==e)return t._lastProjectSelection=e,t.context.service.issues.getIssues(e).then(function(n){return t._setProblemsWithIssues(e,n)})})},_getLastSelectionProject:function(e){var t=this;return e?e.getProject().then(function(e){return t._lastProjectSelection=e,t._lastProjectSelection}):Q(t._lastProjectSelection)},onIssuesUpdate:function(){if(this.getProblemsViewVisibility())return this._updateProblemsWithIssues()},_updateProblemsWithIssues:function(){var e=this;if(this._oLastDocSelection)return this._getLastSelectionProject(this._oLastDocSelection).then(function(t){if(t)return e.context.service.issues.getIssues(t).then(function(n){return e._setProblemsWithIssues(t,n)})})},_getIssuesFromAllProject:function(e){for(var n=[],r=0;r0){var t=e[0].document;return t?t.getProject().then(function(e){return e}):null}return null})},t.prototype.hasFiles=function(t){return t.getEntity().isRoot()?Q(t):t.getCurrentMetadata(!0).then(function(n){var r=e.findIndex(n,{folder:!1})!==-1;return r===!0?t:null})},t.prototype.getProjectDocument=function(t,n){return e.isString(n)?t.service.document.getDocumentByPath(n).then(function(e){return e?e.getProject():void t.service.log.error("validationStoreManager","no document object can be retrieved from the path supplied "+n,["system"]).done()}):e.isObject(n)?n.getProject():void 0},t.prototype.getProjectId=function(e,t){return this.getProjectDocument(e,t).then(function(e){if(e)return e.getEntity().getFullPath()})},t}),define("sap/watt/ideplatform/plugin/validationTriggers/utils/queueManager",[],function(){var e=function(e){this.maxQueueSize=e,this.qHandleServerRequest=[]};return e.prototype.queueRequest=function(e){this.maxQueueSize&&0!==this.maxQueueSize&&this.getSize()>=this.maxQueueSize&&this.qHandleServerRequest.shift(),this.qHandleServerRequest.push(e)},e.prototype.dequeueRequest=function(){if(this.getSize()>0){var e=this.qHandleServerRequest.shift();return e}},e.prototype.getSize=function(){return this.qHandleServerRequest.length},e}),define("sap/watt/ideplatform/plugin/validationTriggers/utils/RemoteValidationRunner",["sap/watt/lib/lodash/lodash","sap/watt/ideplatform/plugin/validationTriggers/utils/documentHandler","sap/watt/ideplatform/plugin/validationTriggers/utils/queueManager"],function(e,t,n){var r=!1,i=new t,o=new n(1);return{init:function(e){i=e},callValidation:function(e,t){if(t.length>0){var n=[],r={};for(var i in t)n.push(t[i].getEntity().getFullPath()),r[t[i].getEntity().getFullPath()]=t[i];var a={projectsNames:n,projects:t,projectPathToObject:r};o.queueRequest(a)}return this._runNextQuedAction(e)},_runNextQuedAction:function(e){var t=this;if(!r){var n=o.dequeueRequest();if(n&&0!==n.projects.length)return t._performApplyToServer(e,n)}return Q()},_mapProjectTypes:function(e,t){return i.getProjectDocument(e,t).then(function(e){var n=e.getProjectMetadata();return{projectId:t,projectType:n?n.type:void 0}})},_isolateSpecificProjectIssues:function(t,n,r){var i=this;if(!n||!r)return Q(null);var o={projectName:n,projectData:{issues:{}}},a=[];return e.forEach(r,function(e,r){a.push(i._isProjectIssues(t,n,r).then(function(t){t.isProjectIssues&&(o.projectData.issues[t.issuesPath]=e)}))}),Q.all(a).then(function(){return o})},_isolateMtaProjectIssues:function(t,n,r){var i=this;return n&&r?t.service.codeValidationDAO.getProjectModulesNames(n).then(function(e){var t=[n];return t.concat(e)}).then(function(n){var o=[];return e(n).forEach(function(e){o.push(i._isolateSpecificProjectIssues(t,e,r))}),Q.all(o).then(function(e){return e})}):null},_isProjectIssues:function(e,t,n){var r=this;return i.getProjectId(e,n).then(function(i){if(i)return i===t?{isProjectIssues:!0,issuesPath:n}:{isProjectIssues:!1,issuesPath:void 0};var o=r._getStandardPath(n);return o!==n?r._isProjectIssues(e,t,o):{isProjectIssues:!1,issuesPath:void 0}})},_getStandardPath:function(e){return e.split("\\").join("/")},_performApplyToServer:function(e,t){var n=this;"orion"===sap.watt.getEnv("ws_server")&&n.context.service.log.error("Remote Code Check","orion server type not supported",["user"]).done(),r=!0;var i=Q.defer();return Q.all([e.service.codeValidationDAO.codeValidationResponseStatus()]).spread(function(r){var o;return e.service.codeValidationDAO.validateContent(t.projectsNames,t.projects).then(function(a){if(a)if(o=a,o.integrity&&o.integrity.status!==r.ERROR){if(o.result)return n._handelIssuesReturns(e,t,o).then(function(e){i.resolve(e)})}else o.integrity.status=r.ERROR;else o={integrity:{status:r.ERROR}};return Q()}).fail(function(e){o=o||{integrity:{}},o.integrity.status=o.integrity.status||r.ERROR,n.context.service.log.error("Remote Code Check","validation failed for projects: "+JSON.stringify(t.projectsNames)+" "+e.message,["user"]).done()})}).fin(function(){i&&i.promise&&!i.promise.isResolved()&&i.resolve(),r=!1,n._runNextQuedAction(e)})},_handelIssuesReturns:function(t,n,r){var i=this,o=r.result,a=[];return e(n.projectsNames).forEach(function(e){a.push(i._mapProjectTypes(t,e))}),Q.all(a).then(function(r){var a=[];return e(r).forEach(function(e){var n=e.projectId,r=e.projectType;"mta"===r?a.push(i._isolateMtaProjectIssues(t,n,o)):a.push(i._isolateSpecificProjectIssues(t,n,o))}),Q.all(a).then(function(r){var a;a=r[0]&&Array.isArray(r[0])?r[0]:r;var s=[];return e.forEach(a,function(e){var r=e.projectName;r&&(n.projectPathToObject[r]?s.push(t.service.issues.setIssues(n.projectPathToObject[r],"codeValidation",e.projectData.issues)):s.push(t.service.document.getDocumentByPath(r).then(function(n){return t.service.issues.setIssues(n,"codeValidation",e.projectData.issues)})))}),Q.all(s).done(),i._reportIssuesFromServerToUsageMonitoring(t,o),a})})},_reportIssuesFromServerToUsageMonitoring:function(t,n){setTimeout(function(){var r=0,o=[],a=[];n&&e.each(n,function(e,n){e.issues&&(r+=e.issues.length),o.push(i.getProjectDocument(t,n))}),Q.all(o).then(function(n){n&&e(n).forEach(function(e){if(e){var t=e.getEntity().getFullPath();a.indexOf(t)===-1&&a.push(t)}}),a.length>1?t.service.usagemonitoring.report("ProblemsView","AnalyseMultipleProjects",r).done():t.service.usagemonitoring.report("ProblemsView","Analyse",r).done()})},0)}}}),define("sap/watt/ideplatform/plugin/validationTriggers/utils/validationStoreManager",["sap/watt/lib/lodash/lodash","sap/watt/ideplatform/plugin/validationTriggers/utils/RemoteValidationRunner","sap/watt/ideplatform/plugin/validationTriggers/utils/documentHandler"],function(e,t,n){"use strict";var r=null,i=new n,o={};return t.init(i),{getDocumentHandler:function(){return i},getRemoteValidationRunner:function(){return t},_getSelectedProjectName:function(){return r.getEntity().getFullPath()},_getSelectedProject:function(){return r},_setSelectedProject:function(e){return this._getSelectedProject()&&e===this._getSelectedProject()?Q(!1):(r=e,Q(!0))},getIntegrityDictionary:function(e){return e.service.codeValidationDAO.codeValidationResponseStatus().then(function(e){return e}).fail(function(t){e.service.log.error(e.service.self.getProxyMetadata().getName(),"failed to get integrity status dictionary from DAO",["system"]).done()})},onAnalyse:function(t){if(!e.isNull(this._getSelectedProject())){var n=t.context||{};return this._onAnalyse(n)}return Q()},onSelection:function(e){var t=this,n=(e.context||{},e.event.params.selection);if(n&&n.length>0&&n[0]&&n[0].document){var r=n[0].document;return r.getProject().then(function(e){return t._setSelectedProject(e).then(function(e){if(e)return Q()})})}return Q()},onDelete:function(t){var n=this;if(!e.isNull(n._getSelectedProject())){var r=t.event||{},i=t.context||{};if(r&&r.params&&r.params.document){var o=r.params.document;return n.getDocumentHandler().getProjectDocument(i,o).then(function(e){if(e){var t=o.getEntity().getType();return"file"===t?n._onFileDelete(i,o,e):n._onFolderDelete(i,o)}})}}return Q()},onGitPrePush:function(e){var t=this,n=e.context||{};return t.getDocumentHandler().getRepositoryBrowserSelection(n).then(function(e){if(e)return t._setSelectedProject(e).then(function(){return t._onSelect(n).then(function(){return n.service.issues.getIssues(e)})})})},_callValidation:function(e,n){return this._addRemotelyRetrievedProjects(n),t.callValidation(e,n)},_onAnalyse:function(e){var t=this;if(this._getSelectedProject().getEntity().isRoot()){var n=this._getSelectedProject();return n.getFolderContent().then(function(n){return t._callValidation(e,n)})}return t._onSelect(e,!0)},_onSelect:function(e,t){var n=this,r=n._getSelectedProject();return r.getFolderContent().then(function(i){if(!r.getEntity().isRoot()&&i)return t||!n._isProjectInCache(r)?n._callValidation(e,[r]):Q()})},_getIssues:function(e,t,n){return e.service.issues.getIssues(t,n)},_getIssuesAllIssuers:function(e,t){return e.service.issues.getIssuesAllIssuers(t)},_setIssues:function(e,t,n,r){return e.service.issues.setIssues(t,n,r)},_setIssuesAllIssuers:function(e,t){var n=this;return t.getEntity().isProject()?n._getIssuesAllIssuers(e,t).then(function(r){for(var i in r)n._setIssues(e,t,i).done()}):t.getProject().then(function(r){return n._getIssuesAllIssuers(e,r).then(function(r){for(var i in r)n._setIssues(e,t,i).done()})})},_setIssuesForSingleFile:function(e,t,n,r,i){return e.service.issues.setIssuesForSingleFile(t,n,r,i)},_onFileDelete:function(e,t,n){var r=this;return r._getIssuesAllIssuers(e,n).then(function(i){for(var o in i)r._setIssuesForSingleFile(e,n,t,o).done()})},_onFolderDelete:function(e,t){var n=this;return t.getEntity().isProject()?(this._removeRemotelyRetrievedProjects([t]),n._setIssuesAllIssuers(e,t)):t.getProject().then(function(r){return n._getIssuesAllIssuers(e,r).then(function(i){var o,a=t.getEntity().getFullPath()+"/";for(var s in i){for(var u in i[s])0!==u.indexOf(a)&&(o||(o={}),o[u]=i[s][u]);n._setIssues(e,r,s,o).done(),o=null}})})},_getWorkspaceProjects:function(t){var n=[];return t.service.filesystem.documentProvider.getRoot().then(function(t){return t.getFolderContent().then(function(t){return e(t).forEach(function(e){e.getEntity().isProject()&&n.push(e)}),n})})},_getStandardPath:function(e){return e.split("\\").join("/")},_getProjectsNames:function(t){var n=[];return e(t).forEach(function(e){n.push(e.getEntity().getFullPath())}),n},_addRemotelyRetrievedProjects:function(e){for(var t=this._getProjectsNames(e),n=0;n0){var r=this._wrapTrigger(this.context,e);return this.getValidationStoreManager().onSelection(r)}}else this._oUnhandledSelectionEvent=e;return Q()},onDeletionTrigger:function(e){var t=this._wrapTrigger(this.context,e);return this.getValidationStoreManager().onDelete(t)},onGitPrePushTrigger:function(){var e=this._wrapTrigger(this.context);return this.getValidationStoreManager().onGitPrePush(e)},_checkSelectionOwner:function(e){return e&&(e.instanceOf("sap.watt.common.service.ui.Browser")||e.instanceOf("sap.watt.common.service.editor.Editor"))},_wrapTrigger:function(e,t){return{context:e,event:t?t:void 0}},_runAllUnhandledEvents:function(){var e=this;return e._oUnhandledSelectionEvent?e.onSelectionTrigger(this._oUnhandledSelectionEvent).then(function(){e._oUnhandledSelectionEvent=null}):Q()}}}),define("sap.watt.ideplatform.validationTriggers/triggers/git/view/customActionsMessageBox",[],function(){var e={show:function(e,t,n){function r(e,t){if(!t)throw"invalid value for action";var n,r=!0;if("string"==typeof t?n=t:"object"==typeof t&&(n=t.text,r=!t.hasOwnProperty("enabled")||t.enabled),!n)throw"invalid text for action";e.addButton(new sap.m.Button({text:n,enabled:r,press:function(){i.context.service.focus.context.event.fire$dialogClosed(),o.resolve(n),a.close()}}))}var i=this,o=Q.defer();jQuery.sap.require("sap.ui.commons.Dialog");var a=new sap.ui.commons.Dialog;a.setTitle(e),a.setHeight("350px"),a.setWidth("600px");var s=new sap.ui.commons.TextView({text:"\n"+t});a.addContent(s),a.addStyleClass("sapUiSizeCompact");for(var u in n)r(a,n[u]);return this.context.service.focus.context.event.fire$dialogOpened(),a.open(),o.promise}};return e}),define("sap.watt.ideplatform.validationTriggers/triggers/git/service/gitValidations",["sap/watt/lib/lodash/lodash"],function(e){var t="server_type",n="local_hcproxy";return{cActions:{PUSH:"Push",VIEW_PROBLEMS:"View Problems"},cSeverityLevel:{ERROR:"Error",ERROR_AND_WARNING:"ErrorAndWarning"},DOMAIN:"codeValidation",execute:function(){var e=this,r=this.context,i=sap.watt.getEnv(t);return i===n?e._continuePush():e._getProjectSettingsConfiguration(r).then(function(t){return t&&t.notifyBeforePush?r.service.validationTriggers.onGitPrePushTrigger().then(function(n){if(n){var i=e._countSeverities(n);if(e._existsIssuesOnLevel(i,t.notifyBeforePushLevel)){var o=e._prepareDialogData(t,i);return r.service.customActionsMessageBox.show(o.title,o.message,o.actions).then(function(t){return t===e.cActions.PUSH?e._continuePush():t===e.cActions.VIEW_PROBLEMS?(e.context.service.usagemonitoring.report("ProblemsView","problemsViewOpenFromGit").done(),r.service.problemsView.isVisible().then(function(t){return t?e._cancelPush():r.service.problemsView.setVisible(!0).then(function(){return e._cancelPush()})})):void 0})}return e._continuePush()}return e._continuePush()}):e._continuePush()})},_getProjectSettingsConfiguration:function(){var e=this.context;return e.service.repositorybrowser.getSelection().then(function(t){if(t&&t.length>0){var n=t[0].document;if(n)return n.getProject().then(function(t){return e.service.setting.project.get(e.service.codeCheckingTriggers,t).then(function(e){return e})})}})},_countSeverities:function(t){var n=0,r=0;return e(t).forEach(function(e){e.issues.forEach(function(e){"error"===e.severity?n++:"warning"===e.severity&&r++})}),{error:n,warning:r}},_cancelPush:function(){return{domain:this.DOMAIN,runResult:!1}},_continuePush:function(){return{domain:this.DOMAIN,runResult:!0}},_prepareDialogData:function(e,t){var n="Push Process Notifications",r=this._prepareDialogMsg(t,e.notifyBeforePushLevel),i=this._prepareDialogActions(t,e.blockPush,e.blockPushLevel);return{title:n,message:r,actions:i}},_existsIssuesOnLevel:function(e,t){return t===this.cSeverityLevel.ERROR?e.error>0:e.error>0||e.warning>0},_prepareDialogMsg:function(e,t){var n="";return e.error>0&&(n=n+e.error+" errors found\n"),t===this.cSeverityLevel.ERROR_AND_WARNING&&e.warning>0&&(n=n+e.warning+" warnings found\n"),n},_prepareDialogActions:function(e,t,n){var r=[this.cActions.VIEW_PROBLEMS],i={text:this.cActions.PUSH,enabled:!1};return t?this._existsIssuesOnLevel(e,n)||(i.enabled=!0):i.enabled=!0,r.push(i),r}}}),define("sap.watt.ideplatform.validationTriggers/triggers/git/service/gitValidationsProjSettings",["sap/watt/platform/plugin/platform/service/ui/AbstractConfig"],function(e){"use strict";var t={notifyBeforePush:!1,notifyBeforePushLevel:"Error",blockPush:!1,blockPushLevel:"Error"},n="no project document supplied",r="wrong setting structure or fields supplied to service";return e.extend("sap.watt.ideplatform.validationTriggers.triggers.git.gitValidationsProjSettings",{_oCodeCheckingTriggersView:null,_oCodeCheckingTriggersController:null,getProjectSettingContent:function(e,t,n){var r=[{uri:"sap/watt/ideplatform/plugin/validationTriggers/triggers/git/css/gitValidationsProjSettings.css"}];return this.context.service.resource.includeStyles(r).done(),this._oCodeCheckingTriggersView?this._oCodeCheckingTriggersView.getController().setProjectPath(n):this._oCodeCheckingTriggersView=sap.ui.view({viewName:"sap.watt.ideplatform.plugin.validationTriggers.triggers.git.view.gitValidationsProjSettings",type:sap.ui.core.mvc.ViewType.JS,viewData:{context:this.context,projectPath:n}}),this._oCodeCheckingTriggersView._projectPath=n,this._oValidatorController=this._oCodeCheckingTriggersView.getController(),this._oCodeCheckingTriggersView},saveProjectSetting:function(e,t,n){var r=this,i=this._oCodeCheckingTriggersView.getModel("codeCheckingTriggersModel").getData();return this.context.service.filesystem.documentProvider.getDocument(n).then(function(e){return r.updateProjectSettings(i,e)})},isAvailable:function(){return"hcproxy"===sap.watt.getEnv("server_type")||"java"===sap.watt.getEnv("server_type")||("local_hcproxy"===sap.watt.getEnv("server_type")||"xs2"===sap.watt.getEnv("server_type"),!1)},updateProjectSettings:function(e,i){if(i){var o=this._validateObjectsStruct(e,t);return o?this.context.service.setting.project.setProjectSettings("codeCheckingTriggers",e,i).then(function(){}):Q.reject({message:r})}return this._writeToLog(n),Q.reject({message:n})},_validateObjectsStruct:function(e,t){if(!e)return!1;var n=Object.keys(t).sort(),r=Object.keys(e).sort();if(r.length!==n.length)return!1;for(var i=0;i0&&n.getFileNames().indexOf(i)===-1)s.reject("fileName doesn't match");else if(n.getFileExtensions().length>0&&n.getFileExtensions().indexOf(o)===-1)s.reject("fileExtension doesn't match");else if(t&&t.length>0&&n.getProjectTypes().length>0&&n.getProjectTypes().indexOf(t[0])===-1)s.reject("projType doesn't match");else if(n.getFileSpecs().length>0&&!function(){for(var e=!1,t=0;t0)return Q(n);var r=this._cache,i=this.context.service.projectType,o=this;return i.getProjectTypes(e).then(function(i){for(var a=[],s=[],u=0;u=0?n.splice(s,0,a.type):n.push(a.type)}return n.sort(function(e,t){return o._mContentTypes[t]._iDepth-o._mContentTypes[e]._iDepth}),Q(r.setByDocument(e,n))})}).fail(function(e){return Q.reject(e)})},getAllContentTypes:function(){return this._mContentTypes},getContentTypeInfo:function(e){return this._mContentTypes[e]},onDocumentSaved:function(e){var t=e.params.document;if(t&&t.getEntity){var n=t.getEntity();if(!n)return;var r=this._cache.invalidateDocument(n.getFullPath()),i=this;this.getContentTypeOfDocument(t).then(function(e){0===e.length&&r.length>0&&i._cache.setContentTypeOfDocument(n.getFullPath(),r)}).done()}},onDocumentDeleted:function(e){var t=e.params.document;if(t&&t.getEntity){var n=t.getEntity();if(!n)return;"folder"===n.getType()?this._cache.invalidateFolder(n.getFullPath()):this._cache.invalidateDocument(n.getFullPath())}},onDocumentChanged:function(e){"renamed"===e.params.changeType&&this.onDocumentDeleted(e)},onDocumentOpened:function(e){var t=e.params.document;if(t&&t.getEntity){var n=t.getEntity();if(!n)return;this.getContentTypeOfDocument(t).done()}},onDocumentCreated:function(e){},onProjectTypesUpdated:function(e){var t=e.params.projectDocument;if(t&&t.getEntity){var n=t.getEntity();this._cache.invalidateFolder(n.getFullPath())}}}}),define("sap.watt.ideplatform.contentType/service/TextContentTypeMatcher",[],function(){"use strict";return{isContentTypeMatches:function(e){return e.isBinary().then(function(e){return!e})}}}),define("sap.watt.ideplatform.navigation/service/Navigation",[],function(){"use strict";var e={_oNavigators:{},configure:function(e){if(e)for(var t=e.navigators||[],n=0;n0){for(var r=0;r0)for(var n,r=e.routes,i=0;i-1?t.replace("/s2s/file",""):t.replace("/file","")}}}),define("sap.watt.ideplatform.runtimeextensions/service/RunWithFrameNewProcess",["sap/watt/lib/lodash/lodash"],function(e){"use strict";var t,n=!1,r=void 0;return{getRunWithFrameUrl:function(i,o,a,s){var u=this;if(!o||1===s)return o;a&&(r=a);var c,l=window["sap-ide-env"];t=o.toString(),c="about:blank"===t&&"java"===l.server_type?URI(require.toUrl("/resources/sap/watt/ideplatform/plugin/preview/view/frameWrapper.html")):URI(require.toUrl("sap.watt.ideplatform.preview/view/frameWrapper.html")),c.addSearch("url",t),n||(addEventListener("storage",function(e){u._onMessageReceived(e,u)},!1),sap.watt.getEnv("internal")&&e.get(u.context.service,"document",{}).attachEvent("saved",e.debounce(function(e){u._postViaLocalStorage("resource-changed",Date.now())},1e3)),n=!0);var p=Q(c);return u.context&&u.context.service&&(p=u.context.service.setting.project.get(u.context.service.translation).then(function(e){if(e){var t=e.supportedLanguages,n=e.defaultLanguage;return n||(t?n=t.split(",")[0]:(t="en",n="en")),c.addSearch("lang",t),c.addSearch("dft",n),Q(c)}return Q(c)},function(){return Q(c)}).then(function(e){return u.context.service.preferences.get("Preview").then(function(t){return e.addSearch("device",t.device),"custDevice"===t.device&&(e.addSearch("deviceW",t.width),e.addSearch("deviceH",t.height)),e.addSearch("livePreview",!!t.livePreview),e.toString()}).fail(function(t){return e})})),p.then(function(e){return e})},_i18Texts:{preview_title:"",preview_edit:"",preview_confirm:"",preview_more:"",msg_invalid_url:"",msg_invalid_width:"",msg_invalid_height:"",preview_custom:"",preview_qr:"",preview_refresh:"",preview_switch_orientation:"",preview_orientation:"",preview_share_via_email:"",preview_send_email:"",msg_localhost_warning:"",preview_languages:"",preview_devices:"",preview_Small:"",preview_Medium:"",preview_Large:"",preview_live:""},_getI18TextsAndAddToLocalStorage:function(e){if(this.context){var t=this.context.i18n;for(var n in e)e[n]=t.getText("i18n",n)}return e},_getText:function(e){if(this.context){var t=this.context.i18n;return t.getText("i18n",e)}return e},_UpdateChangeDevicePreferences:function(t,n){var r=JSON.parse(t);if(r.changeDeviceClicked){var i=e.get(n,"context.service.usagemonitoring");i&&i.report("preview","preview_size",r.changeDeviceClicked).done()}return n._updatePreferences({device:r.changeDevice,width:r.width,height:r.height})},_postViaLocalStorage:function(e,t){window.localStorage.removeItem(e),window.localStorage.setItem(e,t),window.localStorage.removeItem(e)},_getQrCodeAndPostMessage:function(e){var t=this;return this.context&&this.context.service&&this.context.service.qrcode?this.context.service.qrcode.getQrCode(e,!0,!0).then(function(e){e&&e.oDiv&&e.oDiv[0]&&t._postViaLocalStorage("QrCode",e.oDiv.outerHTML())}):Q()},_onMessageReceived:function(n,i){if(!n.key||!n.newValue)return Q();var o=n.key,a=n.newValue;if("changeDevice"===o)return i._UpdateChangeDevicePreferences(a,i);if("previewReady"===o){var s=i._getI18TextsAndAddToLocalStorage(i._i18Texts);i._postViaLocalStorage("initializeTexts",JSON.stringify(s)),i._postViaLocalStorage("setIsSafari",sap.ui.Device.browser.safari),r&&i._postViaLocalStorage("createCustButtons",JSON.stringify(r)),i._getQrCodeAndPostMessage(t).done()}else if("changeLanguage"===o)i.context.service.usagemonitoring.report("preview","preview_language",a).done();else if("customButton"===o)i.context.event.fireButtonClicked({id:a}).done();else if("livePreview"===o)return i._updatePreferences(e.set({},o,JSON.parse(a)))},_updatePreferences:function(t){var n=this;return Q().then(function(){var r=e.get(n,"context.service.preferences");if(r)return r.get("Preview").then(function(n){return r.set(e.extend(n,t),"Preview").fail(function(e){console.log(e)})})})}}}),define("sap.watt.ideplatform.runtimeextensions/service/RunWithFrame",[],function(){"use strict";return{_aWindows:[],_bEventListenerExists:!1,_oCurrentWindow:null,getRunWithFrameUrl:function(e,t,n,r){var i=this;if(i._oCurrentWindow=e,!t||1===r)return t;var o,a=window["sap-ide-env"],s=t.toString();o="about:blank"===s&&"java"===a.server_type?URI(require.toUrl("/resources/sap/watt/ideplatform/plugin/preview/view/wrapper.html")):URI(require.toUrl("sap.watt.ideplatform.preview/view/wrapper.html")),o.addSearch("url",s);var u=this._getWindow(e,t,n,s);i._bEventListenerExists||(i._bEventListenerExists=!0,addEventListener("message",function(e){i._onMessageRecieved(e,i)},!1));var c=Q(o);return i.context&&i.context.service&&(c=i.context.service.setting.project.get(i.context.service.translation).then(function(e){if(e){var t=e.supportedLanguages,n=e.defaultLanguage;return n||(t?n=t.split(",")[0]:(t="en",n="en")),o.addSearch("lang",t),o.addSearch("dft",n),Q(o)}return Q(o)},function(){return Q(o)}).then(function(e){return i.context.service.preferences.get("Preview").then(function(t){return e.addSearch("device",t.device),"custDevice"===t.device&&(e.addSearch("deviceW",t.width),e.addSearch("deviceH",t.height)),e.toString()}).fail(function(t){return e})})),c.then(function(e){return u.oDeferred.promise,e})},_getWindow:function(e,t,n,r){var i,o=this._getWindowName(this._oCurrentWindow),a=Q.defer();a.promise.debugInfo&&(a.promise.debugInfo.finalized=!0);for(var s=0;s0&&t)return r._getApplicationMapping().then(function(e){return jQuery.each(c,function(t,n){var o=n.target.name,s=n.target.account?"-"+n.target.account:"";u.push(r._getWorkspaceAppRootInWorkspace(o,e).then(function(e){if(e)return r.context.service.heliumwsmapping.getHeliumWorkspaceMapping(e.document).then(function(t){a=r._adjustWsPath(t),e.entryPath&&""!==e.entryPath&&(a+=e.entryPath),i.push({name:"hc_wsmapping."+o+s,value:a})})}))}),Q.all(u).then(function(){return i})});var l=r._getProjectForwardingToItSelf(s,n);return l?r.context.service.heliumwsmapping.getHeliumWorkspaceMapping(e).then(function(e){return a=r._adjustWsPath(e),n.entryPath&&""!==n.entryPath&&(a+=n.entryPath),i.push({name:"hc_wsmapping."+l,value:a}),i}):i}).fail(function(){return[]})})})})}).fail(function(e){return r.context.service.log.warn("run","failed to calculate reuselibs url params",["user"]).done(),[]})},_adjustWsPath:function(e){return e.lastIndexOf("/")!==e.length-1&&(e+="/"),e},_concatenatePaths:function(e,t){var n=e;return e&&t&&""!==t&&(n=e.endsWith("/")||t.startsWith("/")?e+t:e+"/"+t),n},_getNeoAppApplicationRoutes:function(e){var t=[];return e.routes&&jQuery.each(e.routes,function(e,n){n.target&&n.target.type&&"application"===n.target.type&&t.push(n)}),t},_getProjectForwardingToItSelf:function(e,t){if(e.routes)for(var n=0;n0)return e.forEach(function(e){e.uri=e.uri.slice(e.uri.indexOf(n))}),i._convertReferencesResultsToFileSearchFormat(e,t)})})},_getRootUri:function(e){return e.getProject().then(function(e){return e.getEntity().getFullPath()})},_convertReferencesResultsToFileSearchFormat:function(e,t){var n=this,r=[];return e.forEach(function(e){var i=e.uri.replace("file:",""),o=n.context.service.document.getDocumentByPath(i).then(function(r){return r.getContent().then(function(o){return{oFileDocument:r,sFullPath:i,items:[{range:[n._positionToOffset(o,e.range.start),n._positionToOffset(o,e.range.end)],sText:t.token.value}]}})});r.push(o)}),Q.all(r).then(function(n){return t.depModules=[],{aFileEntries:n,numFound:e.length,context:t}})},_positionToOffset:function(e,t){for(var n=e.indexOf("\r\n")!==-1?"\r\n":"\n",r=e.split(n),i=0,o=0;o0)return!0}}})},t.prototype.execute=function(e){var t=this;return t.context.service.test.testresult.getView().then(function(e){if(e)return e.deleteTestResults()})},t}),define("sap.watt.ideplatform.test.testresult/command/ExportTestResultsCommand",["./BaseCommand"],function(e){"use strict";function t(){return e.call(this),this}return t.prototype=Object.create(e.prototype),t.prototype.isEnabled=function(e){var t=this;return t.context.service.test.testresult.getView().then(function(e){if(e){var t=e.getController(),n=t.getCurrentTestResultProvider();if(e._oPart.providerSupportsGetExportUrls(n)){var r=t._getHistoryDataModel().getData();if(r&&r.length>0)return!0}}})},t.prototype.execute=function(e){var t=this;return t.context.service.test.testresult.getView().then(function(e){if(e)return e.exportTestResults()})},t}),define("sap.watt.ideplatform.test.testresult/command/RefreshTestResultsCommand",["./BaseCommand"],function(e){"use strict";function t(){return e.call(this),this}return t.prototype=Object.create(e.prototype),t.prototype.execute=function(e){var t=this;return t.context.service.test.testresult.getView().then(function(e){if(e)return e.refreshTestResults()})},t}),define("sap.watt.ideplatform.test.testresult/command/OpenFileCommand",["./BaseCommand"],function(e){"use strict";function t(){return e.call(this),this}return t.prototype=Object.create(e.prototype),t.prototype.isEnabled=function(e){var t=e.default;return t&&t.uri?Q(!0):Q(!1)},t.prototype.execute=function(e){var t=this;return t.context.service.test.testresult.getView().then(function(t){if(t)return t.openFile(e)})},t}),define("sap.watt.ideplatform.test.testresult/command/SortColumnAscCommand",["./BaseCommand"],function(e){"use strict";function t(){return e.call(this),this}return t.prototype=Object.create(e.prototype),t.prototype.isEnabled=function(e){if(e){var t=e.default;if(t&&t.column)return Q(!0)}return Q(!1)},t.prototype.execute=function(e){var t=this;return t.context.service.test.testresult.getView().then(function(t){if(t)return t.sortTable(e.column,!0)})},t}),define("sap.watt.ideplatform.test.testresult/command/SortColumnDesCommand",["./BaseCommand"],function(e){"use strict";function t(){return e.call(this),this}return t.prototype=Object.create(e.prototype),t.prototype.isEnabled=function(e){if(e){var t=e.default;if(t&&t.column)return Q(!0)}return Q(!1)},t.prototype.execute=function(e){var t=this;return t.context.service.test.testresult.getView().then(function(t){if(t)return t.sortTable(e.column,!1)})},t}),define("sap.watt.ideplatform.test.testresult/service/Util",["sap/watt/ideplatform/che/plugin/chebackend/io/Request"],function(e){"use strict";return{_sWorkspaceId:null,_getWorkspaceId:function(){var t=this;return t._workspaceId?Q(t._workspaceId):e.send("workspace/all","GET",{},{}).then(function(e){if(e&&e.length>0&&e[0].workspaceReference){var n=e[0].workspaceReference;return t._workspaceId=n.id,Q(t._workspaceId)}return Q.reject("No workspaces available")})},createServiceUri:function(e){return this._getWorkspaceId().then(function(t){return e=jQuery.sap.startsWith(e,"/")?e.substr(1):e,e=e.replace("{{workspaceId}}",t),Q.resolve(e)})},asyncMap:function(e,t){var n=Q.defer(),r=[],i=0,o=function(){for(var a=Date.now();i100){setTimeout(function(){o()},0);break}r.length>=e.length&&Q.all(r).then(function(e){n.resolve(e)}).done()};return o(),n.promise}}}),define("sap.watt.ideplatform.test.testresult/service/CoverageManager",[],function(){"use strict";var e="testresult-coverage-covered-line",t="testresult-coverage-uncovered-line",n="testresult-coverage-covered-line-dark",r="testresult-coverage-uncovered-line-dark",i=/^testresult-coverage-/i,o=function(e){var t=this;t._oContext=e};return o.prototype._bCoverageVisible,o.prototype._oContext,o.prototype._oFilePath2SessionData={},o.prototype._wrapperOnChange,o.prototype._wrapperOnChangeSession,o.prototype._bLoadingSession=!0,o.prototype._getUI5Editor=function(){var e,t=this;return t._oContext.service.content.getCurrentEditor().then(function(t){if(e=t,e&&e.getName)return e.getName()}).then(function(t){return"aceeditor"===t?e.getUI5Editor():Q()})},o.prototype.clearCoverage=function(){var e=this;return delete e._oFilePath2SessionData,e._refresh()},o.prototype.getCoverage=function(e,t){var n=this;return n.clearCoverage(e).then(function(){n._oFilePath2SessionData={};var r={totalCoveredLineCount:0,totalLineCount:0,sessionData:[]};return t&&($.each(t,function(t,i){var o=e+"/"+t;o=o.replace(/[\/\\]+/gm,"/");var a=n._createSessionData(i);a.path=t,n._oFilePath2SessionData[o]=a,r.totalCoveredLineCount=r.totalCoveredLineCount+a.coveredLineCount,r.totalLineCount=r.totalLineCount+a.lineCount,r.sessionData.push(a)}),$.each(r.sessionData,function(e,t){t.totalPercentage=Math.round(t.coveredLineCount/r.totalLineCount*100)})),n._refresh().then(function(){return Q(r)})})},o.prototype._createSessionData=function(e){var t=this,n={coverage:e,markerInfos:[],lineCount:0,coveredLineCount:0},r=t._getFunctionLineSet(n);return e.statementMap&&($.each(e.statementMap,function(t,i){n.lineCount++,$.inArray(i.start.line,r)>=0&&(i.end.line=i.start.line);var o={startRow:i.start.line-1,startColumn:i.start.column||0,endRow:i.end.line-1,endColumn:i.end.column||-1},a={range:o};e.s&&e.s[t]>0?(n.coveredLineCount++,a.isCoveredLine=!0):a.isCoveredLine=!1,n.markerInfos.push(a)}),n.percentage=Math.round(n.coveredLineCount/n.lineCount*100)),n},o.prototype._getStyleClass=function(i,o){return i&&i.isDark?o?n:r:o?e:t},o.prototype._loadAceTheme=function(e){return"undefined"!=typeof ace?ace.require(e):null},o.prototype._decorate=function(e){var t=this;t._removeMarkers(e);var n=e.getCurrentFilePath(),r=t._oFilePath2SessionData[n];if(t._bCoverageVisible&&r&&r.coverage){var i=t._loadAceTheme(e.getTheme());$.each(r.markerInfos,function(n,r){var o=t._getStyleClass(i,r.isCoveredLine),a=e.getRange(r.range.startRow,r.range.startColumn,r.range.endRow,r.range.endColumn);e.addMarker(a,o,"fullLine")})}},o.prototype._getFunctionLineSet=function(e){return e.functionLineSet||(e.functionLineSet=[],e.coverage.fnMap&&$.each(e.coverage.fnMap,function(t,n){e.functionLineSet.push(n.line)})),e.functionLineSet},o.prototype._refresh=function(){var e=this;return e._getUI5Editor().then(function(t){t&&(e._addEditorListeners(t),e._decorate(t))})},o.prototype._onEditorRendered=function(e){var t=this;return t._bLoadingSession=!1,t._refresh()},o.prototype._onPreferencesSaved=function(e){var t=this;return t._refresh()},o.prototype._addEditorListeners=function(e){var t=this;t._wrapperOnChangeSession||(t._wrapperOnChangeSession=function(e){t._bLoadingSession=!0},e.getNativeEditor().addEventListener("changeSession",t._wrapperOnChangeSession)),t._wrapperOnChange||(t._wrapperOnChange=function(n){if(!t._bLoadingSession){var r=e.getCurrentFilePath();delete t._oFilePath2SessionData[r],t._removeMarkers(e)}},e.getNativeEditor().addEventListener("change",t._wrapperOnChange))},o.prototype._removeEditorListeners=function(e){var t=this;e.getNativeEditor().removeEventListener("changeSession",t._wrapperOnChangeSession),t._wrapperOnChangeSession=void 0,e.getNativeEditor().removeEventListener("change",t._wrapperOnChange),t._wrapperOnChange=void 0},o.prototype._removeMarkers=function(e){if(e){var t=e.getMarkers();t&&$.each(t,function(t,n){i.test(n.clazz)&&e.removeMarker(n.id)})}},o.prototype.getCoverageVisible=function(){return this._bCoverageVisible},o.prototype.setCoverageVisible=function(e){var t=this;if(t._bCoverageVisible!==e)return t._bCoverageVisible=e,t._bCoverageVisible?(t._oContext.service.aceeditor.config.attachEvent("preferencesSaved",t._onPreferencesSaved,this),t._oContext.service.aceeditor.attachEvent("rendered",t._onEditorRendered,t)):(t._oContext.service.aceeditor.config.detachEvent("preferencesSaved",t._onPreferencesSaved,this),t._oContext.service.aceeditor.detachEvent("rendered",t._onEditorRendered,t)),t._refresh()},o}),define("sap.watt.ideplatform.test.testresult/../../../lib/XMLDomParser/sax",[],function(){function e(){}function t(e,t,s,p,f){function d(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function h(e){var t=e.slice(1,-1);return t in s?s[t]:"#"===t.charAt(0)?d(parseInt(t.substr(1).replace("x","0x"))):(f.error("entity not found:"+e),e)}function m(t){var n=e.substring(E,t).replace(/&#?\w+;/g,h);b&&g(E),p.characters(n,0,t-E),E=t}function g(t,n){for(;t>=y&&(n=x.exec(e));)v=n.index,y=v+n[0].length,b.lineNumber++;b.columnNumber=t-v+1}for(var v=0,y=0,x=/.+(?:\r\n?|\n)|.*$/g,b=p.locator,_=[{currentNSMap:t}],w={},E=0;;){var S=e.indexOf("<",E);if(S<0){if(!e.substr(E).match(/^\s*$/)){var C=p.document,T=C.createTextNode(e.substr(E));C.appendChild(T),p.currentElement=T}return}switch(S>E&&m(S),e.charAt(S+1)){case"/":var D=new RegExp("\\s*>"),A=e.substr(S+2),P=A.search(D);P=P+S+2;var k,I=e.substring(S+2,P);if(!(_.length>1)){f.fatalError("end tag name not found for: "+I);break}k=_.pop();var F=k.localNSMap;if(k.tagName!=I&&f.fatalError("end tag name: "+I+" does not match the current start tagName: "+k.tagName),p.endElement(k.uri,k.localName,I),F)for(var O in F)p.endPrefixMapping(O);P++;break;case"?":b&&g(S),P=c(e,S,p);break;case"!":b&&g(S),P=u(e,S,p,f);break;default:try{b&&g(S);var N=new l,P=r(e,S,N,h,f),j=N.length;if(j&&b){for(var R=n(b,{}),S=0;S0))throw new Error("attribute value no end '"+c+"' match");a=e.slice(t,s).replace(/&#?\w+;/g,r),n.add(o,a,t-1),u=_}else{if(u!=b)throw new Error('attribute value must after "="');a=e.slice(t,s).replace(/&#?\w+;/g,r),n.add(o,a,t),i.warning('attribute "'+o+'" missed start quot('+c+")!!"),t=s+1,u=_}break;case"/":switch(u){case g:n.setTagName(e.slice(t,s));case _:case w:case E:u=E,n.closed=!0;case b:case v:case y:break;default:throw new Error("attribute invalid close char('/')")}break;case"":i.error("unexpected end of input");case">":switch(u){case g:n.setTagName(e.slice(t,s));case _:case w:case E:break;case b:case v:a=e.slice(t,s),"/"===a.slice(-1)&&(n.closed=!0,a=a.slice(0,-1));case y:u===y&&(a=o),u==b?(i.warning('attribute "'+a+'" missed quot(")!!'),n.add(o,a.replace(/&#?\w+;/g,r),t)):(i.warning('attribute "'+a+'" missed value!! "'+a+'" instead!!'),n.add(a,a,t));break;case x:throw new Error("attribute value missed!!")}return s;case"€":c=" ";default:if(c<=" ")switch(u){case g:n.setTagName(e.slice(t,s)),u=w;break;case v:o=e.slice(t,s),u=y;break;case b:var a=e.slice(t,s).replace(/&#?\w+;/g,r);i.warning('attribute "'+a+'" missed quot(")!!'),n.add(o,a,t);case _:u=w}else switch(u){case y:i.warning('attribute "'+o+'" missed value!! "'+o+'" instead!!'),n.add(o,o,t),t=s,u=v;break;case _:i.error('attribute space is required"'+o+'"!!');case w:u=v,t=s;break;case x:u=b,t=s;break;case E:throw new Error("elements closed character '/' and '>' must be connected to")}}s++}}function i(e,t,n,r){for(var i=e.tagName,o=null,a=n[n.length-1].currentNSMap,u=e.length;u--;){var c=e[u],l=c.qName,p=c.value,f=l.indexOf(":");if(f>0)var d=c.prefix=l.slice(0,f),h=l.slice(f+1),m="xmlns"===d&&h;else h=l,d=null,m="xmlns"===l&&"";c.localName=h,m!==!1&&(null==o&&(o={},s(a,a={})),a[m]=o[m]=p,c.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(m,p))}for(var u=e.length;u--;){c=e[u];var d=c.prefix;d&&("xml"===d&&(c.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==d&&(c.uri=a[d]))}var f=i.indexOf(":");f>0?(d=e.prefix=i.slice(0,f),h=e.localName=i.slice(f+1)):(d=null,h=e.localName=i);var g=e.uri=a[d||""];if(d&&!g&&r.error("unexpected namespace "+d),t.startElement(g,h,i,e),e.closed){if(t.endElement(g,h,i),o)for(d in o)t.endPrefixMapping(d)}else e.currentNSMap=a,e.localNSMap=o,n.push(e)}function o(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=e.indexOf("",t),a=e.substring(t+1,o);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),o)}return t+1}function a(e,t,n,r){var i=r[n];if(null==i){var o=new RegExp("","gi"),a=e.match(o);if(a&&a.length>=1){var s=e.lastIndexOf(a[a.length-1]);i=r[n]=s}else i=-1}return i",t+4);return o>t?(n.comment(e,t+4,o-t-4),o+3):(r.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,o-t-9),n.endCDATA(),o+3}var a=f(e,t),s=a.length;if(s>1&&/!doctype/i.test(a[0][0])){var u=a[1][0],c=s>3&&/^public$/i.test(a[2][0])&&a[3][0],l=s>4&&a[4][0],p=a[s-1];return n.startDTD(u,c&&c.replace(/^(['"])(.*?)\1$/,"$2"),l&&l.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),p.index+p[0].length}}return-1}function c(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function l(e){}function p(e,t){return e.__proto__=t,e}function f(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}var d=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,h=new RegExp("[\\-\\.0-9"+d.source.slice(1,-1)+"·̀-ͯ\\ux203F-⁀]"),m=new RegExp("^"+d.source+h.source+"*(?::"+d.source+h.source+"*)?$"),g=0,v=1,y=2,x=3,b=4,_=5,w=6,E=7;return e.prototype={parse:function(e,n,r){var i=this.domBuilder;i.startDocument(),s(n,n={}),t(e,n,r,i,this.errorHandler),i.endDocument()}},l.prototype={setTagName:function(e){if(!m.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!m.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getOffset:function(e){return this[e].offset},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},p({},p.prototype)instanceof p||(p=function(e,t){function n(){}n.prototype=t,n=new n;for(t in e)n[t]=e[t];return n}),e}),define("sap.watt.ideplatform.test.testresult/../../../lib/XMLDomParser/dom",[],function(){function e(e,t){for(var n in e)t[n]=e[n]}function t(t,n){function r(){}var i=t.prototype;if(Object.create){var o=Object.create(n.prototype);i.__proto__=o}i instanceof n||(r.prototype=n.prototype,r=new r,e(i,r),t.prototype=i=r),i.constructor!=t&&("function"!=typeof t&&console.error("unknow Class:"+t),i.constructor=t)}function n(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,ee[e]),this.message=ee[e],Error.captureStackTrace&&Error.captureStackTrace(this,n);return r.code=e,t&&(this.message=this.message+": "+t),r}function r(){}function i(e,t){this._node=e,this._refresh=t,o(this)}function o(t){var n=t._node._inc||t._node.ownerDocument._inc;if(t._inc!=n){var r=t._refresh(t._node);L(t,"length",r.length),e(r,t),t._inc=n}}function a(){}function s(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function u(e,t,n,r){if(r?t[s(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&g(i,e,r),m(i,e,n))}}function c(e,t,r){var i=s(t,r);if(!(i>=0))throw n(te,new Error);for(var o=t.length-1;i"==e&&">"||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function d(e,t){if(t(e))return!0;if(e=e.firstChild)do if(d(e,t))return!0;while(e=e.nextSibling)}function h(){}function m(e,t,n){e&&e._inc++;var r=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==r&&(t._nsMap[n.prefix?n.localName:""]=n.value)}function g(e,t,n,r){e&&e._inc++;var i=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==i&&delete t._nsMap[n.prefix?n.localName:""]}function v(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function y(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,v(e.ownerDocument,e),t}function x(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===J){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do i.parentNode=e;while(i!==o&&(i=i.nextSibling));return v(e.ownerDocument||e,e),t.nodeType==J&&(t.firstChild=t.lastChild=null),t}function b(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);var r=e.lastChild}var r=e.lastChild;return t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,v(e.ownerDocument,e,t),t}function _(){this._nsMap={}}function w(){}function E(){}function S(){}function C(){}function T(){}function D(){}function A(){}function P(){}function k(){}function I(){}function F(){}function O(){}function N(e,t){switch(e.nodeType){case V:var n=e.attributes,r=n.length,i=e.firstChild,o=e.tagName,a=B===e.namespaceURI;t.push("<",o);for(var s=0;s"),a&&/^script$/i.test(o))i&&t.push(i.data);else for(;i;)N(i,t),i=i.nextSibling;t.push("")}else t.push("/>");return;case X:case J:for(var i=e.firstChild;i;)N(i,t), i=i.nextSibling;return;case G:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,f),'"');case W:return t.push(e.data.replace(/[<&]/g,f));case Q:return t.push("");case $:return t.push("");case K:var u=e.publicId,c=e.systemId;if(t.push("');else if(c&&"."!=c)t.push(' SYSTEM "',c,'">');else{var l=e.internalSubset;l&&t.push(" [",l,"]"),t.push(">")}return;case q:return t.push("");case H:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function j(e,t,n){var r;switch(t.nodeType){case V:r=t.cloneNode(!1),r.ownerDocument=e;case J:break;case G:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(j(e,i,n)),i=i.nextSibling;return r}function R(e,t,n){var i=new t.constructor;for(var o in t){var s=t[o];"object"!=typeof s&&s!=i[o]&&(i[o]=s)}switch(t.childNodes&&(i.childNodes=new r),i.ownerDocument=e,i.nodeType){case V:var u=t.attributes,c=i.attributes=new a,l=u.length;c._ownerElement=i;for(var p=0;p0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=2==t.nodeType?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=2==t.nodeType?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return null==t}},e(U,p),e(U,p.prototype),h.prototype={nodeName:"#document",nodeType:X,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==J){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&1==e.nodeType&&(this.documentElement=e),x(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),y(this,e)},importNode:function(e,t){return j(this,e,t)},getElementById:function(e){var t=null;return d(this.documentElement,function(n){if(1==n.nodeType&&n.getAttribute("id")==e)return t=n,!0}),t},createElement:function(e){var t=new _;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new r;var n=t.attributes=new a;return n._ownerElement=t,t},createDocumentFragment:function(){var e=new I;return e.ownerDocument=this,e.childNodes=new r,e},createTextNode:function(e){var t=new S;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new C;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new T;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new F;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new w;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new k;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new _,i=t.split(":"),o=n.attributes=new a;return n.childNodes=new r,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,o._ownerElement=n,n},createAttributeNS:function(e,t){var n=new w,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},t(h,p),_.prototype={nodeType:V,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===J?this.insertBefore(e,null):b(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new i(this,function(t){var n=[];return d(t,function(r){r===t||r.nodeType!=V||"*"!==e&&r.tagName!=e||n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new i(this,function(n){var r=[];return d(n,function(i){i===n||i.nodeType!==V||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)}),r})}},h.prototype.getElementsByTagName=_.prototype.getElementsByTagName,h.prototype.getElementsByTagNameNS=_.prototype.getElementsByTagNameNS,t(_,p),w.prototype.nodeType=G,t(w,p),E.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ee[3])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){var r=this.data.substring(0,e),i=this.data.substring(e+t);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}},t(E,p),S.prototype={nodeName:"#text",nodeType:W,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},t(S,E),C.prototype={nodeName:"#comment",nodeType:$},t(C,E),T.prototype={nodeName:"#cdata-section",nodeType:Q},t(T,E),D.prototype.nodeType=K,t(D,p),A.prototype.nodeType=Y,t(A,p),P.prototype.nodeType=z,t(P,p),k.prototype.nodeType=H,t(k,p),I.prototype.nodeName="#document-fragment",I.prototype.nodeType=J,t(I,p),F.prototype.nodeType=q,t(F,p),O.prototype.serializeToString=function(e){var t=[];return N(e,t),t.join("")},p.prototype.toString=function(){return O.prototype.serializeToString(this)};try{Object.defineProperty&&(Object.defineProperty(i.prototype,"length",{get:function(){return o(this),this.$$length}}),Object.defineProperty(p.prototype,"textContent",{get:function(){return M(this)},set:function(e){switch(this.nodeType){case 1:case 11:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=value,this.nodeValue=e}}}),L=function(e,t,n){e["$$"+t]=n})}catch(e){}return l}),define("sap.watt.ideplatform.test.testresult/../../../lib/XMLDomParser/dom_parser",["./sax","./dom"],function(e,t){"use strict";function n(e){if(e)this.options=e;else{this.options={locator:{},domBuilder:new i,xmlns:{},errors:[]};var t=this.options.errors;this.options.errorHandler={fatalError:function(e,n,r){t.push({row:r.lineNumber,column:r.columnNumber,text:n,type:"error"})},error:function(e,n,r){t.push({row:r.lineNumber,column:r.columnNumber,text:n,type:"error"})},warning:function(e,n,r){t.push({row:r.lineNumber,column:r.columnNumber,text:n,type:"warning"})}}}}function r(e,t,n){function r(t){var r=e[t];if(!r)if(s)r=2==e.length?function(n){e(t,n)}:e;else for(var i=arguments.length;--i&&!(r=e[arguments[i]]););o[t]=r&&function(e){r(e+a(n),e,n)}||function(){}}if(!e){if(t instanceof i)return t;e=t}var o={},s=e instanceof Function;return n=n||{},r("warning","warn"),r("error","warn","warning"),r("fatalError","warn","warning","error"),o}function i(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function s(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function u(e,t){e.currentElement?e.currentElement.appendChild(t):e.document.appendChild(t)}return n.prototype.parseFromString=function(t,n){var o=this.options,a=new e,s=o.domBuilder||new i,u=o.errorHandler,c=o.locator,l=o.xmlns||{},p={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return c&&s.setDocumentLocator(c),a.errorHandler=r(u,s,c),a.domBuilder=o.domBuilder||s,/\/x?html?$/.test(n)&&(p.nbsp=" ",p.copy="©",l[""]="http://www.w3.org/1999/xhtml"),t?a.parse(t,l,p):a.errorHandler.error("invalid document source"),s.document},i.prototype={startDocument:function(){this.document=(new t).createDocument(null,null,null),this.locator&&(this.document.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.document,a=i.createElementNS(e,n||t),s=r.length;u(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var c=0;c1&&(n.resource.line=parseInt(s[1]))}return e.getAttribute("message")?(n.message=e.getAttribute("message"),n.stack=r):e.getAttribute("type")?(n.message=e.getAttribute("type"),n.stack=r):n.message=r,Q(n)},n}),define("sap.watt.ideplatform.test.testresult/service/TestClientPart",["sap/watt/platform/plugin/platform/service/ui/AbstractPart","sap/watt/ideplatform/che/plugin/chebackend/io/Request","./Util","./CoverageManager","./Xml2JsonConverter"],function(e,t,n,r,i){"use strict";var o=e.extend("sap.watt.ideplatform.test.testresult.service.TestClientPart",{_oView:null,_oConfig:null,_oTestResultProviders:null,_oCurrentProject:null,_oCoverageManager:null,_oXml2JsonConverter:null,_oPlaceHolder:null,configure:function(t){var n=this,r=arguments,i=[];return n._oConfig=t,n._oTestResultProviders={},n._oConfig.testResultProviders&&n._oConfig.testResultProviders.forEach(function(e){if(!e.id)return void n._logError("","Missing id: "+e);if(!e.projectTypeIds)return void n._logError("","Missing projectTypeIds for provider '"+e.id+"'");if(!$.isArray(e.projectTypeIds))return void n._logError("","projectTypeIds must be an array for provider '"+e.id+"'");if(!e.service)return void n._logError("","Missing service for provider '"+e.id+"'");e.projectTypeIds.forEach(function(t){if(n._oTestResultProviders[t]){var r=n._oTestResultProviders[t].id,i="provider '"+e.id+"' tries to register type '"+t+"' already registered by provider '"+r+"'";n._logError("",i)}else n._oTestResultProviders[t]=e,e.context={service:n.context.service}});try{e.service.attachEvent("testResultAvailable",n._onTestResultAvailable,n)}catch(e){n._logError("",e)}i.push(e.service.getCapabilities().then(function(t){e.capabilities=t||[]}))}),Q.all(i).then(function(){return e.prototype.configure.apply(n,r)})},hasProviders:function(){return this._oTestResultProviders&&Object.keys(this._oTestResultProviders).length>0},getCoverageManager:function(){return this._oCoverageManager||(this._oCoverageManager=new r(this.context)),this._oCoverageManager},getXml2JsonConverter:function(){return this._oXml2JsonConverter||(this._oXml2JsonConverter=new i),this._oXml2JsonConverter},getAllProjects:function(){var e=this,r=2;return n.createServiceUri("/project/{{workspaceId}}/tree/?depth="+r).then(function(e){return t.send(e,"GET",{},{})}).then(function(t){var n=e._getProjectNames(t);return Q(n)})},_getProjectNames:function(e){var t=this,n=[];return e.node&&"project"===e.node.type&&n.push(e.node.path),e.children&&e.children.forEach(function(e){var r=t._getProjectNames(e);n=n.concat(r)}),n},_onTestResultAvailable:function(e){var t=this;if(t.hasProviders()){var n=e.params.projectPath,r=e.params.testResults;t._createView(t);var i=t._oView.getController(),o=i.getCurrentProjectPath();t.isVisible()&&o!==n||(i.setSelectedProject(t._oCurrentProject),t.setVisible(!0).then(function(){return r?i.setHistoryData(r,n):i.loadTestResults(o)}).then(function(e){if(e&&e.length>1)return i.showTestRun(e[1],o)}).done())}},_logError:function(e,t){this.context.service.log.error(e,t,["system"]).done()},_logWarn:function(e,t){this.context.service.log.warn(e,t,["system"]).done()},getView:function(){return this._oView},getTestResultProvider:function(e){return this._oTestResultProviders[e]},providerSupportsGetExportUrls:function(e){return e&&e.capabilities.indexOf("getExportUrls")>=0},providerSupportsDeleteTestResults:function(e){return e&&e.capabilities.indexOf("deleteTestResults")>=0},providerSupportsGetTestCoverage:function(e){return e&&e.capabilities.indexOf("getTestCoverage")>=0},_createView:function(e){var t=this;t._oView||(t._oView=sap.ui.view({viewName:"sap.watt.ideplatform.test.testresult.view.TestClient",type:sap.ui.core.mvc.ViewType.JS,viewData:{part:e}}),t.context.i18n.applyTo(t._oView))},getContent:function(){var t=this;if(t.hasProviders())return t._createView(t),t.context.service.resource.includeStyles(t._oConfig.styles).then(function(){return e.prototype.getContent.apply(t,arguments)}).then(function(){return Q(t._oView)});if(!t._oPlaceHolder){t._oPlaceHolder=new sap.ui.commons.Label({text:"No test result providers configured. "});var n={onAfterRendering:function(){t.setVisible(!1).done()}};t._oPlaceHolder.addEventDelegate(n,t),t._logWarn("Test Results","All test result providers have been removed but test result view was open. Closing test result view.")}return t.context.service.resource.includeStyles(t._oConfig.styles).then(function(){return e.prototype.getContent.apply(t,arguments)}).then(function(){return Q(t._oPlaceHolder)})},setVisible:function(t){var n=this;return e.prototype.setVisible.apply(n,[t]).then(function(){if(n._oView)return n._oView.getController().onPartVisible(t)})},onSetSelection:function(e){var t=this,n=e.params.selection;if(Array.isArray(n)&&n.length>0&&n[0].document)return n[0].document.getProject().then(function(e){if(t._oCurrentProject=e,t._oView)return t._oView.getController().setSelectedProject(e)})}});return o}),define("sap.watt.ideplatform.debug.core/command/DebugCommand",["sap/watt/ideplatform/debug/core/service/DebugPlatform"],function(e){"use strict";function t(){return this}return t.prototype={},t.prototype.getDebugProcessorCommands=function(){var e=this;return Q.all(Object.keys(t.DEBUG_COMMANDS).map(function(n){return e.context.service.command.getCommand(t.DEBUG_COMMANDS[n])}))},t.prototype.invalidateDebugCommands=function(){var e=this;return this.getDebugProcessorCommands().then(function(t){return e.context.service.command.context.event.fireInvalidated({commands:t})})},t.prototype.getSelectedDebugCommandProcessor=function(n){var r=this;return Q.all([this.getSelectedProject(),this.getSelectedDebugSession(),this.context.service.debug.client.getSelectedDebugSession()]).spread(function(i,o,a){if(o=i?o:a)switch(n){case t.DEBUG_COMMANDS.SUSPEND:case t.DEBUG_COMMANDS.RESUME:if(o===a)return r.context.service.debug.client.getDebugSuspendProcessor();if(o.getSingleThreaded())return o.hasThreads()?o.getThreads()[0].queryInterface("sap.watt.ideplatform.debug.core.service.extension.DebugSuspendProcessor"):void 0;break;case t.DEBUG_COMMANDS.STEP_OVER:case t.DEBUG_COMMANDS.STEP_INTO:case t.DEBUG_COMMANDS.STEP_OUT:if(o===a)return r.context.service.debug.client.getDebugStepProcessor();if(o.getSingleThreaded())return o.hasThreads()?o.getThreads()[0].queryInterface("sap.watt.ideplatform.debug.core.service.extension.DebugStepProcessor"):void 0;break;case t.DEBUG_COMMANDS.SUSPEND_ALL:case t.DEBUG_COMMANDS.RESUME_ALL:if(!o.getSingleThreaded())return o;break;default:e.logError($.sap.formatMessage("Internal error: invalid command id [{0}]",n))}})},t.prototype.getSelectedDebugSession=function(){var e=this;return this.getSelectedProject().then(function(t){if(t&&t.getEntity())return e.context.service.debug.sessionManager.getDebugSessions().then(function(e){if(e&&e.length>0){var n=t.getEntity().getFullPath(),r=e.filter(function(e){return e&&e.getLaunchConfiguration()&&e.getLaunchConfiguration().getProjectPath()===n});return 1===r.length?r[0]:void 0}})})},t.prototype.getSelectedProject=function(){return this.context.service.selection.getSelection().then(function(e){if(Array.isArray(e)&&e.length>0&&e[0].document)return e[0].document.getProject()})},t.DEBUG_COMMANDS={SUSPEND:"sap.watt.ideplatform.debug.core.suspend",RESUME:"sap.watt.ideplatform.debug.core.resume",SUSPEND_ALL:"sap.watt.ideplatform.debug.core.suspendAll",RESUME_ALL:"sap.watt.ideplatform.debug.core.resumeAll",STEP_OVER:"sap.watt.ideplatform.debug.core.stepOver",STEP_INTO:"sap.watt.ideplatform.debug.core.stepInto",STEP_OUT:"sap.watt.ideplatform.debug.core.stepOut"},t}),define("sap.watt.ideplatform.debug.core/command/Suspend",["./DebugCommand"],function(e){"use strict";function t(){return e.call(this),this}return t.prototype=Object.create(e.prototype),t.prototype.execute=function(){var t=this;return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.SUSPEND).then(function(e){if(e)return e.suspend().then(function(){return t.invalidateDebugCommands()})})},t.prototype.isAvailable=function(){return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.SUSPEND).then(function(e){return!e||e.canSuspend()})},t.prototype.isEnabled=function(){return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.SUSPEND).then(function(e){return!!e&&(!(e instanceof sap.watt.ideplatform.debug.core.model.DebugSession&&!e.getSingleThreaded())&&e.canSuspend())})},t}),define("sap.watt.ideplatform.debug.core/command/Resume",["./DebugCommand"],function(e){"use strict";function t(){return e.call(this),this}return t.prototype=Object.create(e.prototype),t.prototype.execute=function(){var t=this;return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.RESUME).then(function(e){if(e)return e.resume().then(function(){return t.invalidateDebugCommands()})})},t.prototype.isAvailable=function(){return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.RESUME).then(function(e){return!!e&&(!(e instanceof sap.watt.ideplatform.debug.core.model.DebugSession&&!e.getSingleThreaded())&&e.canResume())})},t}),define("sap.watt.ideplatform.debug.core/command/SuspendAll",["./DebugCommand"],function(e){"use strict";function t(){return e.call(this),this}return t.prototype=Object.create(e.prototype),t.prototype.execute=function(){var t=this;return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.SUSPEND_ALL).then(function(e){return!!e&&e.suspend().then(function(){return t.invalidateDebugCommands()})})},t.prototype.isAvailable=function(){return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.SUSPEND_ALL).then(function(e){return!!e})},t.prototype.isEnabled=function(){return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.SUSPEND_ALL).then(function(e){return!!e&&e.canSuspend()})},t}),define("sap.watt.ideplatform.debug.core/command/ResumeAll",["./DebugCommand"],function(e){"use strict";function t(){return e.call(this),this}return t.prototype=Object.create(e.prototype),t.prototype.execute=function(){var t=this;return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.RESUME_ALL).then(function(e){return!!e&&e.resume().then(function(){return t.invalidateDebugCommands()})})},t.prototype.isAvailable=function(){return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.RESUME_ALL).then(function(e){return!!e})},t.prototype.isEnabled=function(){return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.RESUME_ALL).then(function(e){return!!e&&e.canResume()})},t}),define("sap.watt.ideplatform.debug.core/command/StepOver",["./DebugCommand"],function(e){"use strict";function t(){return e.call(this),this}return t.prototype=Object.create(e.prototype),t.prototype.execute=function(){var t=this;return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.STEP_OVER).then(function(e){if(e)return e.stepOver().then(function(){return t.invalidateDebugCommands()})})},t.prototype.isEnabled=function(){return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.STEP_OVER).then(function(e){return!!e&&e.canStepOver()})},t}),define("sap.watt.ideplatform.debug.core/command/StepInto",["./DebugCommand"],function(e){"use strict";function t(){return e.call(this),this}return t.prototype=Object.create(e.prototype),t.prototype.execute=function(){var t=this;return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.STEP_INTO).then(function(e){if(e)return e.stepInto().then(function(){return t.invalidateDebugCommands()})})},t.prototype.isEnabled=function(){return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.STEP_INTO).then(function(e){return!!e&&e.canStepInto()})},t}),define("sap.watt.ideplatform.debug.core/command/StepOut",["./DebugCommand"],function(e){"use strict";function t(){return e.call(this),this}return t.prototype=Object.create(e.prototype),t.prototype.execute=function(){var t=this;return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.STEP_OUT).then(function(e){if(e)return e.stepOut().then(function(){return t.invalidateDebugCommands()})})},t.prototype.isEnabled=function(){return this.getSelectedDebugCommandProcessor(e.DEBUG_COMMANDS.STEP_OUT).then(function(e){return!!e&&e.canStepOut()})},t}),define("sap.watt.ideplatform.debug.core/command/breakpoint/Remove",[],function(){"use strict";function e(){return this}return e.prototype={},e.prototype.execute=function(e){return this.context.service.debug.breakpointManager.removeBreakpoint(e)},e.prototype.isAvailable=function(e){return!!e.default},e}),define("sap.watt.ideplatform.debug.core/command/breakpoint/RemoveAll",[],function(){"use strict";function e(){return this}return e.prototype={},e.prototype.execute=function(){return this.context.service.debug.breakpointManager.removeBreakpoints()},e.prototype.isAvailable=function(e){return!!e.default},e}),define("sap.watt.ideplatform.debug.core/command/breakpoint/EnableAll",[],function(){"use strict";function e(){return this}return e.prototype={},e.prototype.execute=function(){return this.context.service.debug.breakpointManager.getBreakpoints().then(function(e){for(var t=0;t0})},e}),define("sap.watt.ideplatform.debug.core/command/breakpoint/DisableAll",[],function(){"use strict";function e(){return this}return e.prototype={},e.prototype.execute=function(){return this.context.service.debug.breakpointManager.getBreakpoints().then(function(e){for(var t=0;t0})},e}),define("sap.watt.ideplatform.debug.core/command/breakpoint/ActivateBreakpoints",[],function(){"use strict";function e(){return this}return e.prototype={},e.prototype.execute=function(){return this.context.service.debug.breakpointManager.setEnabled(!0)},e.prototype.isAvailable=function(){return this.context.service.debug.breakpointManager.getEnabled().then(function(e){return!e})},e}),define("sap.watt.ideplatform.debug.core/command/breakpoint/DeactivateBreakpoints",[],function(){"use strict";function e(){return this}return e.prototype={},e.prototype.execute=function(){return this.context.service.debug.breakpointManager.setEnabled(!1)},e.prototype.isAvailable=function(){return this.context.service.debug.breakpointManager.getEnabled()},e}),define("sap/watt/ideplatform/debug/core/ui/EditWatchExpressionDialog",["sap/watt/ideplatform/debug/core/service/DebugPlatform"],function(e){"use strict";var t=function(e,t){this.context=e,this.expression=t,this.model=new sap.ui.model.json.JSONModel,this.isEditMode=!!t};return t.prototype.open=function(){var t,n,r=this,i=Q.defer(),o=function(){var o=n.getValue();r.isEditMode?(r._equalsExpressionText(o,r.expression.getExpressionText())||r.expression.setExpressionText(o),i.resolve(r.expression)):r.selectedDebugConfig&&r.selectedDebugConfig.watchExpressions.lifecycle.service.create({debugModelId:r.selectedDebugConfig.debugModelId,expressionText:o}).then(function(t){t||e.getLogger().logError($.sap.formatMessage("Failed to create watch expression object for debug model [{0}]",r.selectedDebugConfig.debugModelId)),i.resolve(t)}).fail(function(t){e.getLogger().logError($.sap.formatMessage("Failed to create watch expression for model type [{0}]",r.selectedDebugConfig.debugModelId)),e.getLogger().logError(t),i.reject(t)}),t.close()},a=function(){t.close(),i.resolve()},s=new sap.m.Button({text:"{i18n>editExpressionDialog_cancel_xbut}",press:a}),u=new sap.m.Button({text:"{i18n>editExpressionDialog_ok_xbut}",type:sap.m.ButtonType.Emphasized,press:o}),c=new sap.m.Label({text:"Runtime:"}).addStyleClass("debugViewDefaultPaddingNone"),l=new sap.m.ComboBox({width:"100%",items:{path:"debugRegistry>/",template:new sap.ui.core.ListItem({key:"{debugRegistry>debugModelId}",text:"{debugRegistry>runtimeDisplayName}"})},selectionChange:function(e){r.selectedDebugConfig=e.getParameters().selectedItem; var t;r.selectedDebugConfig.editors&&r.selectedDebugConfig.editors.editMode&&(t=r.selectedDebugConfig.editors.editMode),n.getSession().setMode(t)}}),p=new sap.m.Label({text:"Expression text:"}).addStyleClass("debugViewDefaultPaddingTop");n=r._createEditorControl();var f=new sap.ui.layout.VerticalLayout({width:"calc(30rem)",content:[c,l,p,n]});return t=new sap.m.Dialog({title:"{i18n>editExpressionDialog_xtit}",buttons:[u,s],horizontalScrolling:!1,verticalScrolling:!1,content:[f],afterOpen:function(){t.$().bind("keypress",function(e){13!=e.keyCode||e.shiftKey||(e.preventDefault(),u.firePress())}),n.setValue(r.expression&&r.expression.getExpressionText()?r.expression.getExpressionText():""),n.setFocus()},afterClose:function(){n.destroy(),t.destroy()}}).addStyleClass("debugEditWatchExpressionDialog"),this.context.i18n.applyTo(t),t.open(),this.context.service.debug.registry.getConfigurations().then(function(e){var n=[];return $.each(e,function(e,t){t.watchExpressions&&n.push(t)}),r.model.setData(n,!1),r.model.setDefaultBindingMode("OneWay"),t.setModel(r.model,"debugRegistry"),1===n.length&&(l.setSelectedKey(n[0].debugModelId),l.fireSelectionChange({selectedItem:n[0]})),i.promise})},t.prototype._equalsExpressionText=function(e,t){return e==t},t.prototype._createEditorControl=function(){var e=this,t=new sap.watt.common.plugin.aceeditor.control.Editor({height:"calc(5rem)",width:"100%"});return t.addEventDelegate({onAfterRendering:function(){e.context.service.aceeditor.config.getUserSetting().then(function(e){t.setFontFamily(e.fontFamily),t.setFontSize(e.fontSize),t.setNewLineMode(e.newLineMode),t.setShowInvisibles(e.showInvisibles),t.setUseSoftTabs(e.useSoftTabs),t.setTheme(e.theme)}).done(),t.setReadOnly(!1),t.showGutter(!1)}}),t},t}),define("sap.watt.ideplatform.debug.core/command/watchExpression/AddWatchExpression",["sap/watt/ideplatform/debug/core/ui/EditWatchExpressionDialog"],function(e){"use strict";function t(){return this}return t.prototype={},t.prototype.execute=function(){var e=this;return this.openDialog().then(function(t){t&&e.context.service.debug.watchExpressionManager.addExpression(t)})},t.prototype.openDialog=function(){var t=new e(this.context,null);return t.open()},t.prototype.getUi5Editor=function(){return this.getCodeEditor().then(function(e){if(e)return e.getUI5Editor()})},t}),define("sap/watt/ideplatform/debug/core/model/managed/ManagedObjectBase",[],function(){"use strict";var e=sap.ui.base.ManagedObject.extend("sap.watt.ideplatform.debug.core.model.managed.ManagedObjectBase",{metadata:{abstract:!0,properties:{allocated:{type:"boolean",defaultValue:!0},uid:"string"},publicMethods:["addAggregations","refreshModel","implementsInterface"]}});return e.prototype.init=function(){},e.prototype.extractBindingInfo=function(e,t){return null},e.prototype.setUid=function(e){this.setProperty("uid",encodeURIComponent(e||this.getId()))},e.prototype.getUid=function(){var e=this.getProperty("uid");return e||this.getId()},e.prototype.setProperty=function(e,t,n){if(this.getProperty(e)!==t)try{return sap.ui.base.ManagedObject.prototype.setProperty.apply(this,arguments)}finally{n||this.refreshModel()}},e.prototype.setAggregation=function(e,t,n){try{return sap.ui.base.ManagedObject.prototype.setAggregation.apply(this,arguments)}finally{n||this.refreshModel()}},e.prototype.addAggregation=function(e,t,n){try{return sap.ui.base.ManagedObject.prototype.addAggregation.apply(this,arguments)}finally{n||this.refreshModel()}},e.prototype.addAggregations=function(e,t,n){var r=this;try{t&&t.forEach(function(t){sap.ui.base.ManagedObject.prototype.addAggregation.call(r,e,t,n)})}finally{n||this.refreshModel()}},e.prototype.insertAggregation=function(e,t,n,r){try{return sap.ui.base.ManagedObject.prototype.insertAggregation.apply(this,arguments)}finally{r||this.refreshModel()}},e.prototype.removeAggregation=function(e,t,n){try{return sap.ui.base.ManagedObject.prototype.removeAggregation.apply(this,arguments)}finally{n||this.refreshModel()}},e.prototype.removeAllAggregation=function(e,t){try{return sap.ui.base.ManagedObject.prototype.removeAllAggregation.apply(this,arguments)}finally{t||this.refreshModel()}},e.prototype.setAssociation=function(e,t,n){try{return sap.ui.base.ManagedObject.prototype.setAssociation.apply(this,arguments)}finally{n||this.refreshModel()}},e.prototype.addAssociation=function(e,t,n){try{return sap.ui.base.ManagedObject.prototype.addAssociation.apply(this,arguments)}finally{n||this.refreshModel()}},e.prototype.removeAssociation=function(e,t,n){try{return sap.ui.base.ManagedObject.prototype.removeAssociation.apply(this,arguments)}finally{n||this.refreshModel()}},e.prototype.removeAllAssociation=function(e,t){try{return sap.ui.base.ManagedObject.prototype.removeAllAssociation.apply(this,arguments)}finally{t||this.refreshModel()}},e.prototype.refreshModel=function(){this.getModel()&&this.getModel().refresh()},e.prototype.queryInterface=function(t){if(this._implementsInterface(t))return this;var n=this.getParent();return n instanceof e?n.queryInterface(t):null},e.prototype._implementsInterface=function(e){for(var t=this.getMetadata();t&&"sap.ui.base.ManagedObject"!==t.getName();){if(t.getInterfaces().indexOf(e)!==-1)return!0;t=t.getParent()}return!1},e.prototype._instanceOf=function(e){if(e)for(var t=this.getMetadata();t&&"sap.ui.base.ManagedObject"!==t.getName();){if(t.getName()===e)return!0;t=t.getParent()}return!1},e}),define("sap/watt/ideplatform/debug/core/model/Expression",["./managed/ManagedObjectBase"],function(e){"use strict";var t=e.extend("sap.watt.ideplatform.debug.core.model.Expression",{metadata:{properties:{debugModelId:"string",expressionText:"string"},aggregations:{value:{type:"sap.watt.ideplatform.debug.core.model.Variable",multiple:!1}}}});return t.prototype.init=function(){this.setAllocated(!1),e.prototype.init.apply(this,[])},t}),define("sap/watt/ideplatform/debug/core/model/WatchExpression",["./managed/ManagedObjectBase","./Expression"],function(e,t){"use strict";var n=t.extend("sap.watt.ideplatform.debug.core.model.WatchExpression",{metadata:{properties:{enabled:{type:"boolean",defaultValue:!0}},publicMethods:["getDebugSession","getDebugSessionId","getContext","setContext"]},_stackFrame:null});return n.prototype.setExpressionText=function(e){this._setPropertyNotifyEvent("expressionText",e)},n.prototype.setEnabled=function(e){this._setPropertyNotifyEvent("enabled",e)},n.prototype.setValue=function(e){this._setAggregationNotifyEvent("value",e)},n.prototype.setContext=function(e){if(e&&e.getDebugModelId()!==this.getDebugModelId())throw new Error('stackFrame "'+e+'" is not valid for this "expression", debugModelId "'+this.getDebugModelId()+'" does not match "'+e.getDebugModelId()+'"');this._stackFrame=e,this.setAllocated(!1),this.setValue(null)},n.prototype.getContext=function(){return this._stackFrame},n.prototype.getDebugSession=function(){return this._stackFrame?this._stackFrame.getDebugSession():null},n.prototype.getDebugSessionId=function(){return this._stackFrame?this._stackFrame.getDebugSessionId():null},n.prototype.queryInterface=function(t){var n=e.prototype.queryInterface(t);return!n&&this._stackFrame&&(n=this._stackFrame.queryInterface(t)),n},n.prototype._setPropertyNotifyEvent=function(e,t,n){var r=this.getProperty(e);t!==r&&(this.setProperty(e,t,n),!n&&this.getParent()&&this.getParent().fireExpressionChanged&&this.getParent().fireExpressionChanged({source:this,details:[{name:e,oldValue:r}]}))},n.prototype._setAggregationNotifyEvent=function(e,t,n){var r=this.getAggregation(e);t!==r&&(this.setAggregation(e,t,n),!n&&this.getParent()&&this.getParent().fireExpressionChanged&&this.getParent().fireExpressionChanged({source:this,details:[{name:e,oldValue:r}]}))},n}),define("sap.watt.ideplatform.debug.core/command/watchExpression/EditWatchExpression",["sap/watt/ideplatform/debug/core/model/WatchExpression","sap/watt/ideplatform/debug/core/ui/EditWatchExpressionDialog"],function(e,t){"use strict";function n(){return this}return n.prototype={},n.prototype.constructor=n,n.prototype.execute=function(e){var t=e&&1===e.length?e[0]:void 0;if(t)return this.openDialog(e[0]).then(function(e){e&&e.changed&&t.setExpressionText(e.expressionText)})},n.prototype.isEnabled=function(t){return Q(t&&Array.isArray(t.default)&&1===t.default.length&&t.default[0]instanceof e)},n.prototype.openDialog=function(e){var n=new t(this.context,e);return n.open()},n.prototype.getUi5Editor=function(){return this.getCodeEditor().then(function(e){if(e)return e.getUI5Editor()})},n}),define("sap.watt.ideplatform.debug.core/command/watchExpression/RemoveWatchExpressions",["sap/watt/ideplatform/debug/core/model/WatchExpression"],function(e){"use strict";function t(){return this}return t.prototype={},t.prototype.constructor=t,t.prototype.execute=function(e){return this.context.service.debug.watchExpressionManager.removeExpressions(e)},t.prototype.isEnabled=function(t){var n=!1;return t&&Array.isArray(t.default)&&t.default.length>0&&$.each(t.default,function(t,r){if(r instanceof e)return n=!0,!1}),Q(n)},t}),define("sap/watt/ideplatform/debug/core/util/Logger",[],function(){"use strict";var e=function(e){this._log=e.service.log,this._isDebug};return e.prototype._getUrlParam=function(e,t){if(window.location.href){var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(window.location.href);return n?n[1]||t:t}},e.prototype.isDebug=function(){return void 0===this._isDebug&&(this._isDebug=this._getUrlParam("sap-ide-debug",!1)||!1),this._isDebug},e.prototype.logDebug=function(e){this.isDebug()&&window.console&&window.console.log("DEBUG: "+e)},e.prototype.logInfo=function(e){window.console&&window.console.log("INFO: "+e)},e.prototype.logError=function(e){window.console&&window.console.error("ERROR: "+e)},e}),define("sap.watt.ideplatform.debug.core/service/DebugPlatform",["sap/watt/ideplatform/debug/core/util/Logger"],function(e){"use strict";var t=null,n=function(){return t||(t=this),t};return n.prototype.configure=function(t){this._logger=new e(this.context)},n.prototype.getLogger=function(){return this._logger||(this._logger=new e(this.context)),this._logger},n.prototype.getContext=function(){return this.context},n.prototype.ERROR_TIMEOUT="Timeout",new n}),define("sap/watt/ideplatform/debug/core/model/DebugElement",["./managed/ManagedObjectBase"],function(e){"use strict";var t=e.extend("sap.watt.ideplatform.debug.core.model.DebugElement",{metadata:{abstract:!0,properties:{name:"string"},publicMethods:["getDebugSession","getDebugSessionId","getDebugModelId"]}});return t.prototype.getDebugSession=function(){return this.getParent()instanceof t?this.getParent().getDebugSession():null},t.prototype.getDebugSessionId=function(){return this.getParent()instanceof t?this.getParent().getDebugSessionId():null},t.prototype.getDebugModelId=function(){var e=this.getDebugSession();return e?e.getDebugModelId():null},t}),define("sap/watt/ideplatform/debug/core/model/Thread",["sap/watt/ideplatform/debug/core/service/DebugPlatform","./DebugElement"],function(e,t){"use strict";var n=t.extend("sap.watt.ideplatform.debug.core.model.Thread",{metadata:{abstract:!0,properties:{suspended:{type:"boolean",defaultValue:!1},stepping:{type:"boolean",defaultValue:!1},debugOperation:"string"},aggregations:{stackFrames:{multiple:!0,type:"sap.watt.ideplatform.debug.core.model.StackFrame"}},interfaces:["sap.watt.ideplatform.debug.core.service.extension.DebugSuspendProcessor","sap.watt.ideplatform.debug.core.service.extension.DebugStepProcessor"],publicMethods:["getTopStackFrame","hasStackFrames","addStackFrames"]}}),r="Not implemented";return n.prototype.getTopStackFrame=function(){return this.getStackFrames().length>0?this.getStackFrames()[0]:null},n.prototype.hasStackFrames=function(){return this.getStackFrames().length>0},n.prototype.addStackFrames=function(e){this.addAggregations("stackFrames",e)},n.prototype.getResumeReason=function(){var e=this.getDebugOperation();switch(e){case n.DEBUG_OPERATION_TYPE.STEP_OVER:return n.DEBUG_SUSPEND_RESUME_REASON_TYPE.STEP_OVER;case n.DEBUG_OPERATION_TYPE.STEP_INTO:return n.DEBUG_SUSPEND_RESUME_REASON_TYPE.STEP_INTO;case n.DEBUG_OPERATION_TYPE.STEP_OUT:return n.DEBUG_SUSPEND_RESUME_REASON_TYPE.STEP_OUT;case n.DEBUG_OPERATION_TYPE.EVALUATE:return n.DEBUG_SUSPEND_RESUME_REASON_TYPE.EVALUATE;case n.DEBUG_OPERATION_TYPE.SUSPEND:case n.DEBUG_OPERATION_TYPE.RESUME:return n.DEBUG_SUSPEND_RESUME_REASON_TYPE.CLIENT_REQUEST;default:return n.DEBUG_SUSPEND_RESUME_REASON_TYPE.UNSPECIFIED}},n.prototype.getSuspendReason=function(){var e=this.getDebugOperation();switch(e){case n.DEBUG_OPERATION_TYPE.STEP_OVER:case n.DEBUG_OPERATION_TYPE.STEP_INTO:case n.DEBUG_OPERATION_TYPE.STEP_OUT:return n.DEBUG_SUSPEND_RESUME_REASON_TYPE.STEP_END;case n.DEBUG_OPERATION_TYPE.EVALUATE:return n.DEBUG_SUSPEND_RESUME_REASON_TYPE.EVALUATE;case n.DEBUG_OPERATION_TYPE.SUSPEND:case n.DEBUG_OPERATION_TYPE.RESUME:return n.DEBUG_SUSPEND_RESUME_REASON_TYPE.CLIENT_REQUEST;default:return n.DEBUG_SUSPEND_RESUME_REASON_TYPE.UNSPECIFIED}},n.prototype._getConnected=function(){var e=this.getDebugSession();return!!e&&e.getConnected()},n.prototype.suspend=function(){return Q.reject(r)},n.prototype.resume=function(){return Q.reject(r)},n.prototype.canSuspend=function(){return Q(this._getConnected()&&!this.getSuspended())},n.prototype.canResume=function(){return Q(this._getConnected()&&this.getSuspended())},n.prototype.stepOver=function(){return Q.reject(r)},n.prototype.stepInto=function(){return Q.reject(r)},n.prototype.stepOut=function(){return Q.reject(r)},n.prototype.canStepOver=function(){return Q(this._getConnected()&&this.getSuspended())},n.prototype.canStepInto=function(){return Q(this._getConnected()&&this.getSuspended())},n.prototype.canStepOut=function(){return Q(this._getConnected()&&this.getSuspended())},n.DEBUG_OPERATION_TYPE={STEP_OVER:"stepOver",STEP_INTO:"stepInto",STEP_OUT:"stepOut",EVALUATE:"evaluate",SUSPEND:"suspend",RESUME:"resume"},n.DEBUG_SUSPEND_RESUME_REASON_TYPE={STEP_OVER:"stepOver",STEP_INTO:"stepInto",STEP_OUT:"stepOut",STEP_END:"stepEnd",EVALUATE:"evaluate",CLIENT_REQUEST:"clientRequest",BREAKPOINT:"breakpoint",UNSPECIFIED:"unspecified"},n}),define("sap/watt/ideplatform/debug/core/model/StackFrame",["./DebugElement","./Thread"],function(e,t){"use strict";var n=e.extend("sap.watt.ideplatform.debug.core.model.StackFrame",{metadata:{abstract:!0,aggregations:{variables:{multiple:!0,type:"sap.watt.ideplatform.debug.core.model.Variable"},location:{multiple:!1,type:"sap.watt.ideplatform.debug.core.model.LineLocation"}},publicMethods:["hasVariables","addVariables","getThread"]}});return n.prototype.hasVariables=function(){return this.getVariables().length>0},n.prototype.getThread=function(){return this.getParent()instanceof t?this.getParent():null},n.prototype.addVariables=function(e){this.addAggregations("variables",e)},n}),define("sap/watt/ideplatform/debug/core/model/DebugSession",["./DebugElement","./Thread","./StackFrame"],function(e,t,n){"use strict";var r=e.extend("sap.watt.ideplatform.debug.core.model.DebugSession",{metadata:{abstract:!0,properties:{connected:{type:"boolean",defaultValue:!1},singleThreaded:{type:"boolean",defaultValue:!0}},aggregations:{threads:{type:"sap.watt.ideplatform.debug.core.model.Thread",multiple:!0},launchConfiguration:{type:"sap.watt.ideplatform.debug.core.model.LaunchConfiguration",multiple:!1}},events:{threadSuspended:{parameters:{thread:"sap.watt.ideplatform.debug.core.model.Thread",reason:"string",stackFrame:{type:"sap.watt.ideplatform.debug.core.model.StackFrame"},breakpoint:{type:"sap.watt.ideplatform.debug.core.model.Breakpoint"}}},threadResumed:{parameters:{thread:{type:"sap.watt.ideplatform.debug.core.model.Thread"},reason:{type:"string"}}},threadStarted:{parameters:{thread:"sap.watt.ideplatform.debug.core.model.Thread"}},threadEnded:{parameters:{thread:"sap.watt.ideplatform.debug.core.model.Thread"}}},interfaces:["sap.watt.ideplatform.debug.core.service.extension.DebugSuspendProcessor"],publicMethods:["getDebugSession","getDebugSessionId","getDebugModelId","hasThreads"]}});return r.prototype.getDebugSession=function(){return this},r.prototype.getDebugSessionId=function(){return this.getLaunchConfiguration()?this.getLaunchConfiguration().getDebugSessionId():null},r.prototype.setLaunchConfiguration=function(e){e&&e.getProjectPath()&&this.setUid(e.getProjectPath()),this.setAggregation("launchConfiguration",e)},r.prototype.getDebugModelId=function(){return this.getLaunchConfiguration()?this.getLaunchConfiguration().getDebugModelId():null},r.prototype.hasThreads=function(){return this.getThreads().length>0},r.prototype.suspend=function(){var e=[];return this.getThreads().forEach(function(t){e.push(t.suspend())}),Q.all(e)},r.prototype.resume=function(){var e=[];return this.getThreads().forEach(function(t){e.push(t.resume())}),Q.all(e)},r.prototype.canResume=function(){function e(e){return!e.getSuspended()}return Q(this.getConnected()&&!this.getThreads().every(e))},r.prototype.canSuspend=function(){function e(e){return e.getSuspended()}return Q(this.getConnected()&&!this.getThreads().every(e))},r.prototype.doFireThreadSuspended=function(e,r){if(!(e instanceof t||e instanceof n))throw new Error("Invalid parameter debugElement");var i=e instanceof t?e:e.getThread(),o=e instanceof n?e:void 0,a={thread:i,stackFrame:o,breakpoint:r,reason:r?"breakpoint":i.getSuspendReason()};this.fireThreadSuspended(a)},r.prototype.doFireThreadResumed=function(e){var t={thread:e,reason:e.getResumeReason()};this.fireThreadResumed(t)},r}),define("sap/watt/ideplatform/debug/core/model/Variable",["./DebugElement","./StackFrame"],function(e,t){"use strict";var n=e.extend("sap.watt.ideplatform.debug.core.model.Variable",{metadata:{abstract:!0,properties:{referenceTypeName:"string",valueString:"string",valueChanged:{type:"boolean",defaultValue:!1},supportsValueModification:{type:"boolean",defaultValue:!1},writable:{type:"boolean",defaultValue:"false"}},aggregations:{variables:{multiple:!0,type:"sap.watt.ideplatform.debug.core.model.Variable"}},publicMethods:["getStackFrame","hasVariables","addVariables"]}});return n.prototype.setName=function(e){this.setUid(e),this.setProperty("name",e)},n.prototype.getStackFrame=function(){return this.getParent()instanceof t?this.getParent():this.getParent()instanceof n?this.getParent().getStackFrame():null},n.prototype.getDebugSession=function(){return this.getParent()instanceof e?this.getParent().getDebugSession():this.getStackFrame()?this.getStackFrame().getDebugSession():null},n.prototype.hasVariables=function(){return this.getVariables().length>0},n.prototype.addVariables=function(e){this.addAggregations("variables",e)},n}),define("sap.watt.ideplatform.debug.core/service/DebugClient",["sap/watt/platform/plugin/platform/service/ui/AbstractPart","sap/watt/ideplatform/debug/core/service/DebugPlatform","sap/watt/ideplatform/debug/core/model/DebugSession","sap/watt/ideplatform/debug/core/model/Thread","sap/watt/ideplatform/debug/core/model/StackFrame","sap/watt/ideplatform/debug/core/model/Variable"],function(e,t,n,r,i,o){"use strict";var a=null,s=e.extend("sap.watt.ideplatform.debug.core.service.DebugClient",{});return s.prototype.configure=function(t){a||(a=this,a._view=null);var n=this;return e.prototype.configure.apply(this,arguments).then(function(){n.context.service.resource.includeStyles(t.styles).done()})},s.prototype.getContent=function(){var t=this;return this._view?this._view:this._createView().then(function(n){return t._view=n,e.prototype.getContent.apply(t,arguments).then(function(){return t._view})})},s.prototype.connectDebugSession=function(e){var t=this;return this.setVisible(!0).then(function(){return t._view.getController().connectDebugSession(e)})},s.prototype.connectDebugSessionToRunConfiguration=function(e){var t=this;return this.setVisible(!0).then(function(){return t._view.getController().connectDebugSessionToRunConfiguration(e)})},s.prototype.disconnectDebugSession=function(e){var t=this;return this.setVisible(!0).then(function(){return t._view.getController().disconnectDebugSession(e)})},s.prototype.setErrorMessage=function(e){this._view&&this._view.getController().setErrorMessage(e)},s.prototype.setWarningMessage=function(e){this._view&&this._view.getController().setWarningMessage(e)},s.prototype.setInfoMessage=function(e){this._view&&this._view.getController().setInfoMessage(e)},s.prototype.getDebugSuspendProcessor=function(){if(this._view)return this._view.getController().getDebugSuspendProcessor()},s.prototype.getDebugStepProcessor=function(){if(this._view)return this._view.getController().getDebugStepProcessor()},s.prototype.getSelectedDebugSession=function(){if(this._view)return this._view.getController().getSelectedDebugSession()},s.prototype.getSelectedThread=function(){if(this._view)return this._view.getController().getSelectedThread()},s.prototype.getSelectedStackFrame=function(){if(this._view)return this._view.getController().getSelectedStackFrame()},s.prototype.getSelectedBreakpoint=function(){if(this._view)return this._view.getController().getSelectedBreakpoint()},s.prototype._onBreakpointsChanged=function(e){this._view&&this._view.getController()._onBreakpointsChanged(e)},s.prototype._onWatchExpressionsChanged=function(e){this._view&&this._view.getController()._onWatchExpressionsChanged(e)},s.prototype._createView=function(){var e=this;return Q.all([this.context.service.debug.platform.getLogger(),this.context.service.debug.breakpointManager.getModel(),this.context.service.debug.sessionManager.getModel(),this.context.service.debug.watchExpressionManager.getModel()]).spread(function(t,n,r,i){var o=sap.ui.view({viewName:"sap.watt.ideplatform.debug.core.ui.DebugClient",type:sap.ui.core.mvc.ViewType.JS,viewData:{context:e.context,logger:t,breakpointModel:n,debugSessionModel:r,watchExpressionModel:i}});return e.context.i18n.applyTo(o),Q(o)})},s.prototype.setDebuggingActiveEnvState=function(e){window["sap-ide-env"]=window["sap-ide-env"]||{},window["sap-ide-env"]["sap.watt.ideplatform.debug.core.active"]=e},s}),define("sap/watt/ideplatform/debug/core/model/managed/ManagedObjectPropertyBinding",[],function(){"use strict";return jQuery.sap.require("sap.ui.model.json.JSONPropertyBinding"),sap.ui.model.json.JSONPropertyBinding.extend("sap.watt.ideplatform.debug.core.model.managed.ManagedObjectPropertyBinding")}),define("sap/watt/ideplatform/debug/core/model/managed/ManagedObjectListBinding",[],function(){"use strict";return jQuery.sap.require("sap.ui.model.json.JSONListBinding"),sap.ui.model.json.JSONListBinding.extend("sap.watt.ideplatform.debug.core.model.managed.ManagedObjectListBinding")}),define("sap/watt/ideplatform/debug/core/model/managed/ManagedObjectTreeBinding",[],function(){"use strict";jQuery.sap.require("sap.ui.model.json.JSONTreeBinding");var e=sap.ui.model.json.JSONTreeBinding.extend("sap.watt.ideplatform.debug.core.model.managed.ManagedObjectTreeBinding");return e.prototype.getNodeContexts=function(e,t,n){t||(t=0),n||(n=this.oModel.iSizeLimit);var r,i=this._sanitizePath(e.getPath()),o=[],a=this,s=this.oModel._getObject(i),u=this.mParameters&&this.mParameters.arrayNames;if(s instanceof sap.watt.ideplatform.debug.core.model.managed.ManagedObjectBase){var c=sap.watt.ideplatform.debug.core.model.managed.ManagedObjectModel._getAggregations(s.getMetadata());jQuery.each(c,function(e,t){(!u||Array.isArray(u)&&u.indexOf(t.name)!==-1&&t._sGetter)&&(r=s[t._sGetter].call(s),jQuery.isArray(r)?jQuery.each(r,function(e,n){a._saveSubContext(n,o,i,t.name+"/"+e)}):r instanceof sap.watt.ideplatform.debug.core.model.managed.ManagedObjectBase&&a._saveSubContext(r,o,i,t.name))})}else s&&jQuery.sap.each(s,function(e,t){jQuery.isArray(t)?jQuery.each(t,function(t,n){a._saveSubContext(n,o,i,e+"/"+t)}):"object"==typeof t&&a._saveSubContext(t,o,i,e)});return this._applySorter(o),this._setLengthCache(i,o.length),o.slice(t,t+n)},e.prototype.hasChildren=function(e){var t=!1;if(e){var n=this._sanitizePath(e.getPath()),r=this.mParameters&&this.mParameters.arrayNames,i=this.oModel._getObject(n);if(i instanceof sap.watt.ideplatform.debug.core.model.managed.ManagedObjectBase)if(i.getAllocated())t=this.getNodeContexts(e).length>0;else{var o=sap.watt.ideplatform.debug.core.model.managed.ManagedObjectModel._getAggregations(i.getMetadata());jQuery.each(o,function(e,n){if(!r||Array.isArray(r)&&r.indexOf(n.name)!==-1&&n._sGetter)return t=!0,!1})}else t=this.getNodeContexts(e).length>0}return t},e}),define("sap/watt/ideplatform/debug/core/model/managed/ManagedObjectModel",["./ManagedObjectPropertyBinding","./ManagedObjectListBinding","./ManagedObjectTreeBinding","./ManagedObjectBase"],function(e,t,n,r){"use strict";jQuery.sap.require("sap.ui.model.json.JSONModel");var i=sap.ui.model.json.JSONModel.extend("sap.watt.ideplatform.debug.core.model.managed.ManagedObjectModel",{constructor:function(e){sap.ui.model.json.JSONModel.apply(this,arguments)}});return i.prototype.getJSON=function(){return JSON.stringify(this.oData)},i.prototype.bindProperty=function(t,n,r){var i=new e(this,t,n,r);return i},i.prototype.bindList=function(e,n,r,i,o){var a=new t(this,e,n,r,i,o);return a},i.prototype.bindTree=function(e,t,r,i,o){var a=new n(this,e,t,r,i,o);return a},i.prototype.setProperty=function(e,t,n,r){var o,a,s,u=this.resolve(e,n);if(!u)return!1;if("/"==u)return this.setData(t),!0;o=u.lastIndexOf("/"),a=u.substring(0,o||1),s=u.substr(o+1);var c=this._getObject(a);if(Array.isArray(c)){o=a.lastIndexOf("/");var l=a.substring(0,o||1),p=a.substr(o+1),f=this._getObject(l);if(f instanceof sap.ui.base.ManagedObject){var d=parseInt(s);if(d0){var r=t.getParameters().source;n.changes.push({kind:"changed",breakpoint:r,details:t.getParameters().details}),e._notifyBreakpointsChanged(n)}}),this._defaultBreakpointLifecycleService={restore:function(e){var t;return e&&e.location&&e.location.lineNumber?(t=new r({enabled:e.enabled,debugModelId:e.debugModelId,type:e.type,condition:e.condition,location:new o({url:e.location.url,lineNumber:e.location.lineNumber})}),t.setStatement(e.statement)):t=new n({enabled:e.enabled,debugModelId:e.debugModelId,type:e.type,condition:e.condition,location:new i({url:e.location.url})}),Q(t)},save:function(e){var t={enabled:e.getEnabled(),debugModelId:e.getDebugModelId(),type:e.getType(),condition:e.getCondition(),location:{url:e.getLocation().getUrl()}};return e instanceof r&&(t.statement=e.getStatement(),t.location.lineNumber=e.getLocation().getLineNumber()),Q(t)}},e._restoreBreakpoints()},u.prototype._destroy=function(){s=null},u.prototype.getModel=function(){return this._root.getModel()},u.prototype.addBreakpoint=function(e){return e&&this._root.indexOfBreakpoint(e)===-1?(this._root.addBreakpoint(e),this._notifyBreakpointsChanged({changes:[{kind:"added",breakpoint:e}]})):Q()},u.prototype.addBreakpoints=function(e){var t=this,n={changes:[]};return e.forEach(function(e){e&&t._root.indexOfBreakpoint(e)===-1&&(t._root.addBreakpoint(e),n.changes.push({kind:"added",breakpoint:e}))}),n.changes.length>0?this._notifyBreakpointsChanged(n):Q()},u.prototype.removeBreakpoint=function(e){function t(){return n}if(e){var n=this._root.removeBreakpoint(e);if(n){var r={changes:[{kind:"removed",breakpoint:n}]};return this._notifyBreakpointsChanged(r).then(t,t)}}return Q()},u.prototype.removeBreakpoints=function(e){var t=this,n={changes:[]};return e?e.forEach(function(e){var r=t._root.removeBreakpoint(e);r&&n.changes.push({kind:"removed",breakpoint:e})}):(this._root.getBreakpoints().forEach(function(e){n.changes.push({kind:"removed",breakpoint:e})}),this._root.removeAllBreakpoints()),n.changes.length>0?this._notifyBreakpointsChanged(n):Q()},u.prototype.getBreakpoints=function(e){return e?this._root.getBreakpoints().filter(function(t){return t.getDebugModelId()===e}):this._root.getBreakpoints()},u.prototype.getEnabled=function(){return this._root.getEnabled()},u.prototype.setEnabled=function(e){return this._root.setEnabled(e),this._notifyEnablementChanged({enabled:e})},u.prototype._restoreBreakpoints=function(){var e=this;return Q.all([this.context.service.debug.registry.getConfigurations(),this.context.service.debug.preferences.getBreakpointManagerSettings()]).spread(function(t,n){if(n){var r=[];if(e._preferences=n||{},e._root.setEnabled(n.enabled),n.breakpoints&&n.breakpoints.length>0)return n.breakpoints.forEach(function(n){if(u._validateJsonBreakpoint(n)){var i=e._getBreakpointLifecycleService(t,n.debugModelId);i&&i.restore?r.push(i.restore(n)):a.getLogger().isDebug()&&a.getLogger().logError("Breakpoint ["+n+"] not loaded - no service found")}else a.getLogger().isDebug()&&a.getLogger().logError("Breakpoint ["+n+"] not loaded - invalid data")}),Q.allSettled(r).then(function(t){t.forEach(function(t){if("fulfilled"===t.state&&t.value){var n=t.value;e._root.addBreakpoint(n)}})})}else e._preferences={enabled:!0,breakpoints:[]}}).fail(function(e){return a.getLogger().logError("Failed to restore breakpoints"),a.getLogger().logError(e),Q()})},u.prototype._saveBreakpoints=function(){var e=this,t=[],n=[];return e.context.service.debug.registry.getConfigurations().then(function(r){return e._root.getBreakpoints().forEach(function(t){if(u.validateBreakpoint(t)){var i=e._getBreakpointLifecycleService(r,t.getDebugModelId());i?n.push(i.save(t)):a.getLogger().isDebug()&&a.getLogger().logError("Breakpoint ["+t+"] not saved - no service found")}else a.getLogger().isDebug()&&a.getLogger().logError("Breakpoint ["+t+"] not saved - invalid data")}),Q.allSettled(n).then(function(n){return n.forEach(function(e){"fulfilled"===e.state&&e.value&&t.push(e.value)}),e._preferences.breakpoints=t,e.context.service.debug.preferences.setBreakpointManagerSettings(e._preferences)})}).fail(function(e){return a.getLogger().logError("Failed to save breakpoints"),a.getLogger().logError(e),Q()})},u.prototype._getBreakpointLifecycleService=function(e,t){if(t){var n=e?e[t]:null;return n&&n.breakpoints&&n.breakpoints.lifecycle?n.breakpoints.lifecycle.service:this._defaultBreakpointLifecycleService}},u.prototype._saveEnablement=function(){return this._preferences.enabled=this.getEnabled(),this.context.service.debug.preferences.setBreakpointManagerSettings(this._preferences)},u.prototype._notifyBreakpointsChanged=function(e){var t=this;return this._saveBreakpoints().then(function(){try{return t.context.event.fireBreakpointsChanged(e).fail(function(e){return a.getLogger().log("BreakpointManager: error notifying breakpointsChanged event listeners"),a.getLogger().log(e),Q()})}catch(e){return a.getLogger().log("BreakpointManager: exception notifying breakpointsChanged event listeners"),a.getLogger().log(e),Q()}})},u.prototype._notifyEnablementChanged=function(e){var t=this;return this._saveEnablement().then(function(){try{return t.context.event.fireBreakpointManagerEnablementChanged(e).fail(function(e){return a.getLogger().log("BreakpointManager: error notifying breakpointManagerEnablementChanged event listeners"),a.getLogger().log(e),Q()})}catch(e){return a.getLogger().log("BreakpointManager: exception notifying breakpointManagerEnablementChanged event listeners"),a.getLogger().log(e),Q()}})};var c=e.extend("sap.watt.ideplatform.debug.core.service.BreakpointManagerRoot",{metadata:{properties:{enabled:{type:"boolean",defaultValue:!0}},aggregations:{breakpoints:{multiple:!0,type:"sap.watt.ideplatform.debug.core.model.Breakpoint"}},events:{breakpointChanged:{parameters:{changes:{type:{source:{type:"sap.watt.ideplatform.debug.core.model.managed.ManagedObjectBase"},propertyName:"string",oldValue:"any"},multiple:!0}}}}},init:function(){this.setModel(new t(this))}});return u.validateBreakpoint=function(e){return!(!(e&&e.getLocation()&&e.getLocation().getUrl())||e instanceof r&&e.getLocation().getLineNumber()<0)},u._validateJsonBreakpoint=function(e){return!!(e&&e.location&&e.location.url&&e.location.lineNumber!==-1)},u}),define("sap.watt.ideplatform.debug.core/service/WatchExpressionManager",["sap/watt/ideplatform/debug/core/model/managed/ManagedObjectBase","sap/watt/ideplatform/debug/core/model/managed/ManagedObjectModel","sap/watt/ideplatform/debug/core/model/WatchExpression","sap/watt/ideplatform/debug/core/service/DebugPlatform"],function(e,t,n,r){"use strict";var i=null,o=function(){return i||(i=this,i._preferences={}),i};o.prototype.configure=function(){var e=this;return this._root=new a,this._root.attachExpressionChanged(function(t){var n={changes:[]};if(t.getParameters().details&&t.getParameters().details.length>0){var r=t.getParameters().source;n.changes.push({kind:"changed",expression:r,details:t.getParameters().details}),e._notifyExpressionsChanged(n)}}),e._restoreExpressionPreferences()},o.prototype._destroy=function(){i=null},o.prototype.getModel=function(){return this._root.getModel()},o.prototype.addExpression=function(e){return e&&this._root.indexOfExpression(e)===-1?(this._root.addExpression(e),this._notifyExpressionsChanged({changes:[{kind:"added",expression:e}]})):Q()},o.prototype.addExpressions=function(e){var t=this,n={changes:[]};return e.forEach(function(e){e&&t._root.indexOfExpression(e)===-1&&(t._root.addExpression(e),n.changes.push({kind:"added",expression:e}))}),n.changes.length>0?this._notifyExpressionsChanged(n):Q()},o.prototype.removeExpression=function(e){function t(){return n}if(e){var n=this._root.removeExpression(e);if(n){var r={changes:[{kind:"removed",expression:n}]};return this._notifyExpressionsChanged(r).then(t,t)}}return Q()},o.prototype.removeExpressions=function(e){var t=this,n={changes:[]};return e?e.forEach(function(e){var r=t._root.removeExpression(e);r&&n.changes.push({kind:"removed",expression:e})}):(this._root.getExpressions().forEach(function(e){n.changes.push({kind:"removed",expression:e})}),this._root.removeAllExpressions()),n.changes.length>0?this._notifyExpressionsChanged(n):Q()},o.prototype.getExpressions=function(e){return e?this._root.getExpressions().filter(function(t){return t.getDebugModelId()===e}):this._root.getExpressions()},o.prototype._restoreExpressionPreferences=function(){var e=this;return Q.all([this.context.service.debug.registry.getConfigurations(),this.context.service.debug.preferences.getWatchExpressionManagerSettings()]).spread(function(t,n){if(n){var i=[];if(e._preferences=n||{},n.expressions&&n.expressions.length>0)return n.expressions.forEach(function(n){if(o._validateExpressionSettings(n)){var a=e._getLifecycleService(t,n.debugModelId);a&&a.restore?i.push(a.restore(n)):r.getLogger().isDebug()&&r.getLogger().logError("WatchExpression ["+n+"] not loaded - no service found")}else r.getLogger().isDebug()&&r.getLogger().logError("WatchExpression ["+n+"] not loaded - invalid data")}),Q.allSettled(i).then(function(t){t.forEach(function(t){if("fulfilled"===t.state&&t.value){var n=t.value;e._root.addExpression(n)}})})}else e._preferences={expressions:[]}}).fail(function(e){return r.getLogger().logError("Failed to restore watch expressions"),r.getLogger().logError(e),Q()})},o.prototype._saveExpressionPreferences=function(){var e=this,t=[],n=[];return e.context.service.debug.registry.getConfigurations().then(function(i){return e._root.getExpressions().forEach(function(t){if(o._validateExpression(t)){var a=e._getLifecycleService(i,t.getDebugModelId());a?n.push(a.save(t)):r.getLogger().isDebug()&&r.getLogger().logError("Expression ["+t+"] not saved - no service found")}else r.getLogger().isDebug()&&r.getLogger().logError("Expression ["+t+"] not saved - invalid data")}),Q.allSettled(n).then(function(n){return n.forEach(function(e){"fulfilled"===e.state&&e.value&&t.push(e.value)}),e._preferences.expressions=t,e.context.service.debug.preferences.setWatchExpressionManagerSettings(e._preferences)})}).fail(function(e){return r.getLogger().logError("Failed to save watch expressions"),r.getLogger().logError(e),Q()})},o.prototype._getLifecycleService=function(e,t){if(t){var n=e?e[t]:null;return n&&n.watchExpressions&&n.watchExpressions.lifecycle?n.watchExpressions.lifecycle.service:null}},o.prototype._notifyExpressionsChanged=function(e){function t(e){try{return i.context.event.fireExpressionsChanged(e).fail(function(e){return r.getLogger().log("WatchExpressionManager: error notifying expressionsChanged event listeners"),r.getLogger().log(e),Q()})}catch(e){return r.getLogger().log("WatchExpressionManager: exception notifying expressionsChanged event listeners"),r.getLogger().log(e),Q()}}function n(e){var t=!1;return e&&e.changes&&$.each(e.changes,function(e,n){if(n)switch(n.kind){case"added":case"removed":return t=!0,!1;case"changed":n.details&&$.each(n.details,function(e,n){if("expressionText"===n.name||"enabled"===n.name||"debugModelId"===n.name)return t=!0,!1})}if(t)return!1}),t}var i=this;return n(e)?this._saveExpressionPreferences().then(function(){return t(e)}):t(e)};var a=e.extend("sap.watt.ideplatform.debug.core.service.WatchExpressionManagerRoot",{metadata:{aggregations:{expressions:{multiple:!0,type:"sap.watt.ideplatform.debug.core.model.WatchExpression"}},events:{expressionChanged:{parameters:{changes:{type:{source:{type:"sap.watt.ideplatform.debug.core.model.managed.ManagedObjectBase"},propertyName:"string",oldValue:"any"},multiple:!0}}}}},init:function(){this.setModel(new t(this))}});return o._validateExpressionSettings=function(e){return!!e&&e.debugModelId},o._validateExpression=function(e){return e instanceof n},o}),define("sap/watt/ideplatform/debug/core/document/SourceDocument",["sap/watt/platform/plugin/document/Document","sap/watt/ideplatform/debug/core/service/DebugPlatform"],function(e,t){"use strict";var n=e.extend("sap.watt.ideplatform.debug.core.document.SourceDocument",{});return n.prototype.getDebugSession=function(){return null},n.prototype.getDebugSessionId=function(){return this.getDebugSession()?this.getDebugSession().getDebugSessionId():null},n.prototype.getDebugModelId=function(){return this.getDebugSession()?this.getDebugSession().getDebugModelId():null},n.prototype.getType=function(){return"file"},n.prototype.isReadOnly=function(){return!0},n.prototype.isDirty=function(){return!1},n.prototype.isNew=function(){return!1},n.prototype.getProject=function(e){e=e===!0;var n=this.getDebugSession()&&this.getDebugSession().getLaunchConfiguration()?this.getDebugSession().getLaunchConfiguration().getProjectPath():void 0;return n?t.getContext().service.document.getDocumentByPath(n).then(function(t){if(t)return t.getProject(e)}):Q()},n}),define("sap.watt.ideplatform.debug.core/service/EditorSupport",["sap/watt/ideplatform/debug/core/model/Breakpoint","sap/watt/ideplatform/debug/core/model/LineBreakpoint","sap/watt/ideplatform/debug/core/model/LineLocation","sap/watt/ideplatform/debug/core/model/StackFrame","sap/watt/ideplatform/debug/core/service/DebugPlatform","sap/watt/ideplatform/debug/core/document/SourceDocument","./BreakpointManager"],function(e,t,n,r,i,o,a){"use strict";var s=null,u=function(){return s||(s=this,s._editorDirtyStates={},s._currentEditorState=void 0,s._navigationMarkerTimer=void 0,s._editorChangeEvents={processedAction:void 0,queue:[]},s._sessionLoading=void 0,s._onEditorChangeSession=void 0,s._onEditorChange=void 0,s._onEditorGutterClick=void 0,s._onEditorGutterMouseDown=void 0,s._notificationMessageRegistry={}),s};return u.INSTRUCTION_POINTER_MARKER_CLASSNAME="instruction-pointer-marker",u.BREAKPOINT_MARKER_CLASSNAME="breakpoint-selection-marker",u.BREAKPOINT_CLASSNAME="ace_breakpoint",u.BREAKPOINT_MARKER_TIME=2e3,u._NOTIFICATION_TIMEOUT=5e3,u.prototype._destroy=function(){s=null},u.prototype._handleGutterClick=function(e){var t=this;if(this._isCurrentDocumentTypeSupported()){var n=e.domEvent.target;n.className.indexOf("ace_fold-widget")<0&&n.className.indexOf("ace_gutter-cell")!==-1&&e.editor.isFocused()&&n.getBoundingClientRect().left&&(e.stop(),t._toggleBreakpoint(this._getCurrentDocumentUrl(),e.getDocumentPosition().row).done())}},u.prototype._handleEditorChange=function(e){if(this._isCurrentDocumentTypeSupported()&&e){if(this._editorChangeEvents.processedAction)return"remove"===this._editorChangeEvents.processedAction&&"insert"===e.action&&e.end&&e.lines&&e.end.row===e.lines.length-1?void(this._editorChangeEvents.processedAction="refresh"):void this._editorChangeEvents.queue.push(e);this._editorChangeEvents.processedAction=e.action,this._processEditorChangeEvent(e)}},u.prototype._processEditorChangeEvent=function(e){var t=this,n=this._getCurrentAceUi5Editor();if(n){var r=n.getNativeEditor().getSession().getBreakpoints(),i=t._getCurrentDocumentUrl();u._filterAceDebuggerBreakpoints(r).length>0&&t._updateEditorDirtyBreakpointState(i,r).then(function(i){var o,a,s=e.start?e.start:e.delta?e.delta.rangevent.start:null,u=e.end?e.end:e.delta?e.delta.rangevent.end:null;if(u.row===s.row||"refresh"===t._editorChangeEvents.processedAction)return t._editorChangeEvents.processedAction=void 0,void(t._editorChangeEvents.queue.length>0&&t._processEditorChangeEvent(t._editorChangeEvents.queue.shift()));if("insert"===e.action?(o=u.row-s.row,a=0===s.column?s.row:s.row+1):"remove"===e.action&&(o=s.row-u.row,a=s.row),o>0){var c=new Array(o);c.unshift(a,0),r.splice.apply(r,c),i&&i.splice.apply(i,c)}else if(o<0){var l;r[a]||(l=r.splice(a+1,-o),$.each(l,function(e,t){if(t)return r[a]=t,!1})),i&&(l=i.splice(a+1,-o),i[a]||$.each(l,function(e,t){if(t)return i[a]=t,!1}))}if(0===t._editorChangeEvents.queue.length){var p=n.getAllLines();$.each(r,function(e,t){if(t&&!p[e]){for(var n=e;n0&&t._processEditorChangeEvent(t._editorChangeEvents.queue.shift())})}},u.prototype._handleGutterMouseDown=function(e){if(2===e.getButton()&&this._isCurrentDocumentTypeSupported()){var t=e.domEvent.target;if(t.className.indexOf("ace_fold-widget")<0&&t.className.indexOf("ace_gutter-cell")!==-1&&t.getBoundingClientRect().left){var n=this,r=e.getDocumentPosition()?e.getDocumentPosition().row:-1;return this._getBreakpointForCurrentEditor(r).then(function(e){n.context.service.commandGroup.getGroup("sap.watt.ideplatform.debug.core.breakpoint.editor.gutter.contextMenu").then(function(t){t&&t.getItems().then(function(t){t.forEach(function(t){if(t.getCommand){var n=t.getCommand();n&&n.setValue(e)}})})})})}}},u.prototype._getBreakpointsForResource=function(e){return this.context.service.debug.breakpointManager.getBreakpoints().then(function(t){return t.filter(function(t){return t.getLocation()&&e.test(t.getLocation().getUrl())})})},u.prototype._registerEditorListeners=function(e){var t=this;this._onEditorChangeSession=function(e){t._sessionLoading=!0},this._onEditorGutterClick=function(e){t._handleGutterClick(e)},this._onEditorGutterMouseDown=function(e){t._handleGutterMouseDown(e)},this._onEditorChange=function(e){t._sessionLoading||t._handleEditorChange(e)},e.getNativeEditor().addEventListener("changeSession",this._onEditorChangeSession),e.getNativeEditor().addEventListener("gutterclick",this._onEditorGutterClick),e.getNativeEditor().addEventListener("change",this._onEditorChange),e.getNativeEditor().addEventListener("guttermousedown",this._onEditorGutterMouseDown)},u.prototype._onEditorRendered=function(e){this._sessionLoading=!1;var t=e.params&&e.params.control?e.params.control._oDocument:null;if(t){var n=this;return Q.all([this._getAceUi5Editor(),this.context.service.debug.registry.getConfigurationByDocument(t)]).spread(function(e,r){if(e&&r){return n._setCurrentEditorState({document:t,debuggerConfig:r,ui5Editor:e}),n._onEditorGutterClick||n._registerEditorListeners(e),n._renderEditorMarkers()}n._setCurrentEditorState({document:null,debuggerConfig:null,ui5Editor:e})})}n._setCurrentEditorState(null)},u.prototype._onTabClosed=function(e){var t=e.params.document.getEntity().getFullPath();this._clearEditorDirtyState(t)},u.prototype._onDocumentChanged=function(e){var t=this,n=e.params.document.getEntity(),r=n.getFullPath();if(r&&r.length>0){if("file"===n.getType())return this._isContentTypeSupported(e.params.document).then(function(n){if(n)return t._getBreakpointsForResource(u._getRegExp(r)).then(function(n){if(n.length>0)if("deleted"===e.name){if(n.length>0)return t.context.service.debug.breakpointManager.removeBreakpoints(n)}else if("saved"===e.name){var i=t._getEditorDirtyBreakpointState(r);if(i){n.sort(function(e,t){return e.getLocation().getLineNumber()-t.getLocation().getLineNumber()}),t._clearEditorDirtyState(r);for(var o=0;os});if(u.length>0)return t.context.service.debug.breakpointManager.removeBreakpoints(u).then(function(){return t._renderEditorBreakpoints()})}return t._renderEditorBreakpoints()}}}})});if("folder"===n.getType()&&"deleted"===e.name){var i=u._escapeRegExp(r);return this._getBreakpointsForResource(new RegExp("(^rt:"+i+"?.*)|(^"+i+"/.*)")).then(function(e){if(e.length>0)return t.context.service.debug.breakpointManager.removeBreakpoints(e)})}}},u.prototype._onBreakpointManagerEnablementChanged=function(e){this._isCurrentDocumentTypeSupported()&&this._renderEditorBreakpoints().done()},u.prototype._onBreakpointsChanged=function(e){if(this._isCurrentDocumentTypeSupported()){var t=this,r=t._getCurrentAceUi5Editor();r&&r.getNativeEditor()&&e.params.changes.forEach(function(e){var i=e.breakpoint,o=i.getLocation().getUrl();if(i.getLocation()instanceof n&&o===t._getCurrentDocumentUrl()){var a=i.getLocation().getLineNumber(),s=t._getEditorDirtyBreakpointState(o);switch(e.kind){case"added":s&&(s[a]=i),i.setStatement(r.getLine(a)),t._getEditorGutterDecoration(i).then(function(e){r.setBreakpoint(a,e)});break;case"removed":s&&(s[a]=void 0),r.clearBreakpoint(a);break;case"changed":s&&$.each(s,function(e,t){if(t===i)return a=e,!1}),t._getEditorGutterDecoration(i).then(function(e){r.setBreakpoint(a,e)})}}})}},u.prototype._onCallStackSelectionChanged=function(e){var t=this;return e.params.debugElement instanceof r?this.context.service.debug.documentProvider.getDocumentByModelElement(e.params.debugElement).then(function(n){if(n){var r=t._getCurrentDocument();if(!r||n.getKeyString()!==r.getKeyString())return t.context.service.editor.getDefaultEditor(n).then(function(e){e&&t.context.service.content.open(n,e.service).done()});t._renderInstructionPointer(e.params.debugElement)}}):void t._clearInstructionPointer()},u.prototype._onBreakpointSelectionChanged=function(e){var n=this;if(e.params.breakpoint instanceof t){var r=e.params.breakpoint;return this.context.service.debug.documentProvider.getDocumentByModelElement(r).then(function(e){if(e)return n.context.service.editor.getDefaultEditor(e).then(function(t){if(t)return n.context.service.content.open(e,t.service).then(function(){n._renderBreakpointSelectionMarker(r)})});var t=r.getLocation().getUrl();n._notificationMessageRegistry[t]||(n._notificationMessageRegistry[t]=!0,setTimeout(function(){delete n._notificationMessageRegistry[t]},u._NOTIFICATION_TIMEOUT),n.context.service.usernotification.liteNotificationInfo(n.context.i18n.getText("editorSupport_resource_not_opened_xmsg",[n._getFileName(t)])).done())})}},u.prototype._getFileName=function(e){var t=e||"",n=t.lastIndexOf("/");return n>0&&(t=t.substr(n+1)),t},u.prototype._onDebugSessionsChanged=function(e){if(e.params.changes){var t=this;return this.context.service.content.getDocuments().then(function(n){e.params.changes.forEach(function(e){if("removed"===e.kind){var r=t._getCurrentDocumentUrl();r&&e.debugSession.getLaunchConfiguration()&&0===r.indexOf(e.debugSession.getLaunchConfiguration().getProjectPath())&&t._clearInstructionPointer(),n&&n.forEach(function(n){if(n instanceof o){var r=n.getDebugSession()?n.getDebugSession().getDebugSessionId():void 0;r===e.debugSession.getDebugSessionId()&&t.context.service.content.close(n).done()}})}})})}},u.prototype._setCurrentEditorState=function(e){e!==this._currentEditorState&&(this._clearInstructionPointer(),this._currentEditorState=e)},u.prototype._isCurrentDocumentTypeSupported=function(){return!(!this._currentEditorState||!this._currentEditorState.debuggerConfig)},u.prototype._getCurrentAceUi5Editor=function(){return this._currentEditorState?this._currentEditorState.ui5Editor:null},u.prototype._getCurrentDocument=function(){return this._currentEditorState?this._currentEditorState.document:null},u.prototype._getCurrentDebuggerConfig=function(){return this._currentEditorState?this._currentEditorState.debuggerConfig:null},u.prototype._getCurrentDocumentUrl=function(){return this._currentEditorState&&this._currentEditorState.document?u._getDocumentUrl(this._currentEditorState.document):null},u.prototype._isContentTypeSupported=function(e){return this.context.service.debug.registry.getConfigurationByDocument(e).then(function(e){return!!e})},u.prototype._getAceUi5Editor=function(){return this.context.service.content.getCurrentEditor().then(function(e){if(e&&e.getName)return e.getName().then(function(t){if("aceeditor"===t)return e.getUI5Editor()})})},u.prototype._getEditorGutterDecoration=function(e){return this.context.service.debug.breakpointManager.getEnabled().then(function(t){var n=u.BREAKPOINT_CLASSNAME;return n+=t&&e.getEnabled()?"":" disabled",n+=e.getLoaded()?" loaded":"",n+=e.getCondition()&&e.getCondition().getExpression()?" condition":""})},u.prototype._createBreakpoint=function(e){if(e&&e.url&&e.lineNumber>=0){var t=this,n=e.url?e.url.split(".").pop():null,r=this._getCurrentAceUi5Editor(),o=this._getCurrentDebuggerConfig();if(r&&o){if(o.breakpoints&&o.breakpoints.lifecycle&&o.breakpoints.lifecycle.service){var s,u=o.breakpoints.lifecycle.service,c=r.getAllLines();if(!c[e.lineNumber]){for(s=e.lineNumber;sc.length)for(s=e.lineNumber;s>=0&&!c[s];s--);s-1&&(e.lineNumber=s)}var l={location:e,debugModelId:o.debugModelId};return u.create(l).then(function(n){if(n){if(a.validateBreakpoint(n))return t.context.service.debug.breakpointManager.getBreakpoints().then(function(r){var a=r.filter(function(e){return t._compareLineLocation(e.getLocation(),n.getLocation().getUrl(),n.getLocation().getLineNumber())});return 0===a.length?t.context.service.debug.breakpointManager.addBreakpoint(n):void(i.getLogger().isDebug()&&i.getLogger().logError($.sap.formatMessage("Debugger [{0}] breakpoint at location [{1}:{2}] already existing",o.debugModelId,e.url,e.lineNumber)))});i.getLogger().logError($.sap.formatMessage("Debugger [{0}] created invalid breakpoint at location [{1}:{2}]",o.debugModelId,e.url,e.lineNumber))}else i.getLogger().logError($.sap.formatMessage("Debugger [{0}] did not create breakpoint for location [{1}:{2}]",o.debugModelId,e.url,e.lineNumber))})}i.getLogger().logError($.sap.formatMessage("Service [BreakpointLifeCycleParticipant] not supported by debugger [{0}]",o.debugModelId))}else i.getLogger().logError($.sap.formatMessage("Service [BreakpointLifeCycleParticipant] not registered for file extension [{0}]",n))}return Q()},u.prototype._removeOutOfRangeEditorBreakpoints=function(){var e=this,t=this._getCurrentDocumentUrl();return this._getBreakpointsForResource(u._getRegExp(t)).then(function(t){if(t.length>0){var n=e._getCurrentAceUi5Editor();if(n&&n.getNativeEditor()){var r=n.getNativeEditor().getSession().getLength(),i=t.filter(function(e){return e.getLocation().getLineNumber()>=r});if(i.length>0)return e.context.service.debug.breakpointManager.removeBreakpoints(i)}}})},u.prototype._renderEditorBreakpoints=function(){var e=this,t=this._getCurrentDocumentUrl();return this._getBreakpointsForResource(u._getRegExp(t)).then(function(n){var r=e._getCurrentAceUi5Editor();if(r&&r.getNativeEditor()){r.getNativeEditor().getSession().clearBreakpoints();var i=[],o=e._getEditorDirtyBreakpointState(t);if(o)for(var a=0;a=0){var t=this._getCurrentDocumentUrl(),n=this._getEditorDirtyBreakpointState(t),r=null;if(n)return $.each(n,function(t,n){if(t===e)return r=n,!1}),Q(r);var i=this,o=i._getCurrentDebuggerConfig();if(o)return i.context.service.debug.breakpointManager.getBreakpoints(o.debugModelId).then(function(n){var r=n.filter(function(n){return i._compareLineLocation(n.getLocation(),t,e)});return Q(1===r.length?r[0]:null)})}return null},u.prototype._compareLineLocation=function(e,t,r){return e&&e.getUrl()===t&&e instanceof n&&e.getLineNumber()===r},u.prototype._updateEditorDirtyBreakpointState=function(e,t){var n=this._getEditorDirtyBreakpointState(e);if(n)return Q(n);if(t){var r=this;return this._getBreakpointsForResource(u._getRegExp(e)).then(function(o){return(n=r._getEditorDirtyBreakpointState(e))?Q(n):(o.sort(function(e,t){return e.getLocation().getLineNumber()-t.getLocation().getLineNumber()}),n=new Array(t.length),$.each(o,function(e,r){t[r.getLocation().getLineNumber()]?n[r.getLocation().getLineNumber()]=r:i.getLogger().logError("Internal error: Failed to locate editor breakpoint returned by breakpoint manager ["+r+"]")}),r._editorDirtyStates[e]={currentBreakpoints:n},Q(n))})}},u.prototype._getEditorDirtyBreakpointState=function(e){return this._editorDirtyStates[e]?this._editorDirtyStates[e].currentBreakpoints:null},u.prototype._clearEditorDirtyState=function(e){this._editorDirtyStates[e]&&delete this._editorDirtyStates[e]},u.prototype._toggleBreakpoint=function(e,t){var n=this;return this.context.service.debug.breakpointManager.getBreakpoints().then(function(r){var i=r.filter(function(r){return n._compareLineLocation(r.getLocation(),e,t)});return i.length>0?n.context.service.debug.breakpointManager.removeBreakpoint(i[0]):n._createBreakpoint({url:e,lineNumber:t})})},u._filterAceDebuggerBreakpoints=function(e){return e.filter(function(e){return u._isAceDebuggerBreakpoint(e)})},u._isAceDebuggerBreakpoint=function(e){return e&&e.startsWith(u.BREAKPOINT_CLASSNAME)},u._getDocumentUrl=function(e){return e&&e.getEntity()?e.getEntity().getFullPath():null},u._escapeRegExp=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},u._getRegExp=function(e){return new RegExp(u._escapeRegExp(e))},u}),define("sap.watt.ideplatform.debug.core/service/DebugRegistry",["sap/watt/ideplatform/debug/core/service/DebugPlatform","sap/watt/ideplatform/debug/core/document/SourceDocument"],function(e,t){"use strict";var n=null,r=function(){return n||(n=this,n._configurations={}),n};return r.prototype.configure=function(e){e&&e.debuggers&&e.debuggers.length>0&&(this._configurations=this._parseDebuggerConfigs(e.debuggers))},r.prototype._destroy=function(){n=null},r.prototype.getConfigurations=function(){return this._configurations},r.prototype.hasConfigurations=function(){return Object.keys(this._configurations).length>0},r.prototype.getConfiguration=function(e){return this._configurations[e]},r.prototype.getConfigurationByProject=function(e){if(e&&e.getProjectMetadata&&e.getProjectMetadata())return this.getConfigurationByProjectType(e.getProjectMetadata().type)},r.prototype.getConfigurationByProjectType=function(e){ if(e){var t=this,n=Object.keys(this._configurations).filter(function(n){return t._configurations[n].projectType===e});if(1===n.length)return this._configurations[n[0]]}return null},r.prototype.getConfigurationByFileExtension=function(e){if(e){var t=this,n=Object.keys(this._configurations).filter(function(n){var r=t._configurations[n];return r.editors&&r.editors.fileExtensionMatcher.test(e)});if(1===n.length)return this._configurations[n[0]]}return null},r.prototype.getConfigurationByDocument=function(n){if(n){if(n instanceof t)return this.getConfiguration(n.getDebugModelId());var r=this,i=this.getConfigurationByFileExtension(n.getEntity().getFileExtension());return n.getProject().then(function(t){if(t){var o=r.getConfigurationByProject(t);if(i!==o)return i&&o&&e.getLogger().logError($.sap.formatMessage("Conflicting debugger registrations found for file ''{0}'', debugger registrations: ''{1}'', ''{2}''",n.getEntity().getFullPath(),i?i.debugModelId:"",o?o.debugModelId:"")),null}return i})}return null},r.prototype.getBreakpointLifecycleParticipantService=function(e){var t=this._configurations[e];return t&&t.breakpoints&&t.breakpoints.lifecycle?t.breakpoints.lifecycle.service:null},r.prototype.getWatchExpressionLifecycleParticipantService=function(e){var t=this._configurations[e];return t&&t.watchExpressions&&t.watchExpressions.lifecycle?t.watchExpressions.lifecycle.service:null},r.prototype.getDebugViewService=function(e){var t=this._configurations[e];return t&&t.debugView?t.debugView.service:null},r.prototype.getDocumentProviderService=function(e){var t=this._configurations[e];return t&&t.documentProvider?t.documentProvider.service:null},r.prototype.getDebugEngineService=function(e){var t=this._configurations[e];return t&&t.debugEngine?t.debugEngine.service:null},r.prototype._validateEditorConfiguration=function(t,n){var r=!0;return t.fileExtensions&&0!==t.fileExtensions.length||(e.getLogger().logError("Invalid configuration for debugger ["+n+"], no file extensions defined"),r=!1),r},r.prototype._validateBreakpointConfiguration=function(t,n){var r=!0;return t.lifecycle&&t.lifecycle.service||(e.getLogger().logError("Invalid configuration for debugger ["+n+"], breakpoint lifecycle service missing"),r=!1),r},r.prototype._validateWatchExpressionConfiguration=function(t,n){var r=!0;return t.lifecycle&&t.lifecycle.service||(e.getLogger().logError("Invalid configuration for debugger ["+n+"], watch expression lifecycle service missing"),r=!1),r},r.prototype._validateDocumentProviderConfiguration=function(t,n){var r=!0;return t.service||(e.getLogger().logError("Invalid configuration for debugger ["+n+"], document provider service configuration"),r=!1),r},r.prototype._validateDebugEngineConfiguration=function(t,n){var r=!0;return t.service||(e.getLogger().logError("Invalid configuration for debugger ["+n+"], debug engine service missing"),r=!1),r},r.prototype._validateDebugViewConfiguration=function(t,n){var r=!0;return t.service||(e.getLogger().logError("Invalid configuration for debugger ["+n+"], debug view service missing"),r=!1),r},r.prototype._validateDebuggerConfiguration=function(t,n){var r=!0;return e.getLogger().isDebug()&&e.getLogger().logInfo("Debugger configuration: "+t.debugModelId),t||(e.getLogger().logError("Missing debugger configuration"),r=!1),t.debugModelId||(e.getLogger().logError("Property [debugModelId] missing for debugger configuration - skip"),r=!1),t.projectType||(e.getLogger().logError("Property [projectType] missing for debugger configuration - skip"),r=!1),t.debugEngine?r=this._validateDebugEngineConfiguration(t.debugEngine,t.debugModelId)&&r:(e.getLogger().logError("Entry [debugEngine] missing for debugger configuration ["+t.debugModelId+"] - skip"),r=!1),t.editors?(r=this._validateEditorConfiguration(t.editors,t.debugModelId)&&r,r&&(t.editors.fileExtensionMatcher=new RegExp("("+t.editors.fileExtensions.join("|")+")$"))):e.getLogger().logInfo("Entry [editors] missing for debugger configuration ["+t.debugModelId+"] - skip"),t.breakpoints?r=this._validateBreakpointConfiguration(t.breakpoints,t.debugModelId)&&r:e.getLogger().logInfo("Entry [breakpoints] missing for debugger configuration ["+t.debugModelId+"] - skip"),t.watchExpressions?r=this._validateWatchExpressionConfiguration(t.watchExpressions,t.debugModelId)&&r:e.getLogger().logInfo("Entry [watchExpressions] missing for debugger configuration ["+t.debugModelId+"] - skip"),t.documentProvider?r=this._validateDocumentProviderConfiguration(t.documentProvider,t.debugModelId)&&r:e.getLogger().logInfo("Entry [documentProvider] missing for debugger configuration ["+t.debugModelId+"] - skip"),t.debugView?r=this._validateDebugViewConfiguration(t.debugView,t.debugModelId)&&r:e.getLogger().logInfo("Entry [debugView] missing for debugger configuration ["+t.debugModelId+"] - skip"),r},r.prototype._isServerTypeSupported=function(e){return e.supportedServerTypes&&e.supportedServerTypes.indexOf(this._getServerType())!==-1},r.prototype._getServerType=function(){return sap.watt.getEnv("server_type")},r.prototype._parseDebuggerConfigs=function(e){var t=this,n={};return e.forEach(function(e){t._validateDebuggerConfiguration(e)&&t._isServerTypeSupported(e.debugEngine)&&(n[e.debugModelId]=e)}),n},r}),define("sap.watt.ideplatform.debug.core/service/DebugPreferences",["sap/watt/ideplatform/debug/core/service/DebugPlatform"],function(e){"use strict";var t="sap.watt.ideplatform.debug.core",n=null,r=function(){return n||(n=this),n};return r.prototype.configure=function(){return Q()},r.prototype._destroy=function(){n=null},r.prototype.getDebugClientSettings=function(){return this.context.service.preferences.get(t).then(function(e){return"string"==typeof e&&(e=JSON.parse(e)),e&&e.client?e.client:Q()})},r.prototype.setDebugClientSettings=function(n){return this.context.service.preferences.set({client:n},t).fail(function(t){var n="Failed to save BreakpointManager preference data - "+t;return e.getLogger().logError(n),Q.reject(n)})},r.prototype.getBreakpointManagerSettings=function(){return this.context.service.preferences.get(t).then(function(e){return"string"==typeof e&&(e=JSON.parse(e)),e&&e.breakpointManager?e.breakpointManager:Q()})},r.prototype.setBreakpointManagerSettings=function(n){return this.context.service.preferences.set({breakpointManager:n},t).fail(function(t){var n="Failed to save debug preference data - "+t;return e.getLogger().logError(n),Q.reject(n)})},r.prototype.getWatchExpressionManagerSettings=function(){return this.context.service.preferences.get(t).then(function(e){return"string"==typeof e&&(e=JSON.parse(e)),e&&e.watchExpressionManager?e.watchExpressionManager:Q()})},r.prototype.setWatchExpressionManagerSettings=function(n){return this.context.service.preferences.set({watchExpressionManager:n},t).fail(function(t){var n="Failed to save WatchExpressionManager preference data - "+t;return e.getLogger().logError(n),Q.reject(n)})},r}),define("sap/watt/ideplatform/debug/core/model/LaunchConfiguration",["./managed/ManagedObjectBase"],function(e){"use strict";var t=e.extend("sap.watt.ideplatform.debug.core.model.LaunchConfiguration",{metadata:{abstract:!0,properties:{debugModelId:"string",debugSessionId:"string",projectPath:"string"}}});return t}),define("sap.watt.ideplatform.debug.core/service/DebugSessionManager",["sap/watt/ideplatform/debug/core/model/managed/ManagedObjectBase","sap/watt/ideplatform/debug/core/model/managed/ManagedObjectModel","sap/watt/ideplatform/debug/core/model/DebugSession","sap/watt/ideplatform/debug/core/model/LaunchConfiguration","sap/watt/ideplatform/debug/core/service/DebugPlatform"],function(e,t,n,r,i){"use strict";var o=null,a=function(){return o||(o=this,o._root=new s),o};a.prototype.configure=function(){return Q()},a.prototype._destroy=function(){o=null},a.prototype._threadSuspendedResumed=function(e){"threadSuspended"===e.getId()?this.context.event.fireThreadSuspended(e.getParameters()):"threadResumed"===e.getId()?this.context.event.fireThreadResumed(e.getParameters()):i.getLogger().logError("Unsupported event type "+e.getId())},a.prototype._threadStartedEnded=function(e){"threadStarted"===e.getId()?this.context.event.fireThreadStarted(e.getParameters()):"threadEnded"===e.getId()?this.context.event.fireThreadEnded(e.getParameters()):i.getLogger().logError("Unsupported event type "+e.getId())},a.prototype._detachEventHandler=function(e){e&&(e.detachThreadSuspended(this._threadSuspendedResumed),e.detachThreadResumed(this._threadSuspendedResumed),e.detachThreadStarted(this._threadStartedEnded),e.detachThreadEnded(this._threadStartedEnded))},a.prototype.getModel=function(){return this._root.getModel()},a.prototype.addDebugSession=function(e){e&&this._root.indexOfDebugSession(e)===-1&&(this._root.addDebugSession(e),this.context.event.fireDebugSessionsChanged({changes:[{kind:"added",debugSession:e}]}).done(),e.attachThreadSuspended(this._threadSuspendedResumed,this),e.attachThreadResumed(this._threadSuspendedResumed,this),e.attachThreadStarted(this._threadStartedEnded,this),e.attachThreadEnded(this._threadStartedEnded,this))},a.prototype.removeDebugSession=function(e){var t=this._root.removeDebugSession(e);if(t){this._detachEventHandler(t);var n={changes:[{kind:"removed",debugSession:t}]};return this.context.event.fireDebugSessionsChanged(n).done(),t}},a.prototype.removeDebugSessions=function(e){var t=this,n={changes:[]};e?e.forEach(function(e){var r=t._root.removeDebugSession(e);r&&(t._detachEventHandler(r),n.changes.push({kind:"removed",debugSession:r}))}):(this._root.getDebugSessions().forEach(function(e){t._detachEventHandler(e),n.changes.push({kind:"removed",debugSession:e})}),this._root.removeAllDebugSessions()),n.changes.length>0&&this.context.event.fireDebugSessionsChanged(n).done()},a.prototype.getDebugSessions=function(e){return e?this._root.getDebugSessions().filter(function(t){return t.getDebugModelId()===e}):this._root.getDebugSessions()};var s=e.extend("sap.watt.ideplatform.debug.core.service.DebugSessionManagerRoot",{metadata:{aggregations:{debugSessions:{multiple:!0,type:"sap.watt.ideplatform.debug.core.model.DebugSession"}}},init:function(){this.setModel(new t(this))}});return a}),define("sap.watt.ideplatform.debug.core/service/DocumentProvider",["sap/watt/ideplatform/debug/core/model/DebugElement","sap/watt/ideplatform/debug/core/model/Variable","sap/watt/ideplatform/debug/core/model/StackFrame","sap/watt/ideplatform/debug/core/model/Breakpoint","sap/watt/ideplatform/debug/core/service/DebugPlatform"],function(e,t,n,r,i){"use strict";var o=null,a=function(){return o||(o=this),o};return a.prototype.configure=function(){return Q()},a.prototype._destroy=function(){o=null},a.prototype.getDocumentByModelElement=function(e){if(e){var t,o;if(e instanceof n||e instanceof r?(o=e.getDebugModelId(),t=e.getLocation()):i.getLogger().logError($.sap.formatMessage("Invalid parameter - service [DocumentProvider] only supports elements of type [StackFrame] or [Breakpoint], but received [{0}]",e)),t){if(a._isFileSystemLocation(t.getUrl()))return this.context.service.document.getDocumentByPath(t.getUrl());if(o)return this.context.service.debug.registry.getDocumentProviderService(o).then(function(t){return t?t.getDocumentByModelElement(e):void i.getLogger().logDebug($.sap.formatMessage("Service [DocumentProvider] not implemented for debug model identifier [{0}]",o))})}}return Q()},a._isFileSystemLocation=function(e){return e&&"/"===e.charAt(0)},a}),define("sap.watt.ideplatform.che.chewebsockets/service/MessageChannel",[],function(){"use strict";var e=function(e,t,n){return e?"function"!=typeof t?Q.reject("Invalid message callback: "+t):(this._channelName=e,this._onMessage=t,this._messageBus=n,this._promisesByMessageUUID={},void(this._clientContextForMessageUUID={})):Q.reject("Invalid channel: "+e)};return e.prototype._newUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,n="x"===e?t:3&t|8;return n.toString(16)})},e.prototype._buildSubscriptionMessage=function(e,t){return{body:JSON.stringify({channel:e}),headers:[{name:"x-everrest-websocket-message-type",value:t}],method:"POST",uuid:this._newUUID()}},e.prototype._buildMessage=function(e,t){return{path:e,body:"string"==typeof t?t:JSON.stringify(t),headers:[{name:"Content-type",value:"application/json"}],method:"POST",uuid:this._newUUID()}},e.prototype._send=function(e,t){var n=JSON.stringify(e);this._messageBus._logInfo(">>> "+n),t.send(n)},e.prototype._onChannelMessage=function(e){this._onMessage.call(this,e)},e.prototype._isErrorResponse=function(e){if(Array.isArray(e.headers))for(var t=0;t=200&&this.status<300){var t=this.response;u.resolve(t)}else u.reject(e)},c.send(),u.promise}return e(r,i.headers).then(function(){return Q.sap.ajax(n,i).spread(function(e,t){return a._checkForSessionLoss(t),a._fetchDateIfNeeded(e,t,i)}).fail(function(e){if("403"==e.status)return t(r,i.headers).then(function(){return Q.sap.ajax(n,i).spread(function(e,t){return a._checkForSessionLoss(t),a._fetchDateIfNeeded(e,t,i)})});if("200"==e.status)return e.responseText;throw e})})},i.createXMLHttpRequest=function(t,n){var r=new XMLHttpRequest,i=this.resolveServerUrl(n);r.open(t,i.toString(),!0);var o=this.getDefaultHeader();return e(t,o.headers).then(function(){for(var e in o.headers)r.setRequestHeader(e,o.headers[e]);return r})},i.sendXMLHttpRequest=function(e,t){var n=Q.defer(),r=this;return e.onreadystatechange=function(){4===this.readyState&&(this.status<300&&this.status>=200?n.resolve(this.response):n.reject(r._getErrorFromOrionErrorResponse(this.response)))},e.send(t),n.promise},i._getErrorFromOrionErrorResponse=function(e){var t=null;try{var n=JSON.parse(e);t=new Error(n.Message),t.status=n.HttpCode}catch(n){t=new Error(e)}return t},i._checkForSessionLoss=function(e){if("login-request"===e.getResponseHeader("com.sap.cloud.security.login"))throw new Error("SESSION_GONE")},i._fetchDateIfNeeded=function(e,t,n){var r=t.getResponseHeader("ETag");if(r&&(e=e||{},e.sETag=r),n["Fetch-Date"]){var i=e||{},o=t.getResponseHeader("Date"),a=new Date(o);return i.LocalTimeStamp=a.getTime(),i}return e},i}),define("sap.watt.ideplatform.che.chebackend/dao/Project",["../io/Request","sap/watt/lib/lodash/lodash"],function(e,t){"use strict";var n={_serverType:sap.watt.getEnv("server_type"),_projectTypes:null,MTA_PROJECT_TYPE_ID:"mta",SAP_WEB_PROJECT_TYPE_ID:"sap.web",HTML5_MTA_MODULE_PROJECT_TYPE_ID:"com.sap.hcp.html5",BLANK_PROJECT_TYPE_ID:"blank",GENERIC_ATTRIBUTE_NAME:"sap.watt.common.setting",getProjectTypes:function(){if(this._projectTypes)return Q(this._projectTypes);var t=this;return e.send("/project-type","GET").then(function(e){return t._projectTypes=e,t._projectTypes})},_convertToSupportedProjectType:function(e){var n=this;return this.getProjectTypes().then(function(r){if("xs2"===n._serverType)return t.find(r,function(t){return t.id===e});var i=t.findIndex(r,function(t){return t.id===e}),o=i>-1&&e!==n.BLANK_PROJECT_TYPE_ID?e:n.SAP_WEB_PROJECT_TYPE_ID;return t.find(r,function(e){return e.id===o})})},createProject:function(t,n,r){var i=t+"?name="+n.name,o={generatorDescription:{options:n.generatorDescription.options},name:n.name,visibility:null,runners:null,builders:{configs:{},default:null},mixins:n.mixinTypes,type:n.type,description:null};r&&(i=t+n.path+"?path="+r);var a=this;return this._convertToSupportedProjectType(n.type).then(function(t){return o.type=t.id,o.attributes=a._transformAttributes(n.attributes,t),e.send(i,"POST",{},o)})},isProjectTypeAttribute:function(e,t){if(t&&t.attributeDescriptors)for(var n=t.attributeDescriptors,r=0;r-1){var a=i.substring(0,o);t[a]=t[a]||{};var s=i.substring(o+1,i.length),u=e[i];try{t[a][s]=JSON.parse(u)}catch(e){t[a][s]=u}}}return t},read:function(e,t){var n=this;return this._io.send(this._sPrefLocation).then(function(t){if(t){var r=n._splitAlongFirstSegment(t);return r[e]}return t},function(e){if(404==e.status)return null;throw e})},writePreferenceNode:function(e,t){var n={headers:{"Content-Type":"application/json"}};return this._io.send(this._sPrefLocation,"POST",n,this._buildPostData(e,t))},writePreferenceAtribute:function(e,t,n){var r="key="+t+"&value="+n,i={headers:{"Content-Type":"application/x-www-form-urlencoded"}};return this._io.send(sLocation,"PUT",i,r)},remove:function(e,t){var n=t?e+"/"+t:e;return this.writePreferenceNode(n,null)},removeAll:function(){return this._io.send(this._sPrefLocation,"DELETE")}};return t}),define("sap.watt.ideplatform.che.chebackend/service/Preferences",["../dao/Preferences"],function(e){"use strict";var t={_oDao:e,_sPrefix:"watt",_bCacheChanged:!1,_cache:void 0,_oQueue:new Q,init:function(){var e=this;setInterval(function(){e._flush()},3e4),this._saveOnRefreshOrTabClose()},_saveOnRefreshOrTabClose:function(){var e=this;$(window).on("beforeunload",function(){e._doSave()}),$(window).bind("beforeunload",function(){e._doSave()}),window.addEventListener("beforeunload",this._doSave,!1),$(window).on("unload",function(){e._doSave()}),window.addEventListener("unload",this._doSave,!1)},_flush:function(){var e=this;this._oQueue=this._oQueue.then(function(){return e._doSave()})},_doSave:function(){var e=this;if(this._bCacheChanged){var t=this._createSettingsValue(this._cache);return this._bCacheChanged=!1,this._oDao.writePreferenceNode(this._sPrefix,t).fail(function(t){var n=t?t.message||t:"";return e.context.service.log.error("Preferences",e.context.i18n.getText("i18n","prefs_couldnot_save",[n]),["user"]).done(),Q()})}},_createSettingsValue:function(e){for(var t={},n=Object.keys(e),r=0;r-1){var a=i.substring(0,o);t[a]=t[a]||{};var s=i.substring(o+1,i.length);t[a][s]=e[i]}}return t}};return t});define("sap.watt.ideplatform.che.chebackend/util/PathMapping",[],function(){"use strict";return{workspace:{}}});define("sap.watt.ideplatform.che.chebackend/service/UserSettingsDAO",["./Preferences","../util/PathMapping"],function(e,t){"use strict";return{_sNodeNamePrefix:"UserProjectSettings",_mWorkspace:t.workspace,set:function(t,n,r){var i=this;return this._getProjectPathFromDocument(r).then(function(r){var o=i._getNodeName(r,t),a={settings:n};return e.set(a,o)})},get:function(t,n){var r=this;return this._getProjectPathFromDocument(n).then(function(n){var i=r._getNodeName(n,t);return e.get(i).then(function(e){return e?e.settings:null})})},_getProjectPathFromDocument:function(e){return e.getProject().then(function(e){return e.getEntity().getFullPath()})},_getNodeName:function(e,t){return this._sNodeNamePrefix+"."+this._mWorkspace.id+"."+e.replace(/\//g,"_")+"."+t}}}),define("sap.watt.ideplatform.che.chebackend/dao/File",["../io/Request"],function(e){"use strict";var t={lockObject:function(t,n){return e.send(t+"?timeOut="+n,"LOCK",{},{})},unlockObject:function(t){return e.send(t,"UNLOCK",{},{})},fetchChildren:function(t){return e.send(t)},createWorkspace:function(t,n){return e.send("/workspace","POST",{},{accountId:n,name:t,attributes:{}})},addMemberToWorkspace:function(t,n){return e.send("/workspace/"+n+"/members","POST",{},{userId:t,roles:["workspace/admin","workspace/developer"]})},getWorkspaceId:function(t){return e.send("/workspace?name="+t,"GET",{})},loadWorkspaces:function(){return e.send("/workspace/all")},loadWorkspacesByAccount:function(e){throw new Error("Not implemented")},loadWorkspace:function(t){return e.send("/workspace/"+t)},createFolder:function(t,n){var r=t+"/"+n;return e.send(r,"POST",{},{})},createFile:function(t,n){ return e.send(t+"/?name="+n,"POST",{headers:{"Content-Type":"text/plain"}},{})},deleteFileSystemObject:function(t){return e.send(t,"DELETE")},move:function(t,n,r,i){var o={};return o.name=r?r:"",o.overWrite=!!i&&i,e.send(t+"/?to="+n,"POST",{headers:{"Content-Type":"application/json"}},o)},copy:function(t,n,r,i){var o={};return o.name=r?r:"",o.overWrite=!!i&&i,e.send(t+"/?to="+n,"POST",{headers:{"Content-Type":"application/json"}},o)},readFileMetadata:function(t){return e.send(t,"GET",{}).then(function(e){return"string"===jQuery.type(e)&&(e=JSON.parse(e)),e})},readFileContent:function(t,n){var r={blob:n};return n||(r.dataType="text"),e.send(t,"GET",r)},write:function(t,n,r){var i={headers:{"Content-Type":"text/plain"}};return r&&(i=jQuery.extend(!0,i,{headers:{"If-Match":r}})),i["Fetch-Date"]=!0,e.send(t,"PUT",i,n)},remoteImport:function(){throw new Error("Not implemented")},remoteExport:function(){throw new Error("Not implemented")},search:function(t,n){return e.send(t+n,"GET")}};return t}),define("sap.watt.ideplatform.che.chebackend/service/SharedWorkspace",["sap/watt/lib/lodash/lodash","../dao/File"],function(e,t){"use strict";return{_nLockTimeout:6e4,configure:function(e){this._nLockTimeout=e.lockTimeout?e.lockTimeout:this._nLockTimeout},lockDocument:function(e){return t.lockObject(e.getEntity().getBackendData().getContentUrl(),this._nLockTimeout)},unlockDocument:function(e){return t.unlockObject(e.getEntity().getBackendData().getContentUrl())},getLockTimeout:function(){return this._nLockTimeout}}}),define("sap.watt.ideplatform.che.chebackend/dao/MtaDAO",["../io/Request"],function(e){"use strict";var t={convertFolderToModule:function(t,n,r){return n.getProject(!0).then(function(i){var o=i.getEntity().getFullPath(),a=n.getEntity().getFullPath().replace(o+"/",""),s="/project/"+t+o+"?path="+a,u=r.destinations;r=r||{},r.type=r.type||"blank",r.name=r.name||a,r.generatorDescription=r.generatorDescription||{},r.generatorDescription.options=r.generatorDescription.options||{},r.mixinTypes=r.mixinTypes||[],u&&(r.generatorDescription.options.destinations=JSON.stringify(u));var c={name:r.name,type:r.type,generatorDescription:{options:r.generatorDescription.options},visibility:null,runners:null,builders:{configs:{},default:null},mixins:r.mixinTypes,description:null};return e.send(s,"POST",{},c)})},getProjectModules:function(t,n){var r="/project/"+t+"/modules/"+n;return e.send(r,"GET",{},{})},getModuleDependencies:function(t,n,r){var i="/mta/"+t+"/def/deps/"+n+"?module="+r;return e.send(i,"GET",{},{})}};return t}),define("sap.watt.ideplatform.che.chebackend/dao/Transfer",["../io/Request"],function(e){"use strict";var t={_io:e,exportFolder:function(e){var t=this;return this._io.createXMLHttpRequest("GET",e).then(function(e){return e.responseType="arraybuffer",t._io.sendXMLHttpRequest(e)})},importZip:function(e,t,n){var r=this;return this._io.createXMLHttpRequest("POST",e).then(function(e){var n="application/octet-stream";e.setRequestHeader("Content-Type",n);t.name?t.name:"blob.zip";return r._io.sendXMLHttpRequest(e,t)})},importFile:function(e,t,n){var r="",i=this;return this._io.createXMLHttpRequest("POST",e).then(function(e){var o=Object.prototype.toString.apply(t);if("[object File]"===o)r=t.name;else{if("[object Blob]"!==o)throw new Error;if("undefined"==typeof n||null==n)throw new Error;r=n}var a=new FormData;return a.append("file",t,r),a.append("overwrite",!0),i._io.sendXMLHttpRequest(e,a)})}};return t}),define("sap.watt.common.document/Document",[],function(){"use strict";var e=sap.ui.base.Object.extend("sap.watt.common.plugin.document.Document",{constructor:function(e,t,n,r){this._oOwner=e,this._oDAO=t,this._mEntity=n,this._oEventEmitter=r,this._mState={bDirty:!1,bNew:!n,sETag:null},this._bExtDoc=!1,this._mExtInfo=null,this._oHiddenPromise=Q()}});return e.prototype.getKeyString=function(){return this._mEntity.getKeyString(this._mEntity)},e.prototype.isTypeOf=function(e){return e===this.getType()},e.prototype.getName=function(){return this._mEntity.getName()},e.prototype=jQuery.extend(e.prototype,{getEntity:function(){return this._mEntity},contains:function(e,t){return t=t===!0,this.getEntity().contains(e.getEntity(),t)},isReadOnly:function(){return!(!this.getExtInfo()||this.getExtInfo().readOnly!==!0)||!!this.getEntity().oMetadata.readOnly},getType:function(){return this._mEntity.getType()},getDocumentMetadata:function(){var e="oDocument.getDocumentMetadata() method is depricated. Use oDocument.getEntity().oMetadata instead";return this._oDAO.context.service.log?this._oDAO.context.service.log.error("Document",e,["user"]).done():console.error(e),this._mEntity.oMetadata},setDocumentMetadata:function(e){var t="oDocument.getDocumentMetadata() method is depricated. Use oDocument.getEntity().oMetadata instead";this._oDAO.context.service.log?this._oDAO.context.service.log.error("Document",t,["user"]).done():console.error(t),this._mEntity.oMetadata=e},getETag:function(e){var t=this;return e?this._oDAO.readFileMetadata(this,!0).then(function(e){return e?t._setState({sETag:e.sETag}).then(function(){return t._mState.sETag}):null}):Q(this._mState.sETag)},isDirty:function(){return this._mState.bDirty===!0},isNew:function(){return this._mState.bNew===!0},isHidden:function(){var e=this;return this._oHiddenPromise=this._oHiddenPromise.then(function(){return e.getEntity().oMetadata.hidden===!0}),this._oHiddenPromise},setHidden:function(e,t){var n=this;return this._oHiddenPromise=this._oHiddenPromise.then(function(){e=e===!0;var r=n.getEntity().oMetadata.hidden===!0;return e===r?Q():(n.getEntity().oMetadata.hidden=e,n.getParent().then(function(e){return n._oEventEmitter.fireChanged({document:n,changeType:"hidden",parent:e,options:{source:t}})}))}),this._oHiddenPromise},getExtInfo:function(){return this._mExtInfo},setExtInfo:function(e){this._mExtInfo=e},_hasStateChanged:function(e){for(var t in e)if(this._mState[t]!==e[t])return!0;return!1},_setState:function(e){return this._hasStateChanged(e)?(jQuery.extend(this._mState,e),this._oEventEmitter.fireStateChanged({document:this})):Q()},_ensureETagExists:function(){return this._mState.sETag?Q():this.getETag(!0)},release:function(){return this._oEventEmitter.fireChanged({document:this,changeType:"release"})},delete:function(){throw new Error("Delete not supported for documents of type "+this.getType())},getTitle:function(){return this._mEntity.getTitle()},_notifyAboutNewDocument:function(e,t){return Q.all([this._oEventEmitter.fireCreated({document:t,parent:e}),this._oEventEmitter.fireChanged({document:e,changeType:"created"})])},_notifyAboutDeletion:function(e,t){return Q.all([this._oEventEmitter.fireDeleted({document:t,parent:e}),this._oEventEmitter.fireChanged({document:t,changeType:"deleted"})])},_notifyAboutMove:function(e){return this._oEventEmitter.fireChanged({document:this,newDocument:e,changeType:"renamed"})}}),e}),define("sap.watt.platform.filesystem/document/AbstractFileSystemDocument",["sap.watt.common.document/Document"],function(e){"use strict";function t(){e.apply(this,arguments)}return t.prototype=jQuery.extend(t.prototype,e.prototype),t.prototype=jQuery.extend(t.prototype,{getParent:function(){return this._oOwner.getDocument(this.getEntity().getParentPath(),this.getEntity().getDAO())},exists:function(){var e=this;return this.getParent().then(function(t){return!!t&&t.objectExists(e.getTitle())})},copy:function(e,t,n){var r=this;return e.getCurrentMetadata().then(function(i){return r._oDAO.copyObject(r,e,t,n).then(function(n){return n.refresh().then(function(){var r=_.find(i,function(e){return e.name===t});return r?n:e._newDocumentHandler(n)})})})},move:function(e,t){var n=this;return e.getCurrentMetadata().then(function(r){return n._oDAO.moveObject(n,e,t).then(function(i){return n._notifyAboutMove(i).then(function(){return n.getParent().then(function(o){return o._deleteDocumentHandler(n).then(function(){return i.refresh().then(function(){var n=_.find(r,function(e){return e.name===t});return n?i:e._newDocumentHandler(i)})})})})})})},getProject:function(e){return e=e===!0,this.getEntity().isRoot()?Q(this):this.getEntity().isProject()?e&&this.getEntity().isProject()&&""!==this.getEntity().getParentPath()?this.getParent().then(function(t){return t.getProject(e)}):Q(this):this.getParent().then(function(t){return t?t.getProject(e):null})},getVersions:function(e){var t=e?this._oOwner._oDAO[e]:this._oDAO;return e=e||this.getEntity().getDAO(),t.getVersions(this,e)},getVersion:function(e,t){var n=t?this._oOwner._oDAO[t]:this._oDAO;return t=t||this.getEntity().getDAO(),n.getVersion(this,e,t)},isProject:function(){return console.error("Deprecated: oDocument.isProject() - use oDocument.getEntity().isProject() instead."),this.getEntity().isProject()}}),t}),define("sap.watt.platform.filesystem/document/FolderDocument",["./AbstractFileSystemDocument","sap/watt/lib/lodash/lodash"],function(e,t){"use strict";function n(){e.apply(this,arguments)}return n.prototype=jQuery.extend(n.prototype,e.prototype),n.prototype=jQuery.extend(n.prototype,{_oRefreshPromise:Q(),createProject:function(e){var t=this;return this._oDAO.createProject(this,e).then(function(e){return t._newDocumentHandler(e)})},convertToProject:function(e){if(this.getEntity().isRoot())throw new Error("Root cannot be converted to a project");if(this.getEntity().isProject())throw new Error("The folder is already a project");return this._oDAO.convertToProject(this,e).then(function(e){return e.getProject(!0).then(function(t){return t.refresh().then(function(){return e})})})},createFile:function(e){if(!e)throw new Error("file name or relative path must be provided");var t=this,n=sap.watt.normalizePath(e),r=n.split("/"),i=r.pop();return r.length>0?t._createFolders(r).then(function(e){return e._createFile(i)}):t._createFile(i)},_createFile:function(e){var t=this;return this._oDAO.createFile(this,e).then(function(e){return t._newDocumentHandler(e)})},_newDocumentHandler:function(e){var t=this;return t._notifyAboutNewDocument(t,e).then(function(){return e})},createFolder:function(e){if(!e)throw new Error("folder name or relative path must be provided");var t=this,n=sap.watt.normalizePath(e),r=n.split("/");return t._createFolders(r)},_createFolders:function(e){var t=e.shift();return this._getOrCreateChildFolder(t).then(function(t){return e.length>0?t._createFolders(e):t})},_getOrCreateChildFolder:function(e){var t=this;return this.getCurrentMetadata().then(function(n){for(var r=0;r0&&(i.mixins=a.uniq(i.mixins.concat(n.mixins)),delete n.mixins),i=$.extend(!0,i,n),t.updateProject(this._mWorkspace.id,e.getEntity().getFullPath(),i).then(function(t){return r._refreshProjectSystemDocuments(e).done(),t})},_refreshProjectSystemDocuments:function(e,t){if(e.getEntity().isProject()){var n=t?e.getProject(!0):Q(e);return n.then(function(e){return e.getFolderContent().then(function(e){var n=a.filter(e,function(e){var n=e.getEntity(),r=n.getName();return".che"===r&&n.isFolder()||"mta.yaml"===r&&n.isFile()&&t}),r=[];return a.forEach(n,function(e){r.push(e.refresh())}),Q.all(r)})})}return Q()},_updateAdditionalProjectTypes:function(e,t){t.additionalTypes=t.additionalTypes||[];var n=e.getProjectMetadata();return n.type!==t.type&&t.additionalTypes.push(t.type),"xs2"===this._serverType||0===t.additionalTypes.length?Q(e):this.context.service.projectType.setProjectTypes(e,t.additionalTypes).then(function(){return e})},createProject:function(e,t){var n=this;if(t.name=t.name.trim(),!this._checkFileFolderNameAllowed(t.name))return Q.reject(new Error(this.context.i18n.getText("i18n","fileDAO_errorInvalidFolderName")));t.type=t.type||"blank",t.attributes=t.attributes||{},t.mixinTypes=t.additionalTypes||[],t.generatorDescription=t.generatorDescription||{},t.generatorDescription.options=t.generatorDescription.options||{};var r={};for(var i in t.generatorDescription.options)t.generatorDescription.options.hasOwnProperty(i)&&("string"==typeof t.generatorDescription.options[i]?r[i]=t.generatorDescription.options[i]:"object"==typeof t.generatorDescription.options[i]&&t.generatorDescription.options[i].value&&(r[i]=t.generatorDescription.options[i].value));var o=t.destinations;o&&(r.destinations=JSON.stringify(o)),t.generatorDescription.options=r;var a,s=e.getEntity(),u=Q(),c=!s.isRoot();return c&&(u=e.getProject().then(function(e){var n=e.getEntity().getFullPath(),r=s.getFullPath()+"/"+t.name;t.path=n,a=r.substr(n.length+1)})),u.then(function(){return n._oProjectDao.createProject(n._PROJECT_WORKSPACE_PATH,t,a).then(function(e){if(null===e)throw new Error(n.context.i18n.getText("i18n","fileDAO_cannotCreateProject",[t.name,t.type]));var r=s.isRoot()?"/":s.getFullPath();return n._getUpdatedDocumentAndUpdateItsParentDocument(e.path,r,void 0,e).then(function(e){return e.getProject(!0).then(function(t){n._refreshProjectSystemDocuments(t,!0).done(),t!==e&&n._refreshProjectSystemDocuments(e).done()}).done(),n._updateAdditionalProjectTypes(e,t)})}).fail(function(e){if(n._checkFileFolderCreationError_FileFolderAlreadyExists(e,!0))throw new Error(n.context.i18n.getText("i18n","fileDAO_errorProjectAlreadyExists"));var t=e.responseJSON?e.responseJSON.message:e.message;throw new Error(t)})})},createFolder:function(e,t){var n=this;if(t=t.trim(),!this._checkFileFolderNameAllowed(t))return Q.reject(new Error(this.context.i18n.getText("i18n","fileDAO_errorInvalidFolderName")));var r=e.getEntity().isRoot();if(r){var i={name:t};return"xs2"===n._serverType&&(i.type="mta"),this.createProject(e,i)}var o=e.getEntity().getFullPath();return this._oDao.createFolder(this._PROJECT_WORKSPACE_PATH+"/folder"+o,t).then(function(e){return n._getUpdatedDocumentAndUpdateItsParentDocument(o+"/"+t,o,e)}).fail(function(e){if(n._checkFileFolderCreationError_FileFolderAlreadyExists(e,r))throw new Error(n.context.i18n.getText("i18n","fileDAO_errorFolderAlreadyExists"));var t=e.responseJSON?e.responseJSON.message:e.message;throw new Error(t)})},_saveFileSystemObjectMetadata:function(e){var t=e.path||e.node.path;"/"!==t&&u.setMetadata(e.node||e)},copyObject:function(e,t,n,r){var i=this,o=e.getEntity(),a=this._PROJECT_WORKSPACE_PATH+"/copy"+URI(o.getFullPath()).path(),s=t.getEntity(),u=t.getEntity().getBackendData().getLocationUrl(),c=s.getFullPath();return 0===c.indexOf(o.getFullPath())?Q.reject(new Error(this.context.i18n.getText("i18n","fileDAO_errorDestinationNotAllowed"))):(n||(n=o.getName()),n=n.trim(),this._checkFileFolderNameAllowed(n)?this._oDao.copy(a,u,n,r).then(function(){return i._getUpdatedDocumentAndUpdateItsParentDocument(c+"/"+n,c)}).fail(function(e){if(i._checkFileFolderCreationError_FileFolderAlreadyExists(e))throw new Error(i.context.i18n.getText("i18n","fileDAO_errorFolderAlreadyExists"));return Q.reject(e)}):Q.reject(new Error(this.context.i18n.getText("i18n","fileDAO_errorInvalidFileOrFolderName"))))},isShared:function(){return this._mWorkspace.isLockEnabled},getSharedWorkspaceService:function(){return this.context.service.sharedWorkspace},_fetchAndSaveChildrenMetadata:function(e){var t=this;return this._oDao.fetchChildren(e).then(function(e){u.deleteMetadata(e.node.path,!0),t._saveFileSystemObjectMetadata(e),t._cacheWorkspaceFileSystemObjects(e.children||[])})},onLogIn:function(){var e=this;this._fetchAndSaveChildrenMetadata(this._PROJECT_WORKSPACE_PATH+"/tree/?depth=1000&includeFiles=true").then(function(){e._oWorkspaceCachedPromise.resolve()}).done()},_cacheWorkspaceFileSystemObjects:function(e){for(var t=this,n=0;n0?u._handleSearchResult(u._oLastSearch.result,t,n):(u._oLastSearch.searchTermLocation=p,this._oDao.search(l,r).then(function(e){return u._oLastSearch.result=e,u._handleSearchResult(e,t,n)},function(e){var t=e.responseJSON?e.responseJSON.message:e.responseText;throw t=t?t:e.message,new Error(t)}))},_handleSearchResult:function(e,t,n){function r(e,r){var i=this;return e.length>0?Q.all(e).then(function(e){i._oLastSearch.preFetchedFiles={aFileEntries:e,numFound:r?r:i._oLastSearch.preFetchedFiles.numFound,start:t+n}}):Q()}var i=this,o={aFileEntries:[],numFound:e.length>300?300:e.length,start:0},a=0===t?0:t+i._oLastSearch.preFetchedFiles.aFileEntries.length,s=e.length-a,u=0===t?2*n:n,c=a+(s0&&i._oLastSearch.preFetchedFiles.start===t)return r.call(i,o.aFileEntries).done(),i._oLastSearch.preFetchedFiles;var f=u>n?o.aFileEntries.splice(n,u-n):[];return r.call(i,f,e.length).done(),Q.all(o.aFileEntries).then(function(e){return o.aFileEntries=e,Q(o)})},getCurrentMetadata:function(e,t,n,r){var i=this,o=e.getEntity();return this._fetchChildren(o.getFullPath(),o.getBackendData().getTreeUrl(),t,n).then(function(e){var t=[];return a.forEach(e,function(e){t.push({name:e.name,path:e.path,changedOn:e.modified,folder:"folder"===e.type||"project"===e.type,parentPath:e.path.substr(0,e.path.lastIndexOf("/")||0),length:e.contentLength,project:"project"===e.type})}),i.context.service.filefilter.filterMetadata(t,r)})},getFolderContent:function(e,t){var n=this,r=e.getEntity();return this._fetchChildren(r.getFullPath(),r.getBackendData().getTreeUrl(),!1,t).then(function(e){var t=[];return a.forEach(e,function(e){t.push(n._createFileFolderDocument(e))}),Q.all(t)})},_fetchChildren:function(e,t,n,r){var i=this;return this._oWorkspaceCachedPromise.promise.then(function(){var o=r===!0?i._fetchAndSaveChildrenMetadata(t):Q();return o.then(function(){return u.getMetadata(e,!0,!n)})})},_createChildrenMetadataArray:function(e,t){t||(t=[]);for(var n=0;n>>>>>>")?i=!1:i||(r=r?r+n+o[a]:o[a]):i=!!t;return r}};return e}),define("sap/watt/ideplatform/backend/util/GitBackendUtils",[],function(){"use strict";var e={getPathToRefresh:function(e,t){if(!t)return"/";var n="/"+t;if(e&&e.length>0)if(1===e.length)n+="/"+e[0];else{var r=this._getCommonAncestorFolder(e);r&&(n+="/"+r)}return n},_getCommonAncestorFolder:function(e){for(var t=[],n=0;n<100;){for(var r="",i=0;i-1&&(o[a+1]=n,r=o.join("/"))}window.location.href=r}})},_updatePathMapping:function(e,t){this._oPathMapping.workspace.id=e.id,this._oPathMapping.workspace.isLockEnabled=e.attributes&&"true"===e.attributes.SUPPORT_LOCKS,this._oPathMapping.workspace.location="",this._oPathMapping.workspace.childLocation="/project/"+e.id,t===e.name?this._oPathMapping.workspace.name=void 0:this._oPathMapping.workspace.name=e.name},login:function(e,n){if(c)return c;var o,s=this,u=i();return c=Q.spread([a()],function(e){return e&&(l.sName=e.name,l.sEMail=e.email,l.sFirstName=e.firstName,l.sLastName=e.lastName),t.loadWorkspaces()}).then(function(e){o="webide-"+l.sName+"-"+u;var n=sap.watt.getURLParameter("invalidateCfSession");if(n&&r.send("/cf/flush-user-data","POST",{},{}).fail(function(e){console.error(e.message)}).done(),e){var i=sap.watt.getURLParameter("workspaceId");if(i&&(e=e.filter(function(e){return e&&e.workspaceReference&&e.workspaceReference.id===i}),0===e.length)){var a=s.context.i18n.getText("i18n","system_workspaceUnavailable"),c=new Error(a);return c.workspaceError=!0,Q.reject(c)}if(e.length>0&&e[0].workspaceReference.id)return t.loadWorkspace(e[0].workspaceReference.id)}return t.createWorkspace(o,u).then(function(e){var n=e.id;return t.loadWorkspace(n)}).fail(function(e){if(500===e.status&&"Developer is not allowed to create workspace."===JSON.parse(e.responseText).message){var n=new Error(s.context.i18n.getText("i18n","system_workspaceCreationFailed"));return n.workspaceCreationFailed=!0,Q.reject(n)}throw 409===e.status&&t.getWorkspaceId(o).then(function(e){var n=e.id;return t.loadWorkspace(n)}).fail(function(e){throw new Error(e.message||e)}),new Error(e.message)})}).then(function(e){return s._updatePathMapping(e,o),s.context.event.fireLoggedIn()},function(e){if(401===e.status){var t=e.responseJSON?e.responseJSON.error:e.message;throw new Error(t)}if(0===e.status&&"timeout"===e.statusText)throw new Error(s.context.i18n.getText("i18n","system_timeout"));if(e.workspaceError)throw new SevereError(e.message+" "+s.context.i18n.getText("i18n","system_openSpecificWorkspaceByQueryParamFailed_suggested_action"));if(e.workspaceCreationFailed)throw new SevereError(e.message+" "+s.context.i18n.getText("i18n","system_createWorkspaceFailed_suggested_action"));var n=s.context.i18n.getText("i18n","system_unexpectedError");throw console.error(e.message+"\n"+e.stack),new SevereError(n)})},getQuota:function(){return Q({defaultMaxEntitySize:20971520})},isAlive:function(){var e=URI("user").absoluteTo(sap.watt.getEnv("che_server")).toString(),t=jQuery.ajax(e);return Q(t).then(function(){if(200!==t.status)throw new Error("SERVER_ERROR");if(s(t))throw new Error("SESSION_LOST")},function(){throw new Error("CONNECTION_LOST")})},getSystemInfo:function(){return c.then(function(){return{sDbname:"Orion",sUsername:l.sName,sAccount:i(),sEMail:l.sEMail,sFirstName:l.sFirstName,sLastName:l.sLastName}})},reconnect:function(){return a()}});return p}),define("sap.watt.ideplatform.che.chebackend/dao/GitDAO",["../io/Request","sap/watt/lib/lodash/lodash"],function(e,t){var n={_getImportPostData:function(e,t,n,r,i,o,a,s){var u={project:{type:"blank"},source:{runners:{},project:{location:r,type:"git-ba",parameters:{userName:null===t||void 0===t?"":t,password:null===i||void 0===i?"":i}}}};return u},doInitRepository:function(t,n,r,i){var o={};o.initCommit=!0,o.workingDir="",o.bare=!1;var a=URI("git/"+i+"/init?projectPath="+t).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(a,"POST",{},o)},doClone:function(t,n,r,i,o,a,s,u,c,l,p){var f="?async=true&force=true";p&&(f+="&destinationName="+p);var d=URI("/project/"+c+"/import/"+l+f).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(d,"POST",{},this._getImportPostData(n,r,o,t,i,a,s,u))},doFetch:function(t,n,r,i,o){var a={};a.remote=n.Value[0].trim(),a.removeDeletedRefs=!1,a.timeout=0,a.attributes={},a.attributes.userName=i,a.attributes.password=o;var s=URI("git/"+t.sWorkspaceId+"/fetch?async=true&projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(s,"POST",{},a)},doPull:function(t,n,r,i,o){var a={};a.remote=n.Value[0].trim(),a.timeout=0,a.attributes={},a.attributes.userName=i,a.attributes.password=o;var s=URI("git/"+t.sWorkspaceId+"/pull?async=true&projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(s,"POST",{},a)},getRepositoryDetails:function(t){var n={},r=URI("git/"+t.sWorkspaceId+"/config?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(r,"GET",{},n)},getUserInfo:function(){var t=URI("prefs/user/git/config").absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(t,"GET")},getRepositoryConfigurations:function(t){var n={},r=URI("git/"+t.sWorkspaceId+"/config?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(r,"GET",{},n)},setRepositoryConfiguration:function(t,n){var r={};r.configEntries={},r.configEntries[n.Key]=n.Value;var i=URI("git/"+t.sWorkspaceId+"/config?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(i,"PUT",{},r)},deleteRepositoryConfiguration:function(t,n){var r=URI("git/"+n.sWorkspaceId+"/config?projectPath="+n.sProjectPath+"&requestedConfig="+t.Key).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(r,"DELETE")},updateRepositoryConfiguration:function(t,n,r){var i={};i.configEntries={},i.configEntries[t.Key]=n.Value[0];var o=URI("git/"+r.sWorkspaceId+"/config?projectPath="+r.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(o,"PUT",{},i)},doRebase:function(t,n,r){var i={};i.branch=n,i.operation=r?r:"BEGIN";var o=URI("git/"+t.sWorkspaceId+"/rebase?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(o,"POST",{},i)},doMerge:function(t,n,r){var i={};i.commit=n;var o=URI("git/"+t.sWorkspaceId+"/merge?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(o,"POST",{},i)},doAddRemote:function(t,n,r,i,o,a){var s={};s.name=n,s.url=r,i&&(s.FetchRefSpec=i),o&&(s.PushURI=o),a&&(s.PushRefSpec=a);var u=URI("git/"+t.sWorkspaceId+"/remote-add?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(u,"POST",{},s)},doGetLocalBranches:function(t){var n={};n.listMode="a";var r="/"+t.sProjectPath.split("/")[1],i=URI("git/"+t.sWorkspaceId+"/branch-list?projectPath="+r).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(i,"POST",{},n)},doGetRemoteBranches:function(t){var n={};n.listMode="r";var r=URI("git/"+t.sWorkspaceId+"/branch-list?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(r,"POST",{},n)},doMergeChangesFromRemoteToHead:function(t,n){var r={};r.Merge=n;var i=URI(t.HeadLocation).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(i,"POST",{},r)},doRevert:function(t,n){var r={};r.Revert=n.Name;var i=URI(t.HeadLocation).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(i,"POST",{},r)},doPush:function(t,n,r,i,o,a,s,u){var c={};if(t&&!n){var l="HEAD:refs/heads/",p="HEAD:refs/for/",f=i[0].indexOf(l)+l.length;i[0]=p+i[0].substr(f)}c.refSpec=i,c.remote=o,c.force=!1,c.timeout=0,c.attributes={},c.attributes.userName=u,c.attributes.password=s;var d=URI("git/"+r.sWorkspaceId+"/push?async=true&projectPath="+r.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(d,"POST",{},c)},doCherryPick:function(e,t){},getTask:function(n,r){var i=URI(n).path(),o=i.lastIndexOf("/");i=[i.slice(0,o),"/"+r,i.slice(o)].join("");var a=sap.watt.getEnv("che_server");t.startsWith(i,a)&&(i=URI(i).relativeTo(a).toString());var s=i;return e.send(s,"GET")},getChangesUri:function(t,n){var r={},i=URI("git/"+t.sWorkspaceId+"/commit?async=true&projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(i,"POST",{},r)},getChanges:function(t){var n=URI(t).absoluteTo(sap.watt.getEnv("orion_path"));return n.setSearch({pageSize:1e3}),e.send(n.toString(),"GET")},getRepositoriesList:function(e){},getStatus:function(t){var n={},r=URI("git/"+t.sWorkspaceId+"/status?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(r,"POST",{},n)},doLog:function(n,r,i){var o={},a=2,s=n.sProjectPath;if(r&&i){o.skip=i,o.maxCount=r;var u=t.split(s,"/");if(u.length>=a&&(s=u[0]+u[1]),u.length>a){u=t.drop(u,a);var c=t.join(u,"/");o.filePath=c}}var l=URI("git/"+n.sWorkspaceId+"/log?async=true&projectPath="+s).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(l,"POST",{},o)},doCommit:function(t,n,r,i,o){var a={};a.message=n,a.amend=i;var s=URI("git/"+t.sWorkspaceId+"/commit?async=true&projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(s,"POST",{},a)},get:function(t,n,r){var i=URI(t).absoluteTo(sap.watt.getEnv("orion_path")).toString();return n&&(i=URI(i).setSearch({page:n}).toString()),r&&(i=URI(i).setSearch({pageSize:r}).toString()),e.send(i,"GET")},getFileDiff:function(t,n){var r={},i=t.sProjectPath.split("/",2).join("/"),o=t.sProjectPath.substring(t.sProjectPath.indexOf(i)+i.length+1);r.cached=!1,r.fileFilter=[o],n&&(r.cached=!0);var a=URI("git/"+t.sWorkspaceId+"/diff?projectPath="+i).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(a,"POST",{},r)},getFile:function(t,n){var r={},i=t.sProjectPath.split("/",2).join("/"),o=t.sProjectPath.substring(t.sProjectPath.indexOf(i)+i.length+1);r.type=n,r.fileName=o;var a=URI("git/"+t.sWorkspaceId+"/file?projectPath="+i).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(a,"POST",{},r)},getCommitsUri:function(t){var n=URI(t.Children[0].CommitLocation).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(n,"POST",{},{New:"HEAD"})},getCommits:function(t){var n=URI(t).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(n,"GET")},getCommitsByRange:function(t,n,r){var i={};i.revisionRangeSince=n,i.revisionRangeUntil=r;var o=URI("git/"+t.sWorkspaceId+"/log?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(o,"POST",{},i)},getCommitHistory:function(t,n){var r=URI(t.CommitLocation+"/?page="+n).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(r,"GET")},checkoutLocalBranch:function(t,n,r){var i={};i.name=n;var o=URI("git/"+t.sWorkspaceId+"/checkout?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(o,"POST",{},i)},createLocalBranch:function(t,n,r){var i={};i.name=n,r&&(i.startPoint=r);var o=URI("git/"+t.sWorkspaceId+"/branch-create?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(o,"POST",{},i)},removeLocalBranch:function(t,n,r){var i={};i.name=n,i.force=!0;var o=URI("git/"+r.sWorkspaceId+"/branch-delete?projectPath="+r.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(o,"POST",{},i)},checkoutRemoteBranch:function(t,n){var r={};r.name=n,r.startPoint="",r.createNew=!0;var i=URI("git/"+t.sWorkspaceId+"/checkout?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(i,"POST",{},r)},unStageMultipleFiles:function(t,n){var r={filePattern:n},i=URI("git/"+t.sWorkspaceId+"/reset?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(i,"POST",{},r)},stageMultipleFiles:function(t,n){var r={attributes:{all:!0},filepattern:n},i=URI("git/"+t.sWorkspaceId+"/add?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(i,"POST",{},r)},stage:function(t){var n={};n.filepattern=[t.file],n.update=t.update;var r=URI("git/"+t.sWorkspaceId+"/add?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(r,"POST",{},n)},doResetBranch:function(t,n,r){var i={};i.type=n,r&&(i.commit=r);var o=URI("git/"+t.sWorkspaceId+"/reset?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(o,"POST",{},i)},unStage:function(t){var n={};n.commit="HEAD",n.filePattern=[t.file];var r=URI("git/"+t.sWorkspaceId+"/reset?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(r,"POST",{},n)},doDiscardChanges:function(t,n){var r={};r.files=n;var i=URI("git/"+t.sWorkspaceId+"/checkout?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(i,"POST",{},r)},unStageAll:function(t){var n={};n.commit="HEAD";var r=URI("git/"+t.sWorkspaceId+"/reset?projectPath="+t.sProjectPath).absoluteTo(sap.watt.getEnv("orion_path")).toString();return e.send(r,"POST",{},n)},doTag:function(e,t){}};return n}),define("sap.watt.ideplatform.che.chebackend/featuretoggle/FeatureToggle",["../dao/File","sap/watt/lib/lodash/lodash"],function(e,t){"use strict";return{isFeatureSupported:function(e,n){return this.getUnSupportedFeatures().then(function(r){return!r[e][n]||!t.includes(r[e][n].versions,"all")})},getUnSupportedFeatures:t.once(function(){var e=jQuery.sap.getModulePath("sap.watt.ideplatform.che.plugin.chebackend.featuretoggle.UnSupportedFeatures",".json");return Q(jQuery.ajax({url:e,dataType:"json"}))})}}),define("sap/watt/common/util/HttpStatusConstants",[],function(){return{HTTP_STATUS_CONTINUE:100,HTTP_STATUS_SWITCHING_PROTOCOLS:101,HTTP_STATUS_PROCESSING:102,HTTP_STATUS_OK:200,HTTP_STATUS_CREATED:201,HTTP_STATUS_ACCEPTED:202,HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION:203,HTTP_STATUS_NO_CONTENT:204,HTTP_STATUS_RESET_CONTENT:205,HTTP_STATUS_PARTIAL_CONTENT:206,HTTP_STATUS_MULTI_STATUS:207,HTTP_STATUS_MULTIPLE_CHOICES:300,HTTP_STATUS_MOVED_PERMANENTLY:301,HTTP_STATUS_MOVED_TEMPORARILY:302,HTTP_STATUS_SEE_OTHER:303,HTTP_STATUS_NOT_MODIFIED:304,HTTP_STATUS_USE_PROXY:305,HTTP_STATUS_TEMPORARY_REDIRECT:307,HTTP_STATUS_BAD_REQUEST:400,HTTP_STATUS_UNAUTHORIZED:401,HTTP_STATUS_PAYMENT_REQUIRED:402,HTTP_STATUS_FORBIDDEN:403,HTTP_STATUS_NOT_FOUND:404,HTTP_STATUS_METHOD_NOT_ALLOWED:405,HTTP_STATUS_NOT_ACCEPTABLE:406,HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED:407,HTTP_STATUS_REQUEST_TIMEOUT:408,HTTP_STATUS_CONFLICT:409,HTTP_STATUS_GONE:410,HTTP_STATUS_LENGTH_REQUIRED:411,HTTP_STATUS_PRECONDITION_FAILED:412,HTTP_STATUS_REQUEST_TOO_LONG:413,HTTP_STATUS_REQUEST_URI_TOO_LONG:414,HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE:415,HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE:416,HTTP_STATUS_EXPECTATION_FAILED:417,HTTP_STATUS_INSUFFICIENT_SPACE_ON_RESOURCE:419,HTTP_STATUS_METHOD_FAILURE:420,HTTP_STATUS_UNPROCESSABLE_ENTITY:422,HTTP_STATUS_LOCKED:423,HTTP_STATUS_FAILED_DEPENDENCY:424,HTTP_STATUS_INTERNAL_SERVER_ERROR:500,HTTP_STATUS_NOT_IMPLEMENTED:501,HTTP_STATUS_BAD_GATEWAY:502,HTTP_STATUS_SERVICE_UNAVAILABLE:503,HTTP_STATUS_GATEWAY_TIMEOUT:504,HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED:505,HTTP_STATUS_INSUFFICIENT_STORAGE:507}}),define("sap.watt.ideplatform.che.chebackend/service/GitService",["../dao/GitDAO","../util/PathMapping","../featuretoggle/FeatureToggle","sap/watt/lib/lodash/lodash","sap/watt/common/util/HttpStatusConstants"],function(e,t,n,r,i){return{_sSSHKnownHostKey:"ssh_known_host_",_oStorage:void 0,_i18n:void 0,_repositoryDetailsMap:{},_gitLogDetailsMap:{},_sGitConfigNode:"git.config",REFS_HAEDS:"refs/heads/",init:function(){jQuery.sap.require("jquery.sap.storage"),this._oStorage=jQuery.sap.storage(jQuery.sap.storage.Type.session),this._i18n=this.context.i18n},_getDocumnet:function(e){var t=this;return t.context.service.filesystem.documentProvider.getRoot().then(function(n){return t.context.service.document.getDocumentByPath(n.getEntity().getFullPath()+"/"+e)}).fail(function(e){})},_verifyCreateRemoteResponse:function(e,t){if("Error"===e.severity)throw this.context.service.log.error("git",this._i18n.getText("i18n","gitService_errorCreateRemoteFailed"),["user"]).done(),{name:this._i18n.getText("i18n","gitService_errorCreateRemoteFailed"),message:r.get(e,"commandOutput")||r.get(e,"updates[0].Result")||"",status:"CreateRemoteFailed",source:"git"};return this.context.service.log.info("git","Project "+t+": Push has been completed for create remote branch",["user"]).done(),Q("ok")},createRemoteBranch:function(t,n,i,o,a,s,u){var c=this,l=this._getProjectName(i);return this.context.service.log.info("git","Project "+l+": Create Remote Branch sent",["user"]).done(),this.getRepositoryConfigurations(i).then(function(o){var p=r.find(o,["Key","branch.master.remote"]);return e.doPush(!1,!1,i,[t+":"+c.REFS_HAEDS+n],(r.get(p,"Value[0]")||"").trim(),a,s,u).then(function(e){return c._waitForTask(e,i.sWorkspaceId).then(function(e){return c._verifyCreateRemoteResponse(e,l)})}).fail(function(e){c._logAndThrowCustomError(c._i18n.getText("i18n","gitService_errorCreateRemoteFailed"),e)})})},_calcProjectName:function(e){if(e){var t=this;r.endsWith(e,"/")&&(e=e.substring(0,e.length-1));var n=e.substring(e.lastIndexOf("/")+1),i=n.lastIndexOf(".git"),o=n;return i!==-1&&(o=n.substring(0,i)),t.context.service.filesystem.documentProvider.getRoot().then(function(e){return e.getCurrentMetadata().then(function(e){var t=r.map(r.filter(e,function(e){return e.path.indexOf(o)>-1}),"path","path");if(0===t.length)return o;var n=0;r.forEach(t,function(e){var t=e.split("-");if(t.length>=2){var r=parseInt(t[t.length-1]);n=r>n?r:n}});var i=n+1;return o+"-"+i})})}return Q.reject(new Error(this._i18n.getText("i18n","gitService_errorCalcProjectName")))},setIgnoreSystemFiles:function(e){return Q()},clone:function(n,r,i,o,a,s,u){var c=this,l=this._getRepositoryNameFromURL(n);return this.context.service.chebackend.fileDAO.checkFileFolderNameAllowed(l).then(function(l){return l?c._calcProjectName(n).then(function(l){c.context.service.log.info("git","Project "+l+": Clone request sent",["user"]).done();var p=t.workspace.id,f=null;return Q(o?c._getKnownHost(n,s,r,i,o,a,f,p,l):"").then(function(t){var t="";return e.doClone(n,t,r,i,o,a,s,null,p,l,u).then(function(e){return c._waitForTask(e,p).then(function(e){return c.context.service.log.info("git","Project "+l+": Clone request completed successfully",["user"]).done(),e.Location=e.projectDescriptor.name,c.context.service.document.getDocumentByPath(e.projectDescriptor.path,!0).then(function(t){return c.context.service.filesystem.documentProvider.getRoot().then(function(n){return t._notifyAboutNewDocument(n,t).then(function(){return t.refresh().then(function(){return e})})})})})})}).fail(function(e){var t,n;e.responseJSON&&(t=e.responseJSON.Message||e.responseJSON.message,t.endsWith("not authorized")&&(n="Info")),c._logAndThrowCustomError(c._i18n.getText("i18n","gitService_errorCloneRequestFailed"),e,n)})}):void c._logAndThrowCustomError(c._i18n.getText("i18n","gitService_invalidGitRepositoryNameError"),new Error)})},_getRepositoryNameFromURL:function(e){var t=e.lastIndexOf("/"),n=e.indexOf(".git");return n!==-1?e.substring(t+1,n):e.substring(t+1)},getRepositoryDetailsByLocation:function(e){return{Name:r.get(e,"projectDescriptor.name")||""}},getRepositoryDetails:function(t,n){var i=this,o=!n&&t.config?Q.resolve(t.config):e.getRepositoryConfigurations(t);return o.then(function(e){return r.set(t,"config",e),{oGit:t,GitUrl:(r.get(t.config,"remote.origin.url")||"").trim()}}).fail(function(e){i._logAndThrowCustomError(i._i18n.getText("i18n","gitService_errorGetRepositoryDetailsRequestFailed"),e)})},getFileHead:function(t,n){var r=this,i=n?"HEAD":"INDEX";return e.getFile(t,i).then(function(e){return e}).fail(function(e){r._logAndThrowCustomError(r._i18n.getText("i18n","gitService_errorDiffRequestFailed"),e)})},getFileNew:function(t,n){var r=this,i=n?"INDEX":"HEAD";return e.getFile(t,i).then(function(e){return e}).fail(function(e){r._logAndThrowCustomError(r._i18n.getText("i18n","gitService_errorDiffRequestFailed"),e)})},pull:function(t,n,i,o,a,s){var u=this,c=this._getProjectName(t);this.context.service.log.info("git","Project "+c+": Pull request sent",["user"]).done();var l=t.config?u.mapGetRepositoryConfigurations(t.config):this.getRepositoryConfigurations(t);return l.then(function(n){return e.doPull(t,r.find(n,["Key","branch.master.remote"]),o,s,a).then(function(e){return u._waitForTask(e,t.sWorkspaceId).then(function(){return u.context.service.log.info("git","Project "+c+": Pull request completed successfully",["user"])})}).fail(function(e){return e&&'{"message":"Already-up-to-date"}'==e.responseText?u.context.service.log.info("git","Project "+c+": Pull request completed, Repository is already up-to-date",["user"]):void u._logAndThrowCustomError(u._i18n.getText("i18n","gitService_errorPULLRequestFailed"),e)}).fin(function(){return u.context.event.firePullFinished(t)})})},fetch:function(t,n,i,o,a){var s=this;this.context.service.log.info("git","Project "+this._getProjectName(t)+": Fetch request sent",["user"]).done(); var u=t.config?s.mapGetRepositoryConfigurations(t.config):this.getRepositoryConfigurations(t);return u.then(function(n){return e.doFetch(t,r.find(n,["Key","branch.master.remote"]),i,a,o).then(function(e){return s._waitForTask(e,t.sWorkspaceId).then(function(){return s._getBranchesWithEmptyData(t)})})}).fail(function(e){s._logAndThrowCustomError(s._i18n.getText("i18n","gitService_errorFetchRequestFailed"),e)})},fetchFromGerrit:function(e,t,n,o,a,s,u){var c,l=this,p="remote.origin.fetch",f=e.config?l.mapGetRepositoryConfigurations(e.config):this.getRepositoryConfigurations(e);return f.then(function(t){return c=r.find(t,{Key:p})||{Key:p,Value:["+refs/heads/*:refs/remotes/origin/*"]},l.updateRepositoryConfiguration(c,{Value:[l._getFetchFromGerritString(o)]},e)}).then(function(){return l.fetch(e,t,a,s,u).then(function(){return l.checkoutLocalBranch(e,l._getBranchName(o))})}).fail(function(e){return e.status===i.HTTP_STATUS_CONFLICT&&(e.sBranchName=l._getBranchName(o)),l._logAndThrowCustomError(l._i18n.getText("i18n","gitService_errorFetchFromGerritRequestFailed"),e)}).fin(function(){return l.updateRepositoryConfiguration(c,c,e)})},merge:function(t,n,r){var i=this,o=this._getProjectName(t);return this.context.service.log.info("git","Project "+o+": Merge request sent",["user"]).done(),e.doMerge(t,n,r).then(function(e){if("ALREADY_UP_TO_DATE"===e.mergeStatus||"FAST_FORWARD"===e.mergeStatus||"MERGED"===e.mergeStatus)return i.context.service.log.info("git","Project "+o+": Merge request completed successfully: "+e.Result,["user"]);throw new Error(e.mergeStatus)}).fail(function(e){switch(e.message){case"CONFLICTING":i._logAndThrowCustomError(i._i18n.getText("i18n","gitService_errorMergeRequestFailed"),new Error(i._i18n.getText("i18n","gitService_errorMergeRequestFailedDueToConflicts")),"Warning");break;default:i._logAndThrowCustomError(i._i18n.getText("i18n","gitService_errorMergeRequestFailed"),e,"Error")}}).fin(function(){return i.context.event.fireMergeFinished(t)})},rebase:function(t,n){var r=this,i=this._getProjectName(t);return this.context.service.log.info("git","Project "+i+": Rebase request sent",["user"]).done(),this.getRemoteNameOfBranch(t,n).then(function(n){return e.doRebase(t,n).then(function(e){if("OK"===e.status||"ALREADY_UP_TO_DATE"===e.status||"FAST_FORWARD"===e.status)return r.context.service.log.info("git","Project "+i+": Rebase request completed successfully",["user"]);throw new Error(e.status)}).fail(function(e){switch(e.message){case"STOPPED":r._logAndThrowCustomError(r._i18n.getText("i18n","gitService_errorRebaseRequestFailed"),new Error(r._i18n.getText("i18n","gitService_errorRebaseInteractiveConflictsOccuredContinueSkipAbort")),"Warning","RebaseInteractive");break;case"FAILED_WRONG_REPOSITORY_STATE":r._logAndThrowCustomError(r._i18n.getText("i18n","gitService_errorRebaseRequestFailed"),new Error(r._i18n.getText("i18n","gitService_errorRebaseInProgressReferToGItPane")),"Error","RebaseInteractive");break;case"FAILED_UNMERGED_PATHS":case"FAILED_PENDING_CHANGES":r._logAndThrowCustomError(r._i18n.getText("i18n","gitService_errorRebaseRequestFailed"),new Error(r._i18n.getText("i18n","gitService_errorRebaseInteractiveConflictsOccuredContinueSkipAbort")),"Error","RebaseInteractive");break;case"CONFLICTING":r._logAndThrowCustomError(r._i18n.getText("i18n","gitService_errorRebaseRequestFailed"),new Error(r._i18n.getText("i18n","gitService_errorRebaseInteractiveConflicts")),"Warning","RebaseInteractive");break;default:r._logAndThrowCustomError(r._i18n.getText("i18n","gitService_errorRebaseRequestFailed"),e,"Error")}})}).fin(function(){return r.context.event.fireRebaseFinished(t)})},rebaseInteractive:function(t,n){var r=this,i=this._getProjectName(t);return this.context.service.log.info("git","Project "+i+": "+n+" request sent",["user"]).done(),e.doRebase(t,"",n).then(function(e){return r._handleRebaseInteractiveResponse(e,n,i)}).fail(function(e){r._logAndThrowCustomError(e.name,e)}).fin(function(){r.context.event.fireRebaseInteractiveFinished(t)})},deleteRepositoryConfiguration:function(t,n){var i=this;r.set(n,"config",void 0);var o=this._getProjectName(n);return this.context.service.log.info("git","Project "+o+": Delete configuration request sent",["user"]).done(),e.deleteRepositoryConfiguration(t,n).then(function(e){return i.context.service.log.info("git","Project "+o+": Delete configuration completed successfully",["user"])}).fail(function(e){i._logAndThrowCustomError(e.name,e)})},updateRepositoryConfiguration:function(t,n,i){var o=this;r.set(i,"config",void 0);var a=this._getProjectName(i);return this.context.service.log.info("git","Project "+a+": Update configuration request sent",["user"]).done(),e.updateRepositoryConfiguration(t,n,i).then(function(e){return o.context.service.log.info("git","Project "+a+": Update configuration completed successfully",["user"])}).fail(function(e){o._logAndThrowCustomError(e.name,e)})},_handleRebaseInteractiveResponse:function(e,t,n){switch(e.status){case"OK":case"ABORTED":return this.context.service.log.info("git","Project "+n+": "+t+" request completed successfully",["user"]).done(),!0;case"FAILED_UNMERGED_PATHS":throw{name:this._i18n.getText("i18n","gitService_errorRebaseInteractiveContinueRequestFailed"),detailedMessage:this._i18n.getText("i18n","gitService_errorRebaseInteractiveUnmergedPaths")};case"NOTHING_TO_COMMIT":throw{name:this._i18n.getText("i18n","gitService_errorRebaseInteractiveContinueCannotBeProcessed"),detailedMessage:this._i18n.getText("i18n","gitService_errorRebaseInteractiveNothingToCommit"),sType:"Warning"};case"STOPPED":throw{name:this._i18n.getText("i18n","gitService_errorRebaseInteractiveSkipPatchOperationStatusStopped"),detailedMessage:this._i18n.getText("i18n","gitService_errorRebaseInteractiveRepositoryContainesConflicts"),sType:"Warning"}}},getRemoteLocationFromBranchName:function(e){var t=e.substr(e.indexOf("/")+1),n=t.substr(t.indexOf("/")+1),r=n.substr(n.indexOf("/")+1);return this.REFS_HAEDS+r},push:function(t,n,i,o,a,s,u,c,l){var p=this,f=(i.GitUrl,this._getProjectName(t));this.context.service.log.info("git","Project "+f+": Push request sent",["user"]).done();var d=t.config?p.mapGetRepositoryConfigurations(t.config):this.getRepositoryConfigurations(t);return d.then(function(i){var c=r.find(i,["Key","branch.master.remote"]);return p.getLocalBranches(t).then(function(i){return u?sRemoteLocation=p.getRemoteLocationFromBranchName(u.FullName):sRemoteLocation=r.get(p.getCurrentBranch(i),"RemoteLocation[0].remoteBranchName")||"master",e.doPush(n,l,t,["HEAD:"+sRemoteLocation],c.Value[0].trim(),o,a,s).then(function(e){return p._waitForTask(e,t.sWorkspaceId).then(function(e){return p._verifyPushResponse(e,f)})}).fail(function(e){if("Warning"!==e.type&&"PushFailedWithErrorTag"!==e.status||p._logAndThrowCustomError(e.name,e,e.type),"PushFailed"===e.status)throw p.context.service.log.error("git",p._i18n.getText("i18n","gitService_errorPushRequestFailed"),["user"]).done(),e;p._logAndThrowCustomError(p._i18n.getText("i18n","gitService_errorPushRequestFailed"),e)}).fin(function(){return p.context.event.firePushFinished(t)})})})},_setCommitDiffFiles:function(e){var t,n,r=e.diffCommitFile;e.Diffs=[];for(var i=0;i0){var r=i._mapFetchCommits(e[n].commits);t.push({branch:u[n].localName+" ("+u[n].remoteName+")",changes:r})}return i.context.service.log.info("git","Project "+o+": Log request completed",["user"]).done(),t})}).fail(function(e){i._logAndThrowCustomError(i._i18n.getText("i18n","gitService_errorGetCommitsRequestFailed"),e)})},getCommitsCount:function(e){var t=this;return this.getIncomingAndOutcomingCommits(e).then(function(e){return{Outgoing:r.get(e,"Outgoing.length")||0,Incoming:r.get(e,"Incoming.length")||0}}).fail(function(e){t._logAndThrowCustomError(t._i18n.getText("i18n","gitService_errorGetCommitsCountRequestFailed"),e)})},getIncomingAndOutcomingCommits:function(t,n){var r=this,i={};return r.getRemoteBranchOfCurrentLocalBranch(t).then(function(r){if(r){var o=r.Name;return n&&o!==n?{}:e.getCommitsByRange(t,o,"HEAD").then(function(n){return i.Outgoing=n.commits,e.getCommitsByRange(t,"HEAD",o).then(function(e){return i.Incoming=e.commits,i})})}return i}).fail(function(e){r._logAndThrowCustomError(r._i18n.getText("i18n","gitService_errorGetCommitsRequestFailed"),e)})},getLastCommit:function(t){var n=this;return e.doLog(t,1,1).then(function(e){return n._waitForTask(e,t.sWorkspaceId).then(function(e){if(e&&e.commits&&e.commits[0]){var t=e.commits[0];return t.Message=t.message,t}throw new Error(n._i18n.getText("i18n","gitService_errorGetLastCommitRequestFailed"))})}).fail(function(e){n._logAndThrowCustomError(n._i18n.getText("i18n","gitService_errorGetLastCommitRequestFailed"),e)})},getRemoteNameOfBranch:function(t,n){return e.doGetLocalBranches(t).then(function(e){return r.get(r.find(e,{displayName:n}),"name")||""})},getCurrentBranchName:function(e){return r.get(this.getCurrentBranch(e),"Name")||""},cherryPick:function(e,t){},_handleCherryPickResponse:function(e){switch(e.Result){case"CONFLICTING":throw{name:this._i18n.getText("i18n","gitService_cherryPickRequestConflicts"),detailedMessage:this._i18n.getText("i18n","gitService_cherryPickRequestConflictsDetailedMessage"),sType:"Warning"};case"FAILED":throw{name:this._i18n.getText("i18n","gitService_errorCherryPickRequestFailed"),detailedMessage:this._i18n.getText("i18n","gitService_cherryPickRequestFailedStatusDetailedMessage"),sType:"Warning"}}if(!e.HeadUpdated)throw{name:this._i18n.getText("i18n","gitService_successCherryPickRequestHasBeenAlreadyPicked"),detailedMessage:this._i18n.getText("i18n","gitService_successCherryPickRequestNothingChangedInfo"),sType:"Info"}},getCurrentBranch:function(e){return r.find(e,"Current")||{}},checkoutRemoteBranch:function(t,n){var r=this,i=this._getProjectName(t);return this.context.service.log.info("git","Project "+i+": Checkout Remote Branch "+n+" request sent",["user"]).done(),e.checkoutRemoteBranch(t,n).then(function(e){return r.context.service.log.info("git","Project "+i+": Checkout Remote Branch request completed successfully",["user"]).done(),e}).fail(function(e){r._logAndThrowCustomError(r._i18n.getText("i18n","gitService_errorCheckoutRemoteBranchRequestFailed",[n]),e)})},checkoutLocalBranch:function(t,n,r){var i=this,o=this._getProjectName(t);return this.context.service.log.info("git","Project "+o+": Checkout Local Branch "+n+" request sent",["user"]).done(),e.checkoutLocalBranch(t,n,r).then(function(e){return i.context.service.log.info("git","Project "+o+": Checkout Local request completed successfully",["user"]).done(),e}).fail(function(e){i._logAndThrowCustomError(i._i18n.getText("i18n","gitService_errorCheckoutLocalBranchRequestFailed",[n]),e)}).fin(function(){return i.context.event.fireCheckoutBranch(t)})},setNewBranchConfiguration:function(e,t,n){var i=this,o=this._getProjectName(e);return this.context.service.log.info("git","Project "+o+": Set New Branch Configurations "+t+" request sent",["user"]).done(),this.getRepositoryConfigurations(e).then(function(a){var s=r.find(a,{Key:"branch."+n+".merge"});if(s)return i.setRepositoryConfiguration(e,{Key:"branch."+t+".merge",Value:r.get(s,"Value[0]")}).then(function(){return i.context.service.log.info("git","Project "+o+": Set New Branch Configurations "+t+" completed successfully",["user"])})}).fail(function(e){i._logAndThrowCustomError(i._i18n.getText("i18n","gitService_errorSetNewBranchConfigurationFailed"),e)})},createLocalBranch:function(t,n,r){var i=this,o=this._getProjectName(t);return this.context.service.log.info("git","Project "+o+": Create Local Branch "+n+" request sent",["user"]).done(),e.createLocalBranch(t,n,r).then(function(){i.context.service.log.info("git","Project "+o+": Create Local Branch request completed successfully",["user"]).done()}).fail(function(e){i._logAndThrowCustomError(i._i18n.getText("i18n","gitService_errorCreateLocalBranchRequestFailed",[n]),e)})},resetBranch:function(t,n,r){var i=this,o=this._getProjectName(t);return this.context.service.log.info("git","Project "+o+": Reset Index request sent",["user"]).done(),this.getIncomingAndOutcomingCommits(t,r).then(function(a){var s=i._getListOfPathFilesInCommits(a)||{};return e.doResetBranch(t,n,r).then(function(e){return i.context.service.log.info("git","Project "+o+": Reset Index request completed successfully",["user"]).done(),e}).fail(function(e){i._logAndThrowCustomError(i._i18n.getText("i18n","gitService_errorResetBranchRequestFailed"),e)}).fin(function(){return i.context.event.fireResetFinished({oGit:t,aPaths:s})})})},discardFiles:function(t,n){var r=this,i=this._getProjectName(t);return this.context.service.log.info("git","Project "+i+": Revert Files request sent",["user"]).done(),e.doDiscardChanges(t,n).then(function(e){return r.context.service.log.info("git","Project "+i+": Revert Files request completed successfully",["user"]).done(),e}).fail(function(e){r._logAndThrowCustomError(r._i18n.getText("i18n","gitService_errorRevertFilesRequestFailed"),e)}).fin(function(){return r.context.event.fireDiscardFinished({oGit:t,aPaths:n})})},removeLocalBranches:function(t,n,i){var o=this,a=this._getProjectName(i),s=r.reduce(t,function(t,n){return t.then(function(){return e.removeLocalBranch(n,r.get(n,"Name"),i).then(function(){o.context.service.log.info("git","Project "+a+": Remove Local Branch "+r.get(n,"Name")+" request sent",["user"]).done()}).fail(function(e){o._logAndThrowCustomError(o._i18n.getText("i18n","gitService_errorRemoveLocalBranchRequestFailed"),e)})})},Q());return s},mapGetRepositoryConfigurations:function(e){return Q().then(function(){return r.reduce(e,function(e,t,n){return e.push({Value:[t||""],Key:n,Type:"Config"}),e},[])})},getRepositoryConfigurations:function(t){var n=this,i=t.config?Q.resolve(t.config):e.getRepositoryConfigurations(t);return i.then(function(e){return t.config=r.extend(t.config||{},e),e?n.mapGetRepositoryConfigurations(e):{}}).fail(function(e){n._logAndThrowCustomError(n._i18n.getText("i18n","gitService_errorGetUserSettingsRequestFailed"),e)})},setRepositoryConfiguration:function(t,n){var i=this,o=this._getProjectName(t);return r.set(t,"config",void 0),this.context.service.log.info("git","Project "+o+": Set Repository Configurations request sent",["user"]).done(),e.setRepositoryConfiguration(t,n).then(function(){i.context.service.log.info("git","Project "+o+": Set Repository Configuration updated successfully",["user"]).done()}).fail(function(e){i._logAndThrowCustomError(i._i18n.getText("i18n","gitService_errorSetRepositoryConfigurationFailed"),e)})},setGitSettings:function(e,t,n){this.context.service.log.info("git","Settings request sent",["user"]).done();var r=this;return this.context.service.preferences.set({userInfo:{GitMail:e,GitName:t,ShowGerritPane:n}},this._sGitConfigNode).then(function(){r._oStorage.put("gitSettings",{sEmail:e,sName:t,bShowGerritPane:n}),r.context.service.log.info("git","Settings updated successfully",["user"]).done()}).fail(function(e){r._logAndThrowCustomError(r._i18n.getText("i18n","gitService_error_Unable_to_update_Git_settings"),e)})},getGitSettings:function(){var e=this;return Q().then(function(){var t=e._oStorage.get("gitSettings");return r.isEmpty(t)?(t={sEmail:"",sName:"",bShowGerritPane:!1},e.context.service.preferences.get(e._sGitConfigNode).then(function(n){e.context.service.log.info("git","Settings fetched successfully",["user"]).done(),t.sEmail=r.get(n,"userInfo.GitMail")||"",t.sName=r.get(n,"userInfo.GitName")||"",t.bShowGerritPane=r.get(n,"userInfo.ShowGerritPane")||!!sap.watt.getEnv("internal"),e._oStorage.put("gitSettings",t)}).fail(function(t){t.status===i.HTTP_STATUS_NOT_FOUND&&"Not Found"===t.statusText&&e.context.service.log.info("git","Settings fetched successfully",["user"]).done(),e._logAndThrowCustomError(e._i18n.getText("i18n","gitService_errorUnable_to_get_Git_Configuration_Settings"),t)}).fin(function(){return t})):t})},setIgnore:function(e){var t=this,n=e.getParentPath(),i=(e.getName(),t.context.service.filesystem.documentProvider),o=!1;return i.getDocument(n).then(function(t){return t.objectExists(".gitignore").then(function(a){return Q(a?i.getDocument(URI(n+"/.gitignore").toString()).then(function(e){return e.getContent()}):"").then(function(n){var i=[e.isFolder()?e.getProjectRelativePath()+"/":e.getProjectRelativePath()],a=n.split("\r\n").join("\n").split("\n");if(r.forEach(i,function(e){""!==e&&r.indexOf(a,e)===-1&&(n+=(0===n.length?"":"\n")+e,o=!0)}),o){var s=new Blob([n]);return t.importFile(s,!1,!0,".gitignore").then(function(e){return e.save()})}})})}).fail(function(e){t._logAndThrowCustomError(t._i18n.getText("i18n","gitService_errorUnable_to_add_git_ignore"),e)})},isStashSupported:function(e){return!1},initRepository:function(n,r,i){var o=this,a=t.workspace.id,s=this._getProjectName(r);return this.context.service.log.info("git","Project "+s+": Initialize repository request sent",["user"]).done(),o.context.service.filesystem.documentProvider.getDocument(i).then(function(t){return e.doInitRepository(n,r,i,a).then(function(){return o.context.service.log.info("git","Project "+s+": Initialize repository completed successfully",["user"]).done(),t.refresh()})}).fail(function(e){o._logAndThrowCustomError("Unable to get initialize git repositorys",e)})},addRemote:function(t,n,r,i,o,a){return e.doAddRemote(t,n,r,i,o,a)},mergeChangesFromRemoteToHead:function(t,n){return e.doMergeChangesFromRemoteToHead(t,n)},revert:function(e,t){},tag:function(e,t){},_verifyPushResponse:function(e,t){if(e){var n={aSuccessTags:[],aFailedTags:[],oPushedCommit:null,sDetailedMessage:e.commandOutput};if(e.severity&&"Error"===e.severity)throw{name:this._i18n.getText("i18n","gitService_errorPushRequestFailed"),oErrorPushResponse:n,status:"PushFailed",source:"git"};if(e.updates&&e.updates[0]){for(var r=0;r0)throw{name:this._i18n.getText("i18n","gitService_errorPushRequestFailed"),message:this._i18n.getText("i18n","gitService_pushFailedTags",[n.aFailedTags.join()]),status:"PushFailedWithErrorTag"};if(n.aSuccessTags.length>0)return Q();throw{name:this._i18n.getText("i18n","gitService_warnNonewChangesToPush"),message:this._i18n.getText("i18n","gitService_warnNonewChangesToPush"),type:"Warning"}}}}},commitAfterContinue:function(t,n){return e.getChangesUri(t,n)},_mapFetchCommits:function(e){return r.reduce(e,function(e,t){return e.push({Name:r.get(t,"id")||"",Message:r.get(t,"message")||"",AuthorName:r.get(t,"author.name")||"",Time:r.get(t,"commitTime")||""}),e},[])},_getBranchesWithEmptyData:function(e){var t,n,i=this;return this.getLocalBranches(e).then(function(o){var a=r.reduce(o,function(i,o){return t=r.get(o,"Name")||"",n=r.get(o,"RemoteLocation[0].Children[0].Name")||r.get(o,"FullName")||"",t=t+" ("+n+")",i.push({branch:t,changes:[],git:e}),i},[]);return i.context.service.log.info("git","Project "+i._getProjectName(e)+": Fetch request completed",["user"]).done(),a})},_getBranchesData:function(t){var n=this;return this.getRepositoryDetails(t).then(function(t){return e.get(t.BranchLocation).then(function(e){return n._waitForTask(e)})}).fail(function(e){n._logAndThrowCustomError(n._i18n.getText("i18n","gitService_erroGetBranchesDataRequestFailed"),e)})},_getKnownHost:function(t,n,r,i,o,a,s,u,c){var l=this,p=URI(t).host(),f=this._oStorage.get(this._sSSHKnownHostKey+p);return f?Q(f):e.doClone(t,"",r,i,o,a,n,"",u,c).then(function(e){return l._waitForTask(e,u).then(function(e){if(!e)throw new Error("unexpected error");var t=l._createKnownHost(e);return l._oStorage.put(f,t),t})}).fail(function(e){return l._handleKnownHost(e,p)})},_handleKnownHost:function(e,t){var n;if(e&&e.HttpCode===i.HTTP_STATUS_BAD_REQUEST&&e.JsonData?n=e.JsonData:e&&e.responseJSON&&e.responseJSON.HttpCode===i.HTTP_STATUS_BAD_REQUEST&&e.responseJSON.JsonData&&(n=e.responseJSON.JsonData),n&&n.Host&&n.HostKey&&n.KeyType){var r=this._createKnownHost(n);return this._oStorage.put(this._sSSHKnownHostKey+t,r),r}throw e},_createKnownHost:function(e){return r.get(e,"Host","")+" "+r.get(e,"KeyType","")+" "+r.get(e,"HostKey","")},_waitForTask:function(e,t){if(!e)return Q(e);var n=Q.defer();return this._notifyTaskHandled(e,n,t),n.promise},_notifyTaskHandled:function(t,n,r){var i=this;t?setTimeout(function(){return e.getTask(t,r).then(function(e){return"string"==typeof e&&e.indexOf(r)>-1?i._notifyTaskHandled(t,n,r):void n.resolve(e)}).fail(function(e){n.reject(e)})},1e3):n.resolve(t)},_getFormattedLogsResponse:function(e){for(var t,n=[],r={},i=e.length-1;i>=0;i--){var o=e[i];t={Branches:o.Branches,CommitterName:o.CommitterName,CommitterEmail:o.CommitterEmail,AuthorName:o.AuthorName,AuthorEmail:o.AuthorEmail,Time:o.Time,Name:o.Name,Message:o.Message,Diffs:o.Diffs,ParentNames:o.Parents,Tags:o.Tags,Location:o.Location,Children:[],Parents:[]},n[i]=t,r[o.Name]=n[i];for(var a=0;a0&&(l=u),0===u.length&&o&&(l=o.split("\n").splice(1)),s=this._addFileNames(l)}throw{name:e,message:o,detailedMessage:a||o,type:n,source:"git",status:r?r:t.status,files:s,sBranchName:t.sBranchName}},isFeatureSupported:function(e){return n.isFeatureSupported("git",e)},isGerritSupported:function(e){var t=this;return this.getRepositoryConfigurations(e).then(function(e){var t=r.get(r.find(e,r.matchesProperty("Key","gerrit.createchangeid")),"Value");return r.isArray(t)&&(t=r.get(t,"[0]")),t?JSON.parse(t):!!t}).fail(function(e){t._logAndThrowCustomError(t._i18n.getText("i18n","gitService_errorUnable_to_get_IsGerrit_Configuration"),e)})},getDestinationNameByGitUrl:function(e){var t=this,n=URI(e).hostname(),r="git_host_",i="";return t.context.service.destination.getDestinations("git_on_premise").then(function(e){if(e&&e.length>0)for(var t in e)if(e[t].additionalData)for(var o in e[t].additionalData)if(0===e[t].additionalData[o].indexOf(r)){var a=e[t].additionalData[o].substring(r.length);if(a===n){i=e[t].name;break}}return i})},_getListOfPathFilesInCommits:function(e){var t=[],n=function(e){if(e)for(var n=0;n0;){if(r._maxAttempts--,n&&e&&e.taskId&&n.responseText&&n.responseText.toLowerCase().indexOf("internal server error")>-1)return r._notifyTaskHandled(e,t,n);break}r._logOffsetLines=0,r._fireBuildProgress(n),t.reject(n)})},2e3)},_internalTaskLog:function(e){var t=this;return t._oBuildDao.getTaskLog(e,t._logOffsetLines).then(function(e){if(""!==e.toString()){var n=e.toString()+"\n";t._logOffsetLines+=n.match(t._newLineRegex).length,t.context.service.log.info("DIBuild",e.toString(),["user"]).done()}return e})}}}),define("sap.watt.ideplatform.che.chebackend/service/HANAInfoStorageService",{_oHanaVersion:null,setHANAVersion:function(e){this._oHanaVersion=e},getHANAVersion:function(){var e=this;return this._oHanaVersion?Q(e._oHanaVersion):this.context.service.chebackend.XS2ServicesDAO.getInstalledHANAVersion().then(function(t){return e._oHanaVersion=t,e._oHanaVersion})},resetHANAVersion:function(){this._oHanaVersion=null},getHDIPluginVersionByTheInstalledHANAVersion:function(){var e=this,t=/^\d+(\.\d+)*$/;return this.getHANAVersion().then(function(n){if(n){if(t.test(n)){var r=n.split(".");return r[0].startsWith("2")?e._removeLeadingZerosFromHANAVersionToGetHANA2HdiPluginVersion(r):"12.1.0"}throw new Error(e.context.i18n.getText("i18n","HANAInfoStorageService_HANAVersionInvalid"))}throw new Error(e.context.i18n.getText("i18n","HANAInfoStorageService_RetrieveHANAVersionFailure"))})},_removeLeadingZerosFromHANAVersionToGetHANA2HdiPluginVersion:function(e){var t=e[0],n="";for(i=1;i1&&(e.href=window.location.origin+t._io.resolveServerUrl(n))}})}return e}};return t}),define("sap.watt.ideplatform.che.chebackend/service/Run",["../dao/Run","../util/PathMapping","../io/Request"],function(e,t,n){"use strict";jQuery.sap.require("sap.ui.core.format.DateFormat");var r,i,o=sap.ui.core.format.DateFormat.getDateTimeInstance({pattern:"M/d/yy h:mm:ss.SSS a",UTC:!0});return{_mWorkspace:t.workspace,_cWebUrl:"web url",_cLogUrl:"view logs",init:function(){r={},i={}},run:function(t,n){var r=this,i=this._mWorkspace.id,o=t.getEntity().getFullPath();return this.context.service.log.info(o,r.context.i18n.getText("i18n","cherun_starting"),["run"]).done(),e.doRun(i,o,n).then(function(e){return r._adjustLogSubscriptions(e)}).then(function(e){return e&&r._fireRunProgress(e),r._waitForRunStatus(e).then(function(e){return e})}).fail(function(e){return r._handleRunFailure(e,o)})},refresh:function(t,n){var r=this,i=this._mWorkspace.id,o=t.getEntity().getFullPath();return this.context.service.log.info(o,r.context.i18n.getText("i18n","cherefresh_started"),["run"]).done(),e.doRefresh(i,o,n).then(function(e){return r._adjustLogSubscriptions(e)}).then(function(e){return e&&(r._logInitialStatus(e),r._fireRunProgress(e)),r._waitForRunStatus(e).then(function(e){return e})}).fail(function(e){return r._handleRunFailure(e,o)})},stop:function(n,r){var i=this,o=t.workspace.id;return this._cancelStatusLoop(n),this.context.service.log.info(r,i.context.i18n.getText("i18n","cherun_stopping"),["run"]).done(),i._fireRunProgress({project:r,processId:n,status:"STOPPING"}),e.doStop(o,n).then(function(e){return e?(e.project=r,i.context.service.log.info(e.project,i.context.i18n.getText("i18n","cherun_stopped"),["run"]).done(),i._fireRunProgress(e),i._adjustLogSubscriptions(e).then(function(){return Q(e)})):Q(e)})},getAllProcesses:function(){var n=t.workspace.id;return e.getAllProcesses(n).then(function(e){return Q(e)})},getServiceMetadata:function(n,r){var i=t.workspace.id;return e.getServiceMetadata(i,n,r).then(function(e){return Q(e)})},getProcesses:function(e){var t=e.getEntity().getFullPath();return this._getProcessesByProject(t)},_getProcessesByProject:function(t){var n=this,r=this._mWorkspace.id;return e.getProcesses(r,t).then(function(e){return e&&0!=e.length?(e.sort(function(e,t){return t.processId-e.processId}),Q.all(e.map(function(e){return n._adjustLogSubscriptions(e)})).then(function(){return e})):e}).fail(function(e){return n._handleRunFailure(e,t)})},_handleRunFailure:function(e,t){if(e.project=t,e&&e.responseJSON&&e.responseJSON.message){e.status="FAILED";var n=this._rewriteInlineURLs(e.responseJSON.message),r=n[0],i=n[1];i?(this._addUrlAsLink(i,this._cLogUrl,e),this.context.service.log.error(t,this.context.i18n.getText("i18n","cherun_failed_link"),["run"]).done()):this.context.service.log.error(t,r,["run"]).done()}else e&&e.message&&(e.status="FAILED",this.context.service.log.error(t,e.message,["run"]).done());return e.links||this.context.service.log.error(t,this.context.i18n.getText("i18n","cherun_failed"),["run"]).done(),this._fireRunProgress(e),Q.reject(e)},_addUrlAsLink:function(e,t,n){n.links=n.links||[];var r=n.links.find(function(e){return e.rel===t});r||(r={rel:t},n.links.push(r)),r.href=e},_rewriteInlineURLs:function(e){var t,r=/(http|ftp|https):\/\/([\w_-]+(?:(?:[\.\w_-]+)+))(:\d+)?([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?/;if(null!==(t=r.exec(e))&&t.length>0&&t[0].indexOf("log")!==-1){if("xs2"===sap.watt.getEnv("server_type")){var i=t[0],o=URI.parse(i),a=window.location.origin+n.resolveServerUrl(o.path),s=e.replace(i,a);return[s,a]}return[e,t[0]]}return[e,null]},_fireRunProgress:function(e){if(e){var t={sProcessId:e.processId,sStatus:e.status,sProject:e.project,aLinks:e.links};this.context.event.fireRunProgress(t)}},_logInitialStatus:function(e){switch(e.status){case"NEW":this.context.service.log.info(e.project,this.context.i18n.getText("i18n","cherun_starting"),["run"]).done();break;case"RUNNING":this.context.service.log.info(e.project,this.context.i18n.getText("i18n","cherun_running",[e.project]),["run"]).done();break;case"FAILED":this.context.service.log.error(e.project,this.context.i18n.getText("i18n","cherun_failed"),["run"]).done();break;case"STOPPED":this.context.service.log.info(e.project,this.context.i18n.getText("i18n","cherun_stopped"),["run"]).done();break;case"CANCELLED":this.context.service.log.info(e.project,this.context.i18n.getText("i18n","cherun_cancelled"),["run"]).done()}},_waitForRunStatus:function(e){if(!e)return Q(e);var t=Q.defer();return this._notifyRunStatusHandled(e,t,!0),t.promise},_notifyRunStatusHandled:function(t,n,r){var o=this;i[t.processId]=setTimeout(function(){e.getStatus(t).then(function(e){e.project=e.project||t.project,"NEW"===e.status?(r&&e.status!==t.status&&(o.context.service.log.info(t.project,o.context.i18n.getText("i18n","cherun_starting"),["run"]).done(),o._fireRunProgress(e)),o._notifyRunStatusHandled(e,n,!1)):"RUNNING"===e.status?(o.context.service.log.info(t.project,o.context.i18n.getText("i18n","cherun_running"),["run"]).done(),o._fireRunProgress(e),n.resolve(e)):"STOPPED"===e.status||"FAILED"===e.status?(e.status="FAILED",o._fireRunProgress(e),n.reject(e)):"CANCELLED"===e.status?(o.context.service.log.info(t.project,o.context.i18n.getText("i18n","cherun_cancelled"),["run"]).done(),o._fireRunProgress(e),n.reject(e)):n.resolve(e)}).fail(function(e){n.reject(e)}).done()},2e3)},_cancelStatusLoop:function(e){i[e]&&(clearTimeout(i[e]),delete i[e])},_createChannelMessageHandler:function(e){return function(t,n,i){var a=this.getName(),s=a.split(":")[2],u=r[s],c=u?u.project:void 0;if(n)return void e.context.service.log.error(c,n,["system"]).done();if(t.type&&t.source&&u){var l="";if(t.timestamp){var p=o.format(new Date(t.timestamp));l=p}l+=" ["+t.source+"]",l+=" "+e.formatMessageType(t.type),l+=" "+t.line,"STDERR"===t.type?e.context.service.log.error(c,l,["run"]).done():e.context.service.log.info(c,l,["run"]).done()}}},formatMessageType:function(e){switch(e){case"STDOUT":return"OUT";case"STDERR":return"ERR";default:return e}},_subscribeChannel:function(e){sap.watt.getEnv("server_type")&&"xs2"!==sap.watt.getEnv("server_type")||e.subscribe()},_adjustLogSubscriptions:function(e){var t=this,n=e.processId,i=e.project,o=n;if(o&&i){var a=r[o];if(a){if("RUNNING"!==e.status&&"NEW"!==e.status){var s=a.channel;return delete r[o],s.unsubscribe().then(function(){return Q(e)})}}else if("RUNNING"===e.status||"NEW"===e.status)return this.context.service.messageBus.newChannel("runner:output:"+o,t._createChannelMessageHandler(t)).then(function(n){return Q.all([n,t._subscribeChannel(n)]).spread(function(t){return r[o]={project:i,channel:t},Q(e)})})}return Q(e)},onMessageBusConnectionClosed:function(e){var t=this,n=[],i=r;r={},Q.allSettled(Object.keys(i).map(function(e){var t=i[e];if(n.indexOf(t.project)<0&&n.push(t.project),t){var r=t.channel;if(r)return r.unsubscribe()}return Q()})).then(function(){return Q.allSettled(n.map(function(e){return t._getProcessesByProject(e)}))}).done()}}}),define("sap.watt.ideplatform.che.chebackend/dao/LSPDAO",["../io/Request"],function(e){"use strict";var t={_io:e,startLSP:function(e,t){var n="/lsp/start?workspaceId="+e+"&supportedLanguages="+t.join(",");return this._io.send(n,"POST")},getStatus:function(e){var t="/lsp/getStatus?workspaceId="+e;return this._io.send(t,"GET",{dataType:"json"})}};return t}),define("sap.watt.ideplatform.che.chebackend/service/LSP",["../dao/LSPDAO","../util/PathMapping"],function(e,t){"use strict";return{_mWorkspace:t.workspace,_interval:3e3,_maxCount:60,startLSP:function(t){var n=this;return e.startLSP(this._mWorkspace.id,t).then(function(){return n.waitForReadyStatus()}).fail(function(e){return Q.reject(e)})},getStatus:function(){return e.getStatus(this._mWorkspace.id)},waitForReadyStatus:function(){var e=this,t=Q.defer(),n=0,r=setInterval(function(){e.getStatus().then(function(i){"READY"===i.status?(clearInterval(r),t.resolve(i)):"ERROR"===i.status?(clearInterval(r),t.reject("ERROR")):++n===e._maxCount&&(clearInterval(r),t.reject("TIMEOUT"))}).fail(function(e){t.reject(e)}).done()},e._interval);return t.promise}}}),define("sap.watt.ideplatform.che.chebackend/dao/CFAdminDAO",["../io/Request"],function(e){"use strict";var t={getLandscapeOrganizationsAndSpaces:function(t,n,r){var i=n&&r?jQuery.extend(!0,{},{headers:{"cf-authenticate":"Basic "+btoa(n+":"+r)}}):{};return e.send("/cf-ops/orgs-spaces?landscape="+t,"GET",i,{})}};return t}),define("sap.watt.ideplatform.che.chebackend/../../../../ui/control/LoginDlgHelper",["sap/watt/lib/lodash/lodash"],function(e){"use strict";var t={openDlg:function(t,n,r,i,o){function a(e){e?u.resolve({user:c.getProperty("/user"),password:c.getProperty("/password")}):u.reject(new Error("canceled")),s.close()}var s,u=Q.defer(),c=new sap.ui.model.json.JSONModel({user:"",password:""}),l=new sap.m.Button({text:o,press:a.bind(null,!1)}),p=new sap.m.Button({type:sap.m.ButtonType.Emphasized,text:i,press:a.bind(null,!0),enabled:{parts:[{path:"/user"},{path:"/password"}],formatter:function(t,n){return!e.isEmpty(t)&&!e.isEmpty(n)}}}),f=new sap.ui.layout.form.SimpleForm({width:"100%",layout:sap.ui.layout.form.SimpleFormLayout.ResponsiveGridLayout,labelSpanS:12,labelSpanM:12,labelSpanL:12,content:[new sap.m.Label({text:n}),new sap.m.Input({value:"{/user}",liveChange:function(t){c.setProperty("/user",e.get(t,"mParameters.newValue"))}}),new sap.m.Label({text:r}),new sap.m.Input({type:sap.m.InputType.Password,liveChange:function(t){c.setProperty("/password",e.get(t,"mParameters.newValue"))},submit:function(e){p.firePress()},value:"{/password}"})]});return s=new sap.m.Dialog({contentWidth:"480px",title:t,resizable:!1,modal:!0,draggable:!0,autoClose:!0,content:f,buttons:[p,l],defaultButton:p}),s.addStyleClass("sapUiSizeCompact"),s.setModel(c),s.open(),u.promise}};return t}),define("sap.watt.ideplatform.che.chebackend/service/CFAdmin",["../dao/CFAdminDAO","sap/watt/lib/lodash/lodash","../../../../../ui/control/LoginDlgHelper"],function(e,t,n){"use strict";return{getLandscapeOrganizationsAndSpaces:function(r,i){var o=this;return e.getLandscapeOrganizationsAndSpaces(r,t.get(i,"user"),t.get(i,"password")).then(function(e){return e}).catch(function(e){if(401===e.status){var t=o.context.i18n.getText("dlg_cf_login_title"),i=o.context.i18n.getText("dlg_cf_login_user_placeholder"),a=o.context.i18n.getText("dlg_cf_login_password_placeholder"),s=o.context.i18n.getText("dlg_cf_login_btn_log_on"),u=o.context.i18n.getText("dlg_cf_login_btn_ok_cancel");return n.openDlg(t,i,a,s,u).then(function(e){return o.getLandscapeOrganizationsAndSpaces(r,e)})}throw e})},getCFAvaialbleEndPoints:function(e){var t=[],n=e?e:window.document.URL.toLowerCase(),r=/dispatcher(\.\w+\.|\.\w?)hana.ondemand.com/,i=r.exec(n);return n.indexOf("int.sap.hana.ondemand.com")!==-1?t=[{name:"https://api.cf.sap.hana.ondemand.com/",key:"https://api.cf.sap.hana.ondemand.com/"}]:n.indexOf("hanatrial.ondemand.com")!==-1?t=[{name:"https://api.cf.sap.hana.ondemand.com/",key:"https://api.cf.sap.hana.ondemand.com/"},{name:"https://api.cf.eu10.hana.ondemand.com/",key:"https://api.cf.eu10.hana.ondemand.com/"},{name:"https://api.cf.us10.hana.ondemand.com/", key:"https://api.cf.us10.hana.ondemand.com/"},{name:"https://api.cf.us20.hana.ondemand.com/",key:"https://api.cf.us20.hana.ondemand.com/"}]:i&&i[0]&&(t=[{name:"https://api.cf.eu10.hana.ondemand.com/",key:"https://api.cf.eu10.hana.ondemand.com/"},{name:"https://api.cf.us10.hana.ondemand.com/",key:"https://api.cf.us10.hana.ondemand.com/"},{name:"https://api.cf.us20.hana.ondemand.com/",key:"https://api.cf.us20.hana.ondemand.com/"}]),t}}}),define("sap.watt.ideplatform.che.chebackend/service/CodeValidation",["sap/watt/lib/lodash/lodash","../dao/Build","../util/PathMapping"],function(e,t,n){"use strict";function r(e,t,n){return{result:e,integrity:{status:t,info:n}}}var i="projectsSpace",o={OK:0,ERROR:1,PARTIAL_ERROR:2},a="server_type",s="xs2",u="hcproxy",c="ws_server",l="di";return{_sContentValidationBuilderID:"content-validation-builder",_mWorkspace:n.workspace,_mProjectsIds:{},getProjectModulesNames:function(t){var n=[];return this.context.service.chebackend.Mta.getProjectModules(t).then(function(t){return e(t).forEach(function(e){n.push(e.path)}),n})},codeValidationResponseStatus:function(){return e.clone(o)},_isMtaProject:function(e){var t=e.getProjectMetadata();return t&&"mta"===t.type},_getHdbMoudle:function(e){var t;return e.getFolderContent().then(function(e){for(var n=0;n0)for(var i=0;i0)for(var i=0;i0){for(var r=!1,i=0;i",t=t||"";var n=this,r=n.context.i18n.getText("i18n","report_operation_started",t);return Q.all([n.context.service.usernotification.liteInfo(r),n.context.service.log.info(e,r,["user"])])},endOperationWithSuccess:function(e,t){e=e||"",t=t||"";var n=this,r=n.context.i18n.getText("i18n","report_operation_ended_with_success",t);return Q.all([n.context.service.usernotification.liteInfo(r),n.context.service.log.info(e,r,["user"])])},endOperationWithFailure:function(e,t,n){e=e||"",t=t||"";var r=this,i=r.context.i18n.getText("i18n","report_operation_ended_with_failure_refer_to_log",t);return Q.all([r.context.service.usernotification.alert(i),r._printErrorLog(e,t,n)])},_printErrorLog:function(e,t,n){var r=this,i="------------------------------------------------------------------";return r.context.service.log.info(e,i,["user"]).then(function(){var n=r.context.i18n.getText("i18n","report_operation_start_of_log",t);return r.context.service.log.info(e,n,["user"])}).then(function(){return r.context.service.log.error(e,n,["user"])}).then(function(){var n=r.context.i18n.getText("i18n","report_operation_end_of_log",t);return r.context.service.log.info(e,n,["user"])}).then(function(){return r.context.service.log.info(e,i,["user"])}).then(function(){var n=r.context.i18n.getText("i18n","report_operation_ended_with_failure",t);return r.context.service.log.info(e,n,["user"])})}}}),define("sap.watt.ideplatform.che.cherunconsoleprovider/service/CheRunConsoleProvider",["sap/watt/lib/lodash/lodash"],function(e){"use strict";var t=function(e,t){return e.getProject(!0).then(function(e){return t.chebackend.Mta.getProjectModules(e.getEntity().getFullPath())}).then(function(e){for(var n=[],r=0;r0))return Q({option:"run",oProcess:void 0,isSkipBuild:!1});switch(n=t[0].status){case"NEW":return Q({option:"quit",oProcess:void 0});case"RUNNING":return r._getChangedFileName(e,t[0]).then(function(e){switch(e){case"mta.yaml":case"xs-security.json":case"package.json":return{option:"restart",oProcess:t[0],isSkipBuild:!1};case"xs-app.json":return{option:"restartChildProcess",oProcess:t[0],isSkipBuild:!0};default:return{option:"softReset",oProcess:t[0],isSkipBuild:!0}}});case"FAILED":return Q({option:"stop&run",oProcess:t[0],isSkipBuild:!1});case"CANCELLED":return Q({option:"run",oProcess:void 0,isSkipBuild:!1});default:return Q({option:"run",oProcess:void 0,isSkipBuild:!1})}},_getReqBody:function(e,t,n,r,i){var o=this,a={environmentId:"system:/sapui5/default",skipBuild:r},s={};return e&&t?("restart"!==t&&"softReset"!==t&&"restartChildProcess"!==t||(s={processId:e.processId,runOption:t}),n&&(s["X-Frame-Options"]="ALLOW-FROM "+window.location.origin),a.options=s):e||"run"!==t||(n&&(s["X-Frame-Options"]="ALLOW-FROM "+window.location.origin),a.options=s),r?Q(a):this._getSpaceGuid(i).then(function(e){return o._appendSpaceToBodyReq(a,e)})},_appendSpaceToBodyReq:function(e,t){return e.buildOptions?e.buildOptions.options?e.buildOptions.options.space=t:e.buildOptions.options={space:t}:e.buildOptions={options:{space:t}},e},_getSpaceGuid:function(e){var t=this,n=function(){var e=t.context.i18n.getText("i18n","noSpace_error_msg");throw t.context.service.log.error(t._sProjectId,e,["run"]),new Error(e)};return e||n(),this.context.service.chebackend.WorkspaceSettings.getWorkspaceAttribute("projectsSpace").then(function(t){if(t&&e){var r=e.getEntity().getParentPath();if(r){var i=r.split("/")[1],o=JSON.parse(t)[i];if(o){var a=o.guid;if(a)return a}}}n()})},_getChangedFileName:function(e,t){var n=this;return Q.spread([n._isMTArootFileUpdated(e,t,"mta.yaml"),n._isMTArootFileUpdated(e,t,"xs-security.json")],function(r,i){return r?"mta.yaml":i?"xs-security.json":n._getJsonChangedFileName(e,t)})},_getJsonChangedFileName:function(e,t){return e.getCurrentMetadata(!0).then(function(e){if(e&&e.length>0){for(var n=!1,r=0;rt.startTime){if("package.json"===i.name)return"package.json";"xs-app.json"===i.name&&(n=!0)}}return n?"xs-app.json":""}return""})},_isMTArootFileUpdated:function(e,t,n){var r=this.context.service.filesystem.documentProvider,i=e.getEntity().getFullPath(),o=i.split("/"),a=o[1],s="/"+a+"/"+n;return r.getDocument(s).then(function(e){if(e){var n=e.getEntity().oMetadata.changedOn,r=t.startTime;return n>r}return!1})}}}),define("sap.watt.common.buildregistry/service/BuildRegistry",[],function(){"use strict";return{_oBuildService:null,configure:function(e){e.setBuild.forEach(function(e){this._oBuildService=e.service},this),this._oBuildService&&this._oBuildService.attachEvent("buildProgress",this._fireBuildProgress,this)},_fireBuildProgress:function(e){this.context.event.fireBuildProgress.apply(this,e.params)},build:function(e,t){return this._oBuildService?this._oBuildService.build(e,t):void this.context.service.log.error("BuildProvider","No build services are registered",["user"]).done()},setupBuild:function(e){}}}),jQuery.sap.declare("sap.watt.ideplatform.plugin.template.ui.wizard.ProgressIndicator"),sap.ui.core.Control.extend("sap.watt.ideplatform.plugin.template.ui.wizard.ProgressIndicator",{_bAnimating:!1,_bError:!1,startAnimation:function(){this._bAnimating=!0,$("#"+this.sId+"progressBarInner1").show().addClass("animate"),$("#"+this.sId+"progressBarInner2").show().addClass("animate2")},stopAnimation:function(){this._bAnimating=!1,$("#"+this.sId+"progressBarInner1").hide().removeClass("animate"),$("#"+this.sId+"progressBarInner2").hide().removeClass("animate2")},changeStyleClass:function(e){this.addStyleClass("spacer05 errorlineTop"),this.removeStyleClass("spacer05 lineTop")},setErrorStatus:function(e){this._bError=e;var t=document.getElementById(this.getId()+"progressBarInner1");t&&(t.parentElement.className=e?"spacer05 errorlineTop":"spacer05 lineTop")},renderer:function(e,t){t._bError?e.write('
'):e.write('
'),e.write('"),e.write('"),e.write("
")},onAfterRendering:function(){this._bAnimating?this.startAnimation():this.stopAnimation()}}),define("sap/watt/ideplatform/plugin/template/ui/wizard/ProgressIndicator",function(){}),jQuery.sap.declare("sap.watt.platform.featuremanager.ui.DependenciesLayout"),sap.ui.core.Control.extend("sap.watt.platform.featuremanager.ui.DependenciesLayout",{metadata:{aggregations:{dependencyIcon:{type:"sap.m.Image",multiple:!1},dependencyIconName:{type:"sap.m.Text",multiple:!1},dependencyIconOverview:{type:"sap.ui.core.Icon",multiple:!1}},properties:{additionalCss:"string"}},onBeforeRendering:function(){},renderer:function(e,t){var n=t.getBindingContext().getObject(),r=n?n.index:0;r%=5,e.write(""),e.write(""),e.write(""),e.renderControl(t.getDependencyIcon()),e.renderControl(t.getDependencyIconName()),e.renderControl(t.getDependencyIconOverview()),e.write("
"),e.write(""),e.write("")}}),define("sap.watt.platform.featuremanager/ui/DependenciesLayout",function(){}),jQuery.sap.declare("sap.watt.platform.featuremanager.ui.FeatureLayout"),sap.ui.core.Control.extend("sap.watt.platform.featuremanager.ui.FeatureLayout",{metadata:{aggregations:{ featureIcon:{type:"sap.m.Image",multiple:!1},featureIconName:{type:"sap.m.Text",multiple:!1},featureMessageIcon:{type:"sap.ui.core.Icon",multiple:!1},featureIconVersion:{type:"sap.m.Text",multiple:!1},featureDetailName:{type:"sap.m.Text",multiple:!1},featureDetailDescription:{type:"sap.m.Text",multiple:!1},featureDetailDocumentaion:{type:"sap.m.Link",multiple:!1},featureDetailEnable:{type:"sap.m.Switch",multiple:!1},featureAuthorName:{type:"sap.m.Text",multiple:!1},featureAuthorIcon:{type:"sap.m.Image",multiple:!1},featureDependencies:{type:"sap.m.FlexBox",multiple:!1},featureDependenciesTitle:{type:"sap.m.Text",multiple:!1},dependencyIconClick:{type:"sap.ui.core.Icon",multiple:!1}}},onBeforeRendering:function(){},renderer:function(e,t){var n=t.getBindingContext().getObject(),r=n?n.index:0;r%=5,e.write(""),e.write("");var i="";if(n.hasNested){var o="featureImageColorNestedDiv"+r,a="featureImageSecondNestedDiv "+o;e.write(""),e.write(""),i="featureImageMainNestedDiv"}else i="featureImageMainDiv";i+=" featureImageColorDiv"+r,e.write(""),""!==t.getFeatureIcon().getSrc()?(n.hasNested&&t.getFeatureIcon().addStyleClass("featureNestedIcon"),e.renderControl(t.getFeatureIcon()),e.renderControl(t.getFeatureIconVersion())):(n.hasNested&&t.getFeatureIconName().addStyleClass("featuretileTextNestedDiv"),e.renderControl(t.getFeatureIconName()),e.renderControl(t.getFeatureIconVersion())),e.write(""),e.write(""),t.getFeatureAuthorIcon().getVisible()?(e.write(""),e.renderControl(t.getFeatureAuthorIcon()),e.write("")):t.getFeatureAuthorName().addStyleClass("featureAuthorNameNoIconDiv"),e.renderControl(t.getFeatureAuthorName()),e.write(""),e.renderControl(t.getFeatureDetailName()),e.write(""),e.renderControl(t.getFeatureDetailEnable()),e.write(""),e.write(""),e.renderControl(t.getFeatureMessageIcon()),e.write(""),t.getFeatureDetailDocumentaion().getProperty("href")&&e.renderControl(t.getFeatureDetailDocumentaion()),e.renderControl(t.getFeatureDetailDescription()),e.renderControl(t.getFeatureDependenciesTitle()),e.renderControl(t.getFeatureDependencies()),e.renderControl(t.getDependencyIconClick()),e.write(""),e.write("")}}),define("sap.watt.platform.featuremanager/ui/FeatureLayout",function(){}),define("sap.watt.platform.featuremanager/service/FeatureManagement",["sap/watt/lib/lodash/lodash","sap/watt/ideplatform/plugin/template/ui/wizard/ProgressIndicator","../ui/DependenciesLayout","../ui/FeatureLayout"],function(e){var t=sap.m.MessagePopover.extend("core.feature.FeatureMessagePopover",{_setDescription:function(e){var t=e.getLink();this._oLastSelectedItem=e,e.getMarkupDescription()?this._oMessageDescriptionText=new sap.ui.core.HTML(this.getId()+"MarkupDescription",{content:"
"+e.getDescription()+"
",sanitizeContent:!0}):(this._oMessageDescriptionText=new sap.m.Text(this.getId()+"MessageDescriptionText",{text:e.getDescription()}).addStyleClass("sapMMsgPopoverDescriptionText"),this._oMessageDescriptionText.setText(e.getDescription())),this._detailsPage.addContent(this._oMessageDescriptionText),t&&(this._detailsPage.addContent(t),t.addStyleClass("sapMMsgPopoverDescriptionLink"))}}),n="userEnabledFeatures",r=5,i=5,o=49,a={_oFeaturesGrid:void 0,_oNoteTextView:void 0,_oMessageStrip:void 0,_oProgressIndicator:void 0,_bIsSavedButNotLoaded:void 0,_enabledFeatures:void 0,_disabledFeatures:void 0,_aChangedFeatures:[],_oMessagePopover:void 0,_oDependenciesPopover:void 0,_bDisableChangingFeatureStatus:!1,_sOptionalFeaturesLoadMode:void 0,init:function(){this._bIsSavedButNotLoaded=!1},configure:function(e){return e.preferenceService&&(this._oPreferencePersistencyService=e.preferenceService.service),this.context.service.resource.includeStyles(e.styles)},_createFeatureGrid:function(){var e=new sap.ui.layout.Grid("feature--FeatureManagerGrid",{layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0})}).addStyleClass("featureManagement");return this._createFeaturesGrid(),this._createMessagePopover(),this._createDependenciesPopoverControl(),this.addi18nBundleToGrid(e),e.addContent(this._oMessageStrip),e.addContent(this._createSearchGrid()),e},_createMessagePopover:function(){var e=new sap.m.MessagePopoverItem({type:"{type}",title:"{title}",description:"{description}"});this._oMessagePopover=new t({items:{path:"/",template:e}});var n=new sap.ui.model.json.JSONModel;this._oMessagePopover.setModel(n)},_createDependenciesPopoverControl:function(){var e=this,t=new sap.m.List({});t.bindItems({path:"/webideDependencies",template:new sap.m.CustomListItem({content:[new sap.m.HBox({items:[e._createDependencyTemplate("featureDependenciesListItemIconDiv"),new sap.m.Text({text:{parts:["title","name"],formatter:function(e,t){return e||t}},maxLines:1}).addStyleClass("featureDependenciesPopoverTitleDiv")]})]})}),this._oDependenciesPopover=new sap.m.Popover({title:e.context.i18n.getText("i18n","featureManagement_dependencies_title"),content:t,showHeader:!1,contentWidth:"20rem",contentMinWidth:"20rem",placement:"Left",horizontalScrolling:!1}).addStyleClass("featureManagement");var n=new sap.ui.model.json.JSONModel;this._oDependenciesPopover.setModel(n)},_createDependencyTemplate:function(e){var t=this,n=new sap.watt.platform.featuremanager.ui.DependenciesLayout({dependencyIcon:new sap.m.Image({backgroundSize:"contain",src:{parts:["icon"],formatter:function(e){return e?require.toUrl(e):""}},visible:{parts:["icon","overflow"],formatter:function(e,t){return!t&&!!e}},press:function(e){t._openDependenciesPopover(e)}}).addStyleClass("featureDependencyIcon"),dependencyIconName:new sap.m.Text({text:{parts:["title","name"],formatter:function(e,n){return t._getInitials(e||n,r)}},visible:{parts:["icon"],formatter:function(e){return!e}},wrapping:!0,textAlign:sap.ui.core.TextAlign.Center,enabled:!1}).addStyleClass("featureDependencyTileText"),dependencyIconOverview:new sap.ui.core.Icon({size:"1.5rem",hoverColor:"transparent",decorative:!1,hoverBackgroundColor:"transparent",src:"sap-icon://overflow",color:"#007cc0",visible:{parts:["overflow"],formatter:function(e){return!!e}},press:function(e){t._openDependenciesPopover(e)}}).addStyleClass("overviewDependenciesIcon"),additionalCss:e});return n},_createFeaturesGrid:function(){function e(){var e=new sap.watt.platform.featuremanager.ui.FeatureLayout({featureIcon:new sap.m.Image({backgroundSize:"contain",src:{parts:["icon"],formatter:function(e){return e?require.toUrl(e):""}},visible:{path:"icon",formatter:function(e){return!!e}}}).addStyleClass("featureIcon"),featureIconName:new sap.m.Text({text:{parts:["title","name"],formatter:function(e,n){return t._getInitials(e||n)}},wrapping:!0,textAlign:sap.ui.core.TextAlign.Center,enabled:!1}).addStyleClass("featuretileTextDiv"),featureIconVersion:new sap.m.Text({text:{path:"version",formatter:function(e){return e?"V "+e:""}},wrapping:!0,enabled:!1}).addStyleClass("featureTileVersionDiv"),featureDetailName:new sap.m.Text({text:{parts:["name","title"],formatter:function(e,t){return t?t:e}},maxLines:2,wrapping:!0,enabled:!1}).addStyleClass("featureTileTitleDiv"),featureDetailDescription:new sap.m.Text({text:"{description}",wrapping:!0,enabled:!1,maxLines:4}).addStyleClass("featureTileDescDiv"),featureDetailDocumentaion:new sap.m.Link({text:"{i18n>featureManagement_moreInformation}",href:"{homepage}",target:"_blank"}).addStyleClass("featureTileLinkDiv featureSecondColumnDiv"),featureDetailEnable:new sap.m.Switch({state:"{checked}",change:function(e){t._onToggleButtonChange(e)},enabled:{path:"checked",formatter:function(){return!t._bDisableChangingFeatureStatus}}}).addStyleClass("featureCheckedDiv WebSwitch featureToggleBtn"),featureAuthorName:new sap.m.Text({text:{path:"author",formatter:function(e){if(e)return e.name}},visible:{path:"author",formatter:function(e){return!(!e||!e.name)}},wrapping:!0,enabled:!1}).addStyleClass("featureTileLinkDiv featureAuthorNameDiv"),featureAuthorIcon:new sap.m.Image({src:{path:"author",formatter:function(e){if(e&&e.icon)return require.toUrl(e.icon)}},backgroundSize:"contain",height:"100%",visible:{path:"author",formatter:function(e){return!(!e||!e.icon)}}}).addStyleClass("featureAuthorIcon"),featureMessageIcon:new sap.ui.core.Icon({size:"1.2rem",hoverColor:"white",height:"1.6rem",width:"1.6rem",decorative:!1,hoverBackgroundColor:"#5f95c2",src:{parts:["hasMessage","hasError"],formatter:function(e,t){return e?t?"sap-icon://message-error":"sap-icon://message-information":""}},color:{parts:["hasMessage","hasError"],formatter:function(e,t){return e?t?"red":"#007cc0":"transparent"}},visible:"{hasMessage}",press:function(e){t._openMessagePopover(e)}}),featureDependenciesTitle:new sap.m.Text({text:t.context.i18n.getText("i18n","featureManagement_dependencies_title")+":",visible:{path:"webideDependenciesPresent",formatter:function(e){return!!e&&e.length>0}},wrapping:!0,enabled:!1}).addStyleClass("featureDependenciesTitle"),featureDependencies:new sap.m.FlexBox({height:"2rem",width:"100%",hSpacing:1,alignItems:"Start",justifyContent:"Start",direction:sap.m.FlexDirection.Row,renderType:sap.m.FlexRendertype.Bare,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"}),items:{path:"webideDependenciesPresent",template:t._createDependencyTemplate()}}).addStyleClass("featureFlexBox"),dependencyIconClick:new sap.ui.core.Icon({hoverColor:"transparent",decorative:!1,hoverBackgroundColor:"transparent",press:function(e){t._openDependenciesPopover(e)}}).addStyleClass("featureDependencyIconClick")});return e}var t=this;this._oFeaturesGrid=new sap.ui.layout.Grid("feature--theOptGrid",{layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"}),hSpacing:0}),this._oDataSet=sap.ui.getCore().byId("feature--DataSet"),this._oDataSet&&this._oDataSet.destroy(),this._oDataSet=new sap.ui.ux3.DataSet("feature--DataSet",{width:"100%",layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),showSearchField:!0,showToolbar:!1,items:{path:"features",template:new sap.ui.ux3.DataSetItem({iconSrc:"{image}",title:"{title}"})},views:[new sap.ui.ux3.DataSetSimpleView({name:"Floating, responsive View",floating:!0,template:e()})],busyIndicatorDelay:0}),this._oMessageStrip=new sap.m.MessageStrip("feature--MessageStrip",{text:{path:"features",formatter:function(){var e="sap-ide-features";switch(t._sOptionalFeaturesLoadMode){case"none":return t.context.i18n.getText("i18n","featureManagement_message_readonly_none",[e,t._sOptionalFeaturesLoadMode]);case"all":return t.context.i18n.getText("i18n","featureManagement_message_readonly_all",[e,t._sOptionalFeaturesLoadMode]);case"default":return t.context.i18n.getText("i18n","featureManagement_message_readonly_default",[e,t._sOptionalFeaturesLoadMode]);default:return t.context.i18n.getText("i18n","featureManagement_message_readonly",[e])}}},visible:{parts:["features"],formatter:function(e){return!!(t._bDisableChangingFeatureStatus&&e&&e.length>0)}},type:"Warning",showIcon:!0,showCloseButton:!1,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"})}),this._oNoteTextView=new sap.m.Text("feature--NoteTextView",{text:"",wrapping:!1,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0})}).addStyleClass("alignControlToTheLeft noteView"),this._oFeaturesGrid.addContent(this._oDataSet)},_createSearchGrid:function(){this._oProgressIndicator=new sap.watt.ideplatform.plugin.template.ui.wizard.ProgressIndicator("feature--progressIndicator",{layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"})});var e=this;this.oSearch=new sap.m.SearchField("feature--searchField",{enableSuggestions:!0,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12"}),search:function(t){e._filterDataSet(t.getParameter("suggestionItem"))},suggest:function(t){e._filterDataSet(t.getParameter("suggestValue"))}}).addStyleClass("featureSearch");var t=new sap.ui.layout.Grid("feature--featureSearchGrid",{layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),content:[this.oSearch]}).addStyleClass("featureGrid");return t},_filterDataSet:function(e){this._searchValue=e;var t=this._oDataSet.getBinding("items"),n=new sap.ui.model.Filter("title",sap.ui.model.FilterOperator.Contains,e),r=new sap.ui.model.Filter("name",sap.ui.model.FilterOperator.Contains,e),i=new sap.ui.model.Filter("description",sap.ui.model.FilterOperator.Contains,e),o=new sap.ui.model.Filter("messages",function(t){for(var n=0;n-1)return!0}return!1}),a=[n,o,i];sap.watt.getEnv("debugMode")&&a.push(r),t.filter(e?new sap.ui.model.Filter({filters:a,and:!1}):[])},_onToggleButtonChange:function(t){var n=t.getSource(),r=n.getBindingContext().getObject();if(void 0===r.name)return this.context.service.usernotification.alert(this.context.i18n.getText("i18n","featureManagement_NotValidMsg")).done(),void(n.getPressed()&&n.setPressed(!1));var i=this.context.service.usagemonitoring;i.report("featureManager",r.checked?"OptionalFeaturesChecked":"OptionalFeaturesUnChecked",r.name).done();var o=e.findIndex(this._aChangedFeatures,function(e){return e.name===r.name});o!==-1?this._aChangedFeatures.splice(o,1):this._aChangedFeatures.push({name:r.name,checked:r.checked})},updatePreferences:function(){for(var t=this,r=0;rr?r:n.length,o=0;o0,n.index=s,s++,l.push(t.context.service.featureConfig.isFeatureEnabled(n,!0).then(function(e){n.checked=e,t._analyzeFeatureMessages(n),u.push(n)}))}),Q.all(l).then(function(){return e.forEach(u,function(e){t._buildDependenciesForFeature(e,u,c)}),u=u.sort(function(e,t){return e.webideDependencies&&e.webideDependencies.length>0?-1:t.webideDependencies&&t.webideDependencies.length>0?1:0}),r.addContent(t._oFeaturesGrid),r.addContent(t._oNoteTextView),t._createModel(u).then(function(e){t.oMainGrid.setModel(e),t._oDataSet.setModel(e),t._oDataSet.bindElement("/data"),t._oMessageStrip.setModel(e),t._oMessageStrip.bindElement("/data"),t._oNoteTextView.setModel(e),t._oNoteTextView.bindElement("/data"),e.getData()&&e.getData().data&&0===e.getData().data.features.length&&t._oNoteTextView.setText(t.context.i18n.getText("i18n","featureManagement_NoReposirotiesNote"))})})}})}).fail(function(e){t.context.service.usernotification.alert(e.message).done(),t._handleFailedLoadFeatures(e)}).fin(function(){t._oProgressIndicator.stopAnimation()})},getOptionalFeatureMessages:function(t,n){if(!e.isEmpty(t.optionalBundledFeatures)){var r=t.optionalBundledFeatures[n];if(r)return r.messages}},addi18nBundleToGrid:function(e){this.context.i18n&&this.context.i18n.applyTo(e)},_analyzeFeatureMessages:function(t){if(t.hasMessage=!1,t.hasError=!1,t.messages&&t.messages.length>0){var n=[],r=!0,i=e.filter(t.messages,{severity:"error"});t.hasError=i.length>0,sap.watt.getEnv("debugMode")||(r=i.length>0),r&&e.forEach(t.messages,function(e){var t="",r=e.message,i=e.message.indexOf("\n");i>-1?(t=e.message.substring(0,i),r=e.message.slice(i+1)):t=e.message.length<=o?e.message:e.message.substring(0,o)+"...";var a={type:"error"===e.severity?sap.ui.core.MessageType.Error:sap.ui.core.MessageType.Information,title:t,description:r};n.push(a)}),n.length>0&&(t.hasMessage=!0,t.formatedMessages=n)}},_buildDependenciesForFeature:function(t,n,r){var o=[],a=e.difference(t.webideDependencies,r);if(a&&a.length>0&&!t.hasError){var s=e.filter(n,function(t){return e.indexOf(a,t.name)>-1});e.forEach(s,function(e){o.push({name:e.name,icon:e.icon,title:e.title,index:e.index,overflow:!1})}),t.webideDependencies=o;var u=o;u.length>i&&(u=e.slice(u,0,i),u.push({overflow:!0})),t.webideDependenciesPresent=u}},_openMessagePopover:function(e){var t=this,n=e.getSource(),r=n.getBindingContext().getObject();if(r.formatedMessages){var i=t._oMessagePopover.getModel();i.setProperty("/",[]),i.setProperty("/",r.formatedMessages),t._oMessagePopover.openBy(e.getSource())}},_openDependenciesPopover:function(e){var t=this,n=e.getSource(),r=n.getBindingContext().getObject();if(!r.hasError&&r.webideDependencies&&r.webideDependencies.length>0){var i=t._oDependenciesPopover.getModel();i.setProperty("/webideDependencies",r.webideDependencies),t._oDependenciesPopover.openBy(e.getSource())}}};return a}),define("sap.watt.platform.featuremanager/service/OptionalFeatures",["sap/watt/platform/plugin/platform/service/ui/AbstractConfig"],function(e){"use strict";return e.extend("sap.watt.platform.plugin.featuremanager.service.OptionalFeatures",{_oTextView:null,getUserPreferenceContent:function(){var e=this;return this._oUI?this._oUI:this.context.service.featuremanagement.getFeaturesUI().then(function(t){return e._oUI=t,t})},saveUserPreference:function(){var e=this;return this.context.service.featuremanagement.updatePreferences().then(function(t){if(t){var n=e._createOnSaveDialog(e.context.i18n.getText("i18n","featureManagement_refreshMessage"));n.open()}})},_createOnSaveDialog:function(e){var t=sap.ui.getCore().byId("saveFeaturesDialog");if(t)this._oTextView.setText(e);else{t=new sap.ui.commons.Dialog("saveFeaturesDialog",{modal:!0,minWidth:"500px",showCloseButton:!1,title:"{i18n>featureManagement_refreshTitle}"}),this._oTextView=new sap.ui.commons.TextView(t.getId()+"--messageTextView",{text:e});var n=new sap.ui.commons.Button(t.getId()+"--refreshButton",{text:"Refresh",press:function(){location.reload()}});t.addButton(n),t.addContent(this._oTextView)}return this.context.i18n.applyTo(t),t}})}),define("sap.watt.platform.appmetadata/service/appmetadata",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{getNeoMetadata:function(t){return t.getProject().then(function(t){return t.getFolderContent().then(function(t){var n=e.find(t,function(e){return"neo-app.json".toUpperCase()===e.getEntity().getName().toUpperCase()});return n?n.getContent().then(function(e){return JSON.parse(e.replace(/(\r\n|\n|\r)/gm,""))}):null})})}}}),define("sap.watt.platform.clipboard/service/Clipboard",[],function(){"use strict";return{_oClipboardEntry:{entities:null,source:null},addEntity:function(e,t){if(void 0===e)throw new Error("Error in Clipboard Service usage. Entity may neither be null nor undefined.");this._oClipboardEntry.entities=e,this._oClipboardEntry.source=t||void 0},removeEntity:function(){this._oClipboardEntry={entities:null,source:null}},onDocumentDeleted:function(e){var t=e.params.document.getEntity(),n=this._oClipboardEntry.entities;if(n)for(var r=0;rfileDialog_insertName}",liveChange:function(e){t._checkValue(e)}}),e.addContent(this._oInputFileName),this._oDefaultButton=new sap.ui.commons.Button("FileDialog_ActionButton",{text:"{i18n>fileDialog_OK}",style:sap.ui.commons.ButtonStyle.Emph,enabled:!1,press:[this.copyObject,this]}),this._oDialog?this._oDialog.removeAllContent():this._oDialog=new sap.ui.commons.Dialog("FileDialogUI",{initialFocus:this._oInputFileName,buttons:[this._oDefaultButton,new sap.ui.commons.Button({text:"{i18n>fileDialog_cancel}",press:[this.cancel,this]})],title:"{i18n>fileDialog_cancel_naming_conflict}",defaultButton:this._oDefaultButton,resizable:!1,keepInWindow:!0,modal:!0}),this._oDialog.addContent(e),this._oDialog},_checkValue:function(e){var t=e.getParameter("liveValue"),n=""!==t&&!this._alreadyExists(this._bFolder,t.trim());this._oDefaultButton.setEnabled(n)},_alreadyExists:function(e,t){for(var n=0;nfileDialog_name}"}));var t=this;return this._oInputFileName=new sap.ui.commons.TextField("FileDialog_InputNameRename",{tooltip:"{i18n>fileDialog_insertName}",liveChange:function(e){t._checkValue(e)}}),e.addContent(this._oInputFileName),this._oDefaultButton=new sap.ui.commons.Button("FileDialog_ActionButtonRename",{text:"{i18n>fileDialog_copy}",style:sap.ui.commons.ButtonStyle.Emph,enabled:!1,press:[this.copyObject,this]}),this._oDialog?this._oDialog.removeAllContent():this._oDialog=new sap.ui.commons.Dialog("FileDialogUIRename",{initialFocus:this._oInputFileName,buttons:[this._oDefaultButton,new sap.ui.commons.Button({text:"{i18n>fileDialog_cancel}",press:[this.cancel,this]})],defaultButton:this._oDefaultButton,resizable:!1,keepInWindow:!0,modal:!0}),this._oDialog.addContent(e),this._oDialog},_checkValue:function(e){var t=e.getParameter("liveValue"),n=""!==t&&!this._alreadyExists(this._bFolder,t.trim());this._oDefaultButton.setEnabled(n)},_alreadyExists:function(e,t){for(var n=0;n=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=QRCode.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4?this.modules[e+n][t+r]=!0:this.modules[e+n][t+r]=!1)},getBestMaskPattern:function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=QRUtil.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},createMovieClip:function(e,t,n){var r=e.createEmptyMovieClip(t,n),i=1;this.make();for(var o=0;o>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(var n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},setupTypeInfo:function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=QRUtil.getBCHTypeInfo(n),i=0;i<15;i++){var o=!e&&1==(r>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(var i=0;i<15;i++){var o=!e&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var n=-1,r=this.moduleCount-1,i=7,o=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var s=0;s<2;s++)if(null==this.modules[r][a-s]){var u=!1;o>>i&1));var c=QRUtil.getMask(t,r,a-s);c&&(u=!u),this.modules[r][a-s]=u,i--,i==-1&&(o++,i=7)}if(r+=n,r<0||this.moduleCount<=r){r-=n,n=-n;break}}}},QRCode.PAD0=236,QRCode.PAD1=17,QRCode.createData=function(e,t,n){for(var r=QRRSBlock.getRSBlocks(e,t),i=new QRBitBuffer,o=0;o8*s)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+8*s+")"); for(i.getLengthInBits()+4<=8*s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;;){if(i.getLengthInBits()>=8*s)break;if(i.put(QRCode.PAD0,8),i.getLengthInBits()>=8*s)break;i.put(QRCode.PAD1,8)}return QRCode.createBytes(i,r)},QRCode.createBytes=function(e,t){for(var n=0,r=0,i=0,o=new Array(t.length),a=new Array(t.length),s=0;s=0?d.get(h):0}}for(var m=0,l=0;l=0;)t^=QRUtil.G15<=0;)t^=QRUtil.G18<>>=1;return t},getPatternPosition:function(e){return QRUtil.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case QRMaskPattern.PATTERN000:return(t+n)%2==0;case QRMaskPattern.PATTERN001:return t%2==0;case QRMaskPattern.PATTERN010:return n%3==0;case QRMaskPattern.PATTERN011:return(t+n)%3==0;case QRMaskPattern.PATTERN100:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case QRMaskPattern.PATTERN101:return t*n%2+t*n%3==0;case QRMaskPattern.PATTERN110:return(t*n%2+t*n%3)%2==0;case QRMaskPattern.PATTERN111:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new QRPolynomial([1],0),n=0;n5&&(n+=3+o-5)}for(var r=0;r=256;)e-=255;return QRMath.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},i=0;i<8;i++)QRMath.EXP_TABLE[i]=1<>>7-e%8&1)},put:function(e,t){for(var n=0;n>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},define("sap.watt.platform.qrcode/lib/QRUtil",function(){}),function(){jQuery.fn.qrcode=function(e){var t=256,n=256,r=0,i=QRErrorCorrectLevel.H,o="#FFFFFF",a="#000000";return this.each(function(){var s=new QRCode(r,i);s.addData(e),s.make();var u=document.createElement("canvas");if(u){u.width=t,u.height=n;var c=u.getContext("2d");if(c){for(var l=t/s.getModuleCount(),p=n/s.getModuleCount(),f=0;f";if(t){r=this._fixURIIfRelative(e);var o=r,a=/^https?:\/\/localhost/;a.test(o)&&(i+="
Warning: the URI's hostname is localhost. It will be unreachable on mobile device
")}i+="";var s=$(i),u=$('
');if(u.qrcode(r),n){var c=u.find("canvas")[0].toDataURL("image/png"),l=$('');l.attr("src",c),s.append(l)}else s.append(u);var p={oDiv:s};return p}}}),define("sap.watt.platform.repositorybrowser/command/LinkWithEditorOn",[],function(){"use strict";return{execute:function(){var e=this;return e.context.service.usagemonitoring.report("repositoryBrowser","linkWithEditorOn","from_toolbar").done(),this.context.service.repositorybrowser.toggleLinkWithEditor().then(function(){return e.context.service.repositorybrowser.setSelectionToCurrentDocument().then(function(){return e.context.service.command.invalidateAll()})})},isAvailable:function(){return this.context.service.repositorybrowser.getStateLinkWithEditor().then(function(e){return!e})},isEnabled:function(){return this.context.service.perspective.getCurrentPerspective().then(function(e){return"development"===e})}}}),define("sap.watt.platform.repositorybrowser/command/LinkWithEditorOff",[],function(){"use strict";return{execute:function(){var e=this;return e.context.service.usagemonitoring.report("repositoryBrowser","linkWithEditoroff","from_toolbar").done(),this.context.service.repositorybrowser.toggleLinkWithEditor().then(function(){return e.context.service.command.invalidateAll()})},isAvailable:function(){return this.context.service.repositorybrowser.getStateLinkWithEditor()},isEnabled:function(){return this.context.service.perspective.getCurrentPerspective().then(function(e){return"development"===e})}}}),define("sap.watt.platform.repositorybrowser/command/CollapseFolder",[],function(){"use strict";return{execute:function(){var e=this;return this.context.service.filesystem.documentProvider.getRoot().then(function(t){return t.getFolderContent().then(function(t){return e.context.service.repositorybrowser.collapseFolders(t)})})},isAvailable:function(){return!0},isEnabled:function(){return this.context.service.filesystem.documentProvider.getRoot().then(function(e){return e.getCurrentMetadata().then(function(e){return e.length>0})})}}}),define("sap.watt.platform.repositorybrowser/command/ShowInRepBrowser",[],function(){"use strict";return{execute:function(){var e=this;return this.context.service.perspective.getAreaForService(e.context.service.content).then(function(t){return e.context.service.perspective.isAreaMaximized(t).then(function(n){return n?e.context.service.perspective.setAreaMaximized(t,!1).then(function(){return e.context.service.repositorybrowser.setSelectionToCurrentDocument()}):e.context.service.repositorybrowser.setSelectionToCurrentDocument()})})},isAvailable:function(){var e=this;return this.context.service.repositorybrowser.getStateLinkWithEditor().then(function(t){return!t&&e.context.service.content.isClickedTabSelected().then(function(e){return e})})},isEnabled:function(){return!0}}}),define("sap.watt.platform.repositorybrowser/command/Delete",["sap/watt/lib/lodash/lodash"],function(e){"use strict";function t(e){var t=this,n=this.context.i18n.getText("i18n","deleteDoc_deleting"),r=this.context.i18n.getText("i18n","deleteDoc_deleteProgress");return this.context.service.progress.startTask(n,r).then(function(n){for(var r=[],i=0;i1)return s.setSelection(o,!0,!0)})}var p=[],f=e.map(i,function(e){var t=e.document,i=t.getEntity().getName(),o=n(a,t.getEntity().isFolder(),i.trim());if(o){var s=t.getEntity().getFileExtension();s=""===s?"":"."+s;var c=i.replace(s,""),l=(null!==t?r:"")+c;o=n(a,t.getEntity().isFolder(),l+s);for(var f=2,d=l;o;)l=d+f,o=n(a,t.getEntity().isFolder(),l+s),f++;var h=u.context.i18n.getText("i18n","common_folder");return t.getEntity().isFile()&&(h=u.context.i18n.getText("i18n","common_file")),{doc:t,filenameProposal:l+s,type:h}}p.push({doc:t})});return f=e.compact(f),e.isEmpty(f)?l(p):u.context.service.clipboard.filedialog.openCreateUI(f,a).then(function(t){var n=e.union(p,t);return l(n)})})})})})},isAvailable:function(){return this.context.service.selection.isOwner(this.context.service.repositorybrowser)},isEnabled:function(){var e=this,t=this.context.service.clipboard;return t.getEntity().then(function(t){return!!t&&e.context.service.repositorybrowserUtils.isSingleNoRootSelection()})}}}),define("sap.watt.platform.repositorybrowser/command/Rename",[],function(){"use strict";return{execute:function(){var e=this.context.i18n.getText("i18n","renameCommand_rename"),t=this.context.i18n.getText("i18n","renameCommand_warning_msg"),n=this.context.i18n.getText("i18n","common_folder"),r=this.context.i18n.getText("i18n","common_file");this._sTitle=e+" ",this._sOperation=e;var i=this;return this.context.service.selection.getSelection().then(function(e){var o=e[0].document,a=o.getEntity(),s=a.getName(),u=a.getParentPath();return o.isDirty()?i.context.service.usernotification.alert(s+"' "+t):("folder"===a.getType()?i._sTitle+=n:i._sTitle+=r,i.context.service.filesystem.documentProvider.getDocument(u).then(function(e){return e.getCurrentMetadata().then(function(t){return i.context.service.clipboard.filedialog.rename.openCreateUI(a.getType(),i._sTitle,i._sOperation,s,t).then(function(t){return o.move(e,t).then(function(e){return i.context.service.repositorybrowser.setSelection(e,!0)})})})}).fail(function(e){var t=i.context.i18n.getText("i18n","renameCommand_msg_failure")+" "+e.message;console.error(t),i.context.service.usernotification.alert(t)}))})},isAvailable:function(){return this.context.service.selection.isOwner(this.context.service.repositorybrowser)},isEnabled:function(){return this.context.service.repositorybrowserUtils.isSingleSelectionWithNoRootOrLevelOneFolderSelection()}}}),define("sap.watt.platform.repositorybrowser/command/CreateFile",[],function(){"use strict";return{execute:function(){var e=this;return e.context.service.selection.getSelection().then(function(t){return e.context.service.repositorybrowser.createfiledialog.openCreateUI(e,t[0].document).then(function(){return e.context.service.focus.attachEvent("$dialogClosed",e._dialogClosed,e)})})},isAvailable:function(){return!0},isEnabled:function(){return this.context.service.repositorybrowserUtils.isSingleFolderNotRootSelection()},createFile:function(e,t){var n=this;return t.createFile(e).then(function(e){return Q.all([n.context.service.document.open(e),n.context.service.repositorybrowser.setSelection(e,!0)])})},_dialogClosed:function(){var e=this;return Q.delay(100).then(function(){return e.context.service.focus.setFocus(e.context.service.content).then(function(){return e.context.service.focus.detachEvent("$dialogClosed",e._dialogClosed,e)})})}}}),define("sap.watt.platform.repositorybrowser/command/CreateFolder",[],function(){"use strict";return{execute:function(){var e=this;return this.context.service.selection.getSelection().then(function(t){return e.context.service.repositorybrowser.createfolderdialog.openCreateUI(e,t[0].document)})},isAvailable:function(){return!0},isEnabled:function(){return"xs2"===sap.watt.getEnv("server_type")?this.context.service.repositorybrowserUtils.isSingleFolderNotRootSelection():this.context.service.repositorybrowserUtils.isSingleFolderSelection()},createFolder:function(e,t){var n=this;return t.createFolder(e).then(function(e){return n.context.service.repositorybrowser.setSelection(e,!0)})}}}),define("sap.watt.platform.repositorybrowser/command/Archive",{execute:function(){var e=this;return this.context.service.selection.getSelection().then(function(t){var n=t[0].document.getEntity(),r=n.getFullPath(),i=n.getName(),o=e.context.service.log,a=e.context.service.usernotification,s=e.context.i18n;return o.info("Archive",s.getText("i18n","archive_started",[i]),["user"]).done(),e.context.service.archiveFolder.createArchive(r).then(function(t){e.context.service.repositorybrowser.setSelection(t,!1).done(),o.info("Archive",s.getText("i18n","archive_completed_successfully_with_name",[i]),["user"]).done(),a.liteNotificationSuccess(s.getText("i18n","archive_completed_successfully")).done()}).fail(function(e){var t;t="QuotaExceeded"===e.name?s.getText("i18n","quota_exceeded",[i]):s.getText("i18n","archive_failed",[i]),o.error("Archive",t,["user"]).done(),a.liteNotificationFailure(t).done()})})},isAvailable:function(){return"local_hcproxy"!==sap.watt.getEnv("server_type")&&this._isValidPluginProject()},isEnabled:function(){return"local_hcproxy"!==sap.watt.getEnv("server_type")&&this._isValidPluginProject()},_isValidPluginProject:function(){var e=this,t=this.context.service.selection;return t.isOwner(this.context.service.repositorybrowser).then(function(n){return!!n&&t.getSelection().then(function(t){if(1===t.length){var n=t[0].document.getEntity();if(n.isFolder()&&n.getFullPath()&&n.getParentPath()){var r=n.getFullPath();return e.context.service.filesystem.documentProvider.getDocument(r).then(function(e){return e.getCurrentMetadata().then(function(e){return e.length>0})})}}return!1})})}}),define("sap.watt.platform.repositorybrowser/service/RepositoryBrowserFactory",{create:function(e,t){return e=e||"repositoryBrowser",t=jQuery.extend(t||{},{implements:"sap.watt.common.service.ui.Browser",module:"sap.watt.platform.repositorybrowser/service/RepositoryBrowser"}),this.context.create(e,t)}}),function(){"use strict";var e;sap.ui.controller("sap.watt.platform.plugin.repositorybrowser.view.RepositoryBrowser",{_oUI5Tree:void 0,_bContextMenuHandlerBound:void 0,_context:void 0,_selectedDocument:void 0,_oContextMenuGroup:void 0,_oDecoration:null,_documentStackForDecoration:null,_doubleClickEnabled:!1,_bPreferenceStoreEnabled:!1,_aFilters:[],_selectedNodes:void 0,setDecoration:function(e,t){var n=this;return e&&t?e.areDecoratorsAvailable().then(function(t){return t?n._oDecoration=e:Q()}):Q()},onInit:function(){sap.ui.commons.TreeNode.ANIMATION_DURATION=0,this._oUI5Tree=this.byId("repositoryTree"),this._oUI5Tree.attachSelectionChange(null,this.onNodeSelected,this),this._mEditors={}},expandNodes:function(){var e=this;return e._bPreferenceStoreEnabled?e._context.service.repositorybrowserPersistence.getNodes().then(function(t){for(var n=Object.keys(t),r=0;r0){for(var t=[],n=0;n0){for(var r=0;rr?1:0},_getImageUrl:function(e){return require.toUrl("sap/watt/uitools/images")+"/"+e},toggleNodeFocus:function(e){var t=e?"removeClass":"addClass",n="sapUiTreeNodeUnfocused";this._selectedNodes&&(this._selectedNodes.removeClass(n),this._selectedNodes=null),this._selectedNodes=this._oUI5Tree.$().find(".sapUiTreeNodeSelected"),this._selectedNodes[t](n)}})}(),define("sap.watt.platform.repositorybrowser/view/RepositoryBrowser.controller",function(){}),function(){"use strict";sap.ui.commons.TreeNode.extend("sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeNode",{metadata:{events:{dblClick:{}},properties:{tag:{type:"string",group:"Behavior",defaultValue:null}}}}),sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeNode.prototype.setStyleClasses=function(e){this._aStyleClasses=e,this.invalidate()},sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeNode.prototype.setDecoratorIconBottomLeft=function(e){this._decoratorIconBottomLeft=e,this.invalidate()},sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeNode.prototype.setDecoratorIconBottomRight=function(e){this._decoratorIconBottomRight=e,this.invalidate()},sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeNode.prototype.setDecoratorIconTopLeft=function(e){this._decoratorIconTopLeft=e,this.invalidate()},sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeNode.prototype.setDecoratorIconTopRight=function(e){this._decoratorIconTopRight=e,this.invalidate()},sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeNode.prototype.setDecoratorIconStyleClass=function(e){this._decoratorIconStyleClass=e,this.invalidate()},sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeNode.prototype.setPrefix=function(e){this._oPrefix=e,this.invalidate()},sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeNode.prototype.setSuffixes=function(e){this._aSuffixes=e,this.invalidate()},sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeNode.prototype.getTooltip_AsString=function(){return this.getText()},sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeNode.prototype.addNode=function(e){sap.ui.commons.TreeNode.prototype.addNode.call(this,e);var t=this._getTree();t.onPostAddNode(e)},sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeNode.prototype.insertNode=function(e,t){sap.ui.commons.TreeNode.prototype.insertNode.call(this,e,t);var n=this._getTree();n.onPostAddNode(e)},sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeNode.prototype.destroy=function(){var e=this._getTree();e.onPreDestroyNode(this),sap.ui.commons.TreeNode.prototype.destroy.call(this,this)},sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeNode.prototype.ondblclick=function(e){this.fireDblClick()},sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeNode.prototype._getTree=function(){var e=this.getTree();if(!e)throw new Error("The Tree for this node "+oNode.getText()+" not available");return e}}(),define("sap.watt.platform.repositorybrowser/view/BrowserTreeNode",function(){}),function(){"use strict";jQuery.sap.declare("sap.watt.platform.plugin.repositorybrowser.view.BrowserTree"),jQuery.sap.require("sap.ui.commons.TreeNode"),sap.ui.commons.Tree.extend("sap.watt.platform.plugin.repositorybrowser.view.BrowserTree",{metadata:{properties:{keepState:{type:"boolean",group:"Appearance",defaultValue:!0}},aggregations:{toolbar:{type:"sap.ui.commons.Toolbar",multiple:!1}}}}),function(){sap.watt.platform.plugin.repositorybrowser.view.BrowserTree.prototype.init=function(){sap.ui.commons.Tree.prototype.init&&sap.ui.commons.Tree.prototype.init.call(this),this.expandedNodeMap=null,this.oSelectedNode=null,this.nodeMap={};var e=this;this.addEventDelegate({onBeforeRendering:function(t){var n=e.getDomRef();if(n){var r=n.querySelector(".sapUiTreeCont");r&&(e._scrollPos={left:r.scrollLeft,top:r.scrollTop})}}}),this.addEventDelegate({onAfterRendering:function(t){var n=e.getDomRef();if(n){var r=n.querySelector(".sapUiTreeCont");r&&e._scrollPos&&(r.scrollLeft=e._scrollPos.left,r.scrollTop=e._scrollPos.top)}}})},sap.watt.platform.plugin.repositorybrowser.view.BrowserTree.prototype.addNode=function(e){sap.ui.commons.TreeNode.prototype.addNode.call(this,e),this.onPostAddNode(e)},sap.watt.platform.plugin.repositorybrowser.view.BrowserTree.prototype.onPostAddNode=function(e){if(this.getKeepState()){if(!e.getTag||!e.getTag())return;this.expandedNodeMap&&this.expandedNodeMap[e.getTag()]&&(e.setExpanded(!0),e.fireToggleOpenState({opened:!0,postAdd:!0}))}this.nodeMap[e.getTag()]=e},sap.watt.platform.plugin.repositorybrowser.view.BrowserTree.prototype.onPreDestroyNode=function(e){delete this.nodeMap[e.getTag()]},sap.watt.platform.plugin.repositorybrowser.view.BrowserTree.prototype.setSelectedNode=function(e){this.oSelectedNode=e},sap.watt.platform.plugin.repositorybrowser.view.BrowserTree.prototype.getSelectedNode=function(e){return this.oSelectedNode},sap.watt.platform.plugin.repositorybrowser.view.BrowserTree.prototype.getNodeByTag=function(e){return this.nodeMap[e]},sap.watt.platform.plugin.repositorybrowser.view.BrowserTree.prototype.onAfterRendering=function(e){$(".explorer .sapUiTreeIcon").each(function(e,t){t.ondragstart=function(e,t){e.preventDefault(),e.stopPropagation()}})}}()}(),define("sap.watt.platform.repositorybrowser/view/BrowserTree",function(){}),function(){"use strict";jQuery.sap.declare("sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeRenderer"),sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeRenderer={},sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeRenderer.render=function(e,t){var n=e,r=t.getToolbar();sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeRenderer.bFirstNodeRendered=!1,n.write(""),r&&n.renderControl(r),t.getShowHeader()&&(n.write('
"),n.write("
"),n.writeEscaped(t.getTitle()),n.write("
"),t.getShowHeaderIcons()&&(n.write("
"),n.renderControl(t.oCollapseAllButton),n.renderControl(t.oExpandAllButton),n.write("
")),n.write("
")),n.write('
"),n.write('
    ');for(var o=t.getNodes(),a=0;a"),n.write("
"),n.write("
")},sap.watt.platform.plugin.repositorybrowser.view.BrowserTreeRenderer.renderNode=function(e,t,n,r,i){var o,a=e;if(a.write(""),t._decoratorIconBottomLeft&&(a.write(""),a.write(""),a.write("")),t._decoratorIconBottomRight&&(a.write(""),a.write(""),a.write("")),t._decoratorIconTopLeft&&(a.write(""),a.write(""),a.write("")),t._decoratorIconTopRight&&(a.write(""),a.write(""),a.write("")),a.write(""),t.getIcon()&&a.writeIcon(t.getIcon(),"sapUiTreeIcon"),t._oPrefix&&t._oPrefix.text&&(a.write(" "),a.writeEscaped(t._oPrefix.text),a.write(" ")),a.writeEscaped(t.getText()),t._aSuffixes)for(var s=0;s "),a.writeEscaped(u.text),a.write(" ")}if(a.write(""),a.write(""),t.getNodes()){var c=t.getNodes();a.write(""),n++;for(var s=0;s")}}}(),define("sap.watt.platform.repositorybrowser/view/BrowserTreeRenderer",function(){}),define("sap.watt.platform.repositorybrowser/service/RepositoryBrowser",["sap/watt/platform/plugin/platform/service/ui/AbstractPart","sap/watt/lib/lodash/lodash","../view/RepositoryBrowser.controller","../view/BrowserTreeNode","../view/BrowserTree","../view/BrowserTreeRenderer"],function(e,t){"use strict";var n=e.extend("sap.watt.platform.plugin.repositorybrowser.service.RepositoryBrowser",{_oView:null,_oController:null,_bLinkWithEditor:!1,_bSelectionSuppressed:!1,init:function(){this._oView=sap.ui.view({viewName:"sap.watt.platform.plugin.repositorybrowser.view.RepositoryBrowser",type:sap.ui.core.mvc.ViewType.XML}),this._oController=this._oView.getController()},refresh:function(){console.error("Deprecated: repositorybrowser.refresh() - use oDocument.refresh() instead.");var e=this;return this.context.service.filesystem.documentProvider.getRoot().then(function(t){return t.refresh().then(function(){return e.context.service.content.refresh()})})},configure:function(t){var n=this;return e.prototype.configure.apply(this,arguments).then(function(){return n._oController.setDecoration(n.context.service.decoration,t.decorationEnabled).then(function(){return n._oController.init(n.context).then(function(){var e=!!t.doubleClickEnabled;n._oView.getController().setDoubleClickEnabled(e),n._oView.getController().enablePreferenceStore(!!t.preferenceEnabled),n._oView.getController().setFilters(t.filters),n._oView.getController().enableMultipleSelection(t.multipleSelectionEnabled);var r=[];return t.contextMenu&&r.push(n.context.service.commandGroup.getGroup(t.contextMenu).then(function(e){n._oView.getController().setContextMenuGroup(e)})),t.preferenceEnabled&&r.push(n._oView.getController().expandNodes().then(function(){return n._oView.getController().restoreSelected()})),Q.all(r).then(function(){var e=t.toolbarEnabled===!0;return n._adjustView(e,n._oView)})})})}).then(function(){n.context.service.document.attachEvent("changed",n.onDocumentChanged,n),n.context.service.document.attachEvent("created",n.onDocumentCreated,n)})},_adjustView:function(e,t){e&&this._addToolbar(t).done()},_addToolbar:function(e){return this.context.service._repositoryBrowserToolbar.getContent().then(function(t){t.addStyleClass("rbToolbarClass");var n=e.byId("repositoryTree");n.setToolbar(t)})},collapseFolders:function(e){return this._oView.getController().collapseFolders(e)},restoreInitialLinkedState:function(){var e=this;this.context.service.repositorybrowserPersistence.getLinked().then(function(t){e._bLinkWithEditor=t}).done()},getContent:function(){var t=this;return e.prototype.getContent.apply(this,arguments).then(function(){return t._oView})},getFocusElement:function(){return this._oView},getSelection:function(){var e=this._oView.getController().getSelection();return e},setNodeCustomStyle:function(e){this._oView.getController().setNodeCustomStyle(e)},removeNodeCustomStyle:function(){this._oView.getController().removeNodeCustomStyle()},setSelection:function(e,t,n){this._oView.getController().setSelection(e,t,void 0,n)},toggleLinkWithEditor:function(){this._bLinkWithEditor=!this._bLinkWithEditor,this.context.service.repositorybrowserPersistence.onLinkChanged({linked:this._bLinkWithEditor})},getStateLinkWithEditor:function(){return this._bLinkWithEditor},onDocumentChanged:function(e){var t=e.params.changeType,n=e.params.document,r=this._oView.getController();if(n&&r)if("hidden"===t)this._handleHiddenChange(r,e).done();else if("deleted"===t)r.removeNodeForDocument(n);else if("children"===t&&r&&this._oView.oController._oUI5Tree){var i=r._oUI5Tree.getNodeByTag(e.params.document.getKeyString());if(i){var o=e.params.document.getEntity().oMetadata,a=o.hasChildren;void 0===a&&(a=!0),i.setHasExpander(a),i.rerender()}}},_handleHiddenChange:function(e,t){var n=this,r=t.params.document;return r.isHidden().then(function(i){i?e.removeNodeForDocument(r):n._addDocumentHandler(e,t)})},_sendFocusChangeToViewController:function(e){this._oView.getController().toggleNodeFocus(e)},onFocusChanged:function(){var e=this;this.context.service.focus.getFocus().then(function(t){t&&e._sendFocusChangeToViewController("repositorybrowser"===t._sName)}).done()},onDocumentCreated:function(e){this._addDocumentHandler(this._oView.getController(),e)},_addDocumentHandler:function(e,t){if(e){var n=t.params.document,r=e._oUI5Tree.getNodeByTag(n.getKeyString());r||e.addNodeForDocument(n,t.params.parent)}},setSelectionToCurrentDocument:function(){var e=this;return this.context.service.content.getCurrentDocument().then(function(t){if(t)return e.setSelection(t,!0)})},onDocumentSelected:function(e){var n=e.params.selection;if(this._bLinkWithEditor&&t.isArray(n)&&!t.isEmpty(n)){var r=this;return this.context.service.selection.isOwner(this.context.service.repositorybrowser).then(function(e){if(e)return r.context.service.content.showIfOpen(n[0].document)})}},onContentTabSelected:function(e){if(this._bLinkWithEditor){var t=e.params.document;t._bExtDoc||(this.setSelection(t,!0),this._sendFocusChangeToViewController(!1))}},onDecorationsChanged:function(e){var n=e.params.event,r=e.params.documents;if(e.params.updateChildren){var i=this;t.forEach(r,function(t){i.refreshDecorationsForAllChildren(t,e)})}else this.updateDecoration(r,n)},updateDecoration:function(e,n){var r=this;t.forEach(e,function(e){r._updateDecorationInternal(e,n).done()})},_updateDecorationInternal:function(e,t){var n=this._oController._oUI5Tree.getNodeByTag(e.getKeyString());return n?this._oController._setDecoration(n,t):(this._oController._documentStackForDecoration||(this._oController._documentStackForDecoration=[]),this._oController._documentStackForDecoration.push({document:e,event:t}),Q())},refreshDecorationsForAllChildren:function(e,t){e.getEntity().isFile()||this._refreshDecorationsForAllChildrenInternal(e,t)},_refreshDecorationsForAllChildrenInternal:function(e,n){var r=this,i=this._oController._oUI5Tree.getNodeByTag(e.getKeyString());i&&(this._oController._setDecoration(i,n).done(),i.isLoaded&&e.getFolderContent().then(function(e){t.forEach(e,function(e){r._refreshDecorationsForAllChildrenInternal(e,n)})}).done())},exportSelection:function(e,t){var n=e[0].document;return this.context.service.export.exportDocument(n,t)}});return n}),define("sap.watt.platform.repositorybrowser/service/RepositoryBrowserPersistence",[],function(){"use strict";return{_CHANGED_THRESHOLD_IN_MS:2e3,_VERSION:1,_mNodes:{},_sSelected:"",_sStoredSelected:"",_bLinked:!1,_scheduled:!1,_sNode:"sap.watt.common.repositorybrowser.service.RepositoryBrowserPersistence",configure:function(){return this._load()},_load:function(){var e=this;return this.context.service.preferences.get(this._sNode).then(function(t){if(t&&t.version==e._VERSION){e._mNodes={};var n=[];for(var r in t.nodes)n.push(e.context.service.document.getDocumentByKeyString(t.nodes[r]).then(function(t){t?e._mNodes[t.getEntity().getKeyString()]=t:e._changed()}));return e._sStoredSelected=null,e._sSelected=null,t.selected&&n.push(e.context.service.document.getDocumentByKeyString(t.selected).then(function(t){t?(e._sStoredSelected=t,e._sSelected=t):e._changed()})),e._bLinked=t.linked,Q.all(n).then(function(){if(e._sStoredSelected&&!e._sStoredSelected.getEntity().isRoot())return e._sStoredSelected.getParent().then(function(t){t&&(e._mNodes[t.getEntity().getKeyString()]||(e._sStoredSelected=null,e._sSelected=null))})})}}).fail(function(t){e.context.service.log.error("Workspace Persistence",t.message,["system"]).done()})},add:function(e){e&&"folder"===e.getEntity().getType()&&(this._mNodes[e.getEntity().getKeyString()]||(this._mNodes[e.getEntity().getKeyString()]=e,this._changed()))},getNodes:function(){return this._mNodes},getStoredSelected:function(){return this._sStoredSelected},getSelected:function(){return this._sSelected},getLinked:function(){return this._bLinked},onSelectionChanged:function(e){this._sSelected=e,this._changed()},onLinkChanged:function(e){this._bLinked=e.linked,this._changed()},remove:function(e){delete this._mNodes[e.getEntity().getKeyString()];for(var t in this._mNodes){var n=this._mNodes[t];e.getEntity().contains(n.getEntity())&&delete this._mNodes[t]}this._changed()},_changed:function(){var e=this;this._scheduled||(setTimeout(function(){e._scheduled=!1,e.save()},this._CHANGED_THRESHOLD_IN_MS),this._scheduled=!0)},save:function(){var e={};e.version=this._VERSION,e.nodes=Object.keys(this._mNodes),e.selected=this._sSelected&&1===this._sSelected.length?this._sSelected[0].document.getEntity().getKeyString():null,e.linked=this._bLinked,this.context.service.preferences.set(e,this._sNode).fail(function(e){console.error("repositorybrowser persistence: settings could not be written! "+e)}).done()}}}),define("sap.watt.platform.repositorybrowser/ui/CreateFileDialog",[],function(){"use strict";return{_oCreateFileCommand:null,_onSapEnterDelegate:null,_checkInput:function(e){var t=e.getParameter("liveValue").trim();""===t&&sap.ui.getCore().byId("CreateFileDialog_CreateButton").setEnabled(!1),this._isPathValid(t).then(function(e){sap.ui.getCore().byId("CreateFileDialog_CreateButton").setEnabled(e)}).done()},_isPathValid:function(e){var t=this,n=sap.watt.normalizePath(e),r=n.split("/");if(0===r.length)return Q(!1);for(var i=0;icreateFileDialog_filename}"}));var n=new sap.ui.commons.TextField("CreateFileDialog_InputFileName",{placeholder:"{i18n>createFileDialog_filename2}",tooltip:"{i18n>createFileDialog_insertfilename}",liveChange:[e._checkInput,e],maxLength:120});t.addContent(n);var r=new sap.m.Button({id:"CreateFileDialog_CreateButton",text:"{i18n>button_create}",type:sap.m.ButtonType.Emphasized,enabled:!1,press:[e.createFile,e]}),i=new sap.ui.commons.Dialog("CreateFileDialogUI",{title:"{i18n>createFileDialog_createfile}",initialFocus:n,buttons:[r,new sap.m.Button({text:"{i18n>button_cancel}",press:[e.cancel,e]})],defaultButton:r,resizable:!1,keepInWindow:!0,modal:!0});return i.addContent(t),this._onSapEnterDelegate={onsapenter:this.onEnterPress},i.addEventDelegate(this._onSapEnterDelegate,this),i},openCreateUI:function(e,t){this._oDeferred=Q.defer(),this._oCreateFileCommand=e,this._oSelectedDocument=t;var n=sap.ui.getCore().byId("CreateFileDialogUI");return void 0===n&&(n=this._createDialog(),e.context.i18n.applyTo(n)),sap.ui.getCore().byId("CreateFileDialog_InputFileName").setValue(""),sap.ui.getCore().byId("CreateFileDialog_CreateButton").setEnabled(!1),n.open(),this._oDeferred.promise},onEnterPress:function(){sap.ui.getCore().byId("CreateFileDialog_CreateButton").getEnabled()&&this.createFile()},onAfterClose:function(){var e=sap.ui.getCore().byId("CreateFileDialogUI");e.removeEventDelegate(this._onSapEnterDelegate,this),e.destroy()},createFile:function(){var e=sap.ui.getCore().byId("CreateFileDialog_CreateButton");e.setEnabled(!1);var t=sap.ui.getCore().byId("CreateFileDialog_InputFileName").getValue().trim(),n=this._oCreateFileCommand.createFile(t,this._oSelectedDocument),r=this;return n.then(function(){e.setEnabled(!0),sap.ui.getCore().byId("CreateFileDialogUI").close(),r._oDeferred.resolve()}).fail(function(t){e.setEnabled(!0),r.context.service.usernotification.alert(r.context.i18n.getText("i18n","createFileDialog_errormsg")+"\n"+t).done()})},cancel:function(){sap.ui.getCore().byId("CreateFileDialogUI").close()}}}),define("sap.watt.platform.repositorybrowser/ui/CreateFolderDialog",[],function(){"use strict";return{_oCreateFolderCommand:null,_onSapEnterDelegate:null,_checkInput:function(e){var t=e.getParameter("liveValue").trim();""===t&&sap.ui.getCore().byId("CreateFolderDialog_CreateButton").setEnabled(!1),this._isPathValid(t).then(function(e){sap.ui.getCore().byId("CreateFolderDialog_CreateButton").setEnabled(e)}).done()},_isPathValid:function(e){var t=this,n=sap.watt.normalizePath(e),r=n.split("/");return t._validateFolderPath(r,t._oSelectedDocument)},_validateFolderPath:function(e,t){var n=this;if(0===e.length)return Q(!1);var r=e.shift();if(""===r)return Q(!1);var i=t.getEntity().getFullPath()+"/"+r;return t.getFolderContent().then(function(t){for(var r=0;rdialog_foldername}"}));var n=new sap.ui.commons.TextField("CreateFolderDialog_InputFolderName",{placeholder:"{i18n>dialog_foldername2}",tooltip:"{i18n>dialog_insertfoldername}",liveChange:[e._checkInput,e],maxLength:120});t.addContent(n);var r=new sap.m.Button({id:"CreateFolderDialog_CreateButton",text:"{i18n>button_create}",type:sap.m.ButtonType.Emphasized,enabled:!1,press:[e.createFolder,e]}),i=new sap.ui.commons.Dialog("CreateFolderDialogUI",{title:"{i18n>createFolderDialog_createfolder}",initialFocus:n,buttons:[r,new sap.m.Button({text:"{i18n>button_cancel}",press:[e.cancel,e]})],defaultButton:r,resizable:!1,keepInWindow:!0,modal:!0});return i.addContent(t),this._onSapEnterDelegate={onsapenter:this.onEnterPress},i.addEventDelegate(this._onSapEnterDelegate,this),i},openCreateUI:function(e,t){this._oCreateFolderCommand=e,this._oSelectedDocument=t;var n=sap.ui.getCore().byId("CreateFolderDialogUI");void 0===n&&(n=this._createDialog(),e.context.i18n.applyTo(n)),sap.ui.getCore().byId("CreateFolderDialog_InputFolderName").setValue(""),sap.ui.getCore().byId("CreateFolderDialog_CreateButton").setEnabled(!1),n.open()},onEnterPress:function(){sap.ui.getCore().byId("CreateFolderDialog_CreateButton").getEnabled()&&this.createFolder()},onAfterClose:function(){var e=sap.ui.getCore().byId("CreateFolderDialogUI"); e.removeEventDelegate(this._onSapEnterDelegate,this),e.destroy()},createFolder:function(){var e=sap.ui.getCore().byId("CreateFolderDialog_CreateButton");e.setEnabled(!1);var t=sap.ui.getCore().byId("CreateFolderDialog_InputFolderName").getValue().trim(),n=this._oCreateFolderCommand.createFolder(t,this._oSelectedDocument),r=this;n.then(function(){e.setEnabled(!0),sap.ui.getCore().byId("CreateFolderDialogUI").close()}).fail(function(t){e.setEnabled(!0),r.context.service.usernotification.alert(r.context.i18n.getText("i18n","createFolderDialog_errormsg")+"\n"+t)})},cancel:function(){sap.ui.getCore().byId("CreateFolderDialogUI").close()}}}),define("sap.watt.platform.repositorybrowser/utils/rbUtils",["sap/watt/lib/lodash/lodash"],function(e){"use strict";function t(t){for(var n=[],r=[],i=[],o=t.length,a=0;a0){this._targets={};for(var t=0;t=i._oOrder[e]?s.service.addMessage(t,n,r).then(function(e){return i.context.event.fireChanged({target:s.name,service:s.service,node:e})}):Q()}))}),Q.all(o)},_addLogNode:function(t,n,r,i){if(e.isObject(r)){if(!r.message)return Q.reject("logger cannot send object message to server, but string message");r=r.message}if(this._targets)return i=i?i:this._defaultTargets,this._delegate(i,t,n,r);var o=new this._createLogNode(t,n,r);return this._oBuffer.add(o),Q(o)},_circularBuffer:function(e){var t=[],n=0,r=-1;return{add:function(i){r++,r%=e,r>t.length-1?t.push(i):t[r]=i,r===n&&(n%=e)},read:function(){var r=t[n];return n=(n+1)%e,r},readLatest:function(){return t[r]},isEmpty:function(){return n===r},isFull:function(){return(r+1)%e===n},getBuffer:function(){return t}}}}),t}),define("sap/watt/common/error/AssertError",[],function(){"use strict";var e=function(e){var t=Error.apply(this,arguments);this.stack=t.stack,this.name="AssertError",this.message=e||""};return e.prototype=new Error,e.prototype.constructor=e,e}),define("sap.watt.platform.command/service/Command",["sap/watt/common/error/AssertError","sap/watt/lib/lodash/lodash"],function(e,t){"use strict";function n(e,t){Q().then(function(){throw t.message&&(t.message="Failed to load command "+e._sId+". "+t.message),e._oService&&(t=e._oService._addModuleContextToError(t)),t}).done()}function r(e){if("string"!=typeof e)throw new Error("Invalid Expression: Parameter for 'env' must be string");return function(){return sap.watt.getEnv(e,!1)}}function i(e){if("array"!==jQuery.type(e))throw new Error("Invalid Expression: Parameter for 'equals' must be array with 2 elements");if(2!==e.length)throw new Error("Invalid Expression: Parameter for 'equals' must be array with 2 elements");return e=e.map(function(e){return u(e)}),function(){return!(e[0]()!==e[1]())}}function o(e){return e=u(e),function(){return!e()}}function a(e){if("array"!==jQuery.type(e))throw new Error("Invalid Expression: Parameter for 'and' must be array");return e=e.map(function(e){return u(e)}),function(){return e.every(function(e){return!!e()})}}function s(e){if("array"!==jQuery.type(e))throw new Error("Invalid Expression: Parameter for 'or' must be array");return e=e.map(function(e){return u(e)}),function(){return e.some(function(e){return!!e()})}}function u(e){if(null!=e){var t=jQuery.type(e);if("object"===t){var n=Object.keys(e);if(1!==n.length)throw new Error("Invalid Expression: Only one entry allowed");var r=n[0],i=e[r];if(d[r])return d[r](i);throw new Error("Invalid Expression: Unknown Type "+r)}if("array"===t)throw new Error("Invalid Expression: Array is not allowed");return function(){return e}}return null}var c=require.toUrl("sap.watt.common.platform/ui/LoadingPage.html"),l=1e4,p=function(e,t,n){this._sId=e,this._mConfig=t,this._oEventEmitter=n,this._sIcon=t.icon,this._sIconLabel=t.iconLabel,this._sLabel=t.label,this._oService=t.service,this._sType=t.type,this._mValues={},this._mValues.default=t.value,this._bAvailable=u(t.available),this._bEnabled=u(t.enabled),this._sWindowTarget=t.windowTarget,this._sKeyBinding=t.customKeyBinding||t.keyBinding,this._sDefaultKeyBinding=t.keyBinding,this._sKeyBindingText=""};p.prototype.getId=function(){return this._sId},p.prototype.getIcon=function(){return this._sIcon},p.prototype.getKeyBindingAsText=function(){return this._sKeyBindingText},p.prototype.setKeyBindingText=function(e){this._sKeyBindingText=e},p.prototype.getKeyBindingTooltip=function(e){var t=this.getKeyBindingAsText();return t?e+" ("+t+")":e},p.prototype.getIconLabel=function(){return this._sIconLabel},p.prototype.getType=function(){return this._sType},p.prototype.getValue=function(e){return void 0==e&&(e="default"),this._mValues[e]||this._mValues.default},p.prototype.getLabel=function(){return this._sLabel},p.prototype.checkValue=function(t){if("boolean"===this.getType()&&"boolean"!=typeof t)throw new e("Just boolean values are allowed in boolean commands")},p.prototype.setValue=function(e,n){this.checkValue(e),void 0==n&&(n="default"),this._mValues[n]&&e!==this._mValues[n]&&!t.isEqual(e,this._mValues[n])&&this._oEventEmitter.fireInvalidated({commands:[this]}).done(),this._mValues[n]=e},p.prototype.execute=function(e){var t=this;return this._oCommandWindow=this._getCommandWindow(),this._isExecutable().then(function(n){return void 0===e&&(e=t.getValue()),t.setValue(e),n?t._oService.execute(e,t._oCommandWindow,t._mValues).fail(function(e){throw t._closeCommandWindow(),e}):(t._closeCommandWindow(),Q())})},p.prototype.getService=function(){return this._oService},p.prototype._getCommandWindow=function(){if(this._sWindowTarget){var e=window.open(c,this._sWindowTarget);return e.focus(),e}},p.prototype._closeCommandWindow=function(){this._oCommandWindow&&(this._oCommandWindow.close(),this._oCommandWindow=void 0)},p.prototype._isExecutable=function(){return this.getState().then(function(e){return e.available&&e.enabled})},p.prototype._isAvailable=function(){var e=this;return null!==this._bAvailable?this._processStateValue("available",this._bAvailable):this._oService.isAvailable(this._mValues).timeout(l).fail(function(t){return n(e,t),!1})},p.prototype._isEnabled=function(){var e=this;return null!==this._bEnabled?this._processStateValue("enabled",this._bEnabled):this._oService.isEnabled(this._mValues).timeout(l).fail(function(t){return n(e,t),!1})},p.prototype._processStateValue=function(e,t){return Q(this._processStateValueSync(e,t))},p.prototype._processStateValueSync=function(t,n){if("boolean"==typeof n)return n;if(n=n(),"boolean"==typeof n)return n;throw new e(t+": only accepts boolean value")},p.prototype.getState=function(){var e=this;return this._isAvailable().then(function(t){return t?[t,e._isEnabled()]:[!1,!1]}).spread(function(t,n){return{id:e._sId,enabled:n,available:t}})},p.prototype._error=function(e){p._error(this._sId,e)},p.prototype.getKeyBinding=function(){return this._sKeyBinding},p.prototype.setKeyBinding=function(e){this._sKeyBinding=e},p.prototype.getDefaultKeyBinding=function(){return this._sDefaultKeyBinding},p.prototype.setDefaultKeyBinding=function(e){this._sDefaultKeyBinding=e},p._mCommands={},p.register=function(e,t,n){this._mCommands[e]&&this._error(e,"Already registered"),t=jQuery.extend({service:null,keyBinding:null,stateServices:[]},t);var r=this,i=new p(e,t,n);return r._mCommands[e]=i,i},p.get=function(e){var t=this._mCommands[e];return t||this._error(e,"Command not implemented"),t},p.getAllCommands=function(){return this._mCommands},p._error=function(e,t){var n=[];throw e&&n.push("Command: "+e),t&&n.push("Message: "+t),new Error(n.join(" | "))};var f={_sShortcutsNode:null,init:function(){p.log=this.context.service.log},configure:function(e){var t=this;if(jQuery.each(e.commands,function(e,n){p.register(n.id,n,t.context.event)}),e.keyboardshortcutshandler&&e.keyboardshortcutshandler.service)return e.keyboardshortcutshandler.service.registerShortcuts(p._mCommands)},getCommand:function(e){return p.get(e)},getAllCommands:function(){return p.getAllCommands()},filter:function(e){var t=[],n=[];return jQuery.each(e,function(e,t){t.getCommand&&t.getCommand()?n.push(t.getCommand().getState()):n.push(Q({enabled:!0,available:!0}))}),Q.all(n).then(function(n){return jQuery.each(e,function(e,r){var i=n[e];r&&i.available&&t.push({enabled:i.enabled,item:r})}),t})},invalidateAll:function(){this.context.event.fireInvalidated({commands:p.getAllCommands()}).done()}},d={env:r,equals:i,and:a,or:s,not:o};return f}),define("sap.watt.platform.commandgroup/module/Group",["sap/watt/lib/lodash/lodash","sap/watt/common/error/AssertError"],function(e,t){"use strict";var n=function(e,t){return e.getPrio()-t.getPrio()},r=function(e,t){this._sId=e.id,this._oCommand=t,this._aItems=[],this._sLabel=e.label,this._sIcon=e.icon,this._sIconLabel=e.iconLabel,this._oService=e.service,this._oActiveItem=void 0};return r.prototype.getId=function(){return this._sId},r.prototype.addItem=function(e){if(this._oService)throw new Error("The items of the group '"+this.getId()+"' are retrieved dynamically. Adding items is not allowed");e.setParentGroup(this),this._aItems.push(e),this._aItems.sort(n)},r.prototype.getItems=function(){var e=this;if(this._oService){var n=e.getId();return e._oService.getItems(n).then(function(t){return e._aItems=t,t},function(e){if(e instanceof t)return[];throw e})}return Q(this._aItems)},r.prototype.getCommand=function(){return this._oCommand},r.prototype.getIcon=function(){return this._sIcon},r.prototype.getIconLabel=function(){return this._sIconLabel},r.prototype.getLabel=function(){return this._sLabel},r.prototype.getActiveItem=function(){return this._oActiveItem},r.prototype.setActiveItem=function(t){var n=this;this.getItems().then(function(){if(n._aItems.length>0){if(!(e.findIndex(n._aItems,t)>=0))throw new Error("The active item '"+t.getId()+"'is not part of items list");n._oActiveItem=t}}).done()},r.prototype.unsetActiveItem=function(){this._oActiveItem=void 0},r.prototype.getDefaultItem=function(){for(var e=0;e0){var r=n[0].document;if(r){if(e===t._getText("fileSearch_all"))return t._getText("fileSearch_default_search_in");if(e===t.context.i18n.getText("i18n","fileSearch_project"))return r.getProject().then(function(e){return e.getEntity().getFullPath()+"/"});if(e===t._getText("fileSearch_folder"))return r.getEntity().getFullPath()+"/"}return t._getText("fileSearch_default_search_in")}return t._getText("fileSearch_default_search_in")})},getContent:function(){var e=this;return this._prepareView().then(function(){return e._oView})},_prepareView:function(){if(this._oView)return Q();var e=this;return this._getSearchScopeFromPreferences().then(function(t){return t||(t={},t[e._SEARCH_SCOPE_KEY]=e._getText("fileSearch_all")),e._getSelectedDocument(t[e._SEARCH_SCOPE_KEY]).then(function(n){if(e._oView=sap.ui.view({viewName:"sap.watt.platform.plugin.filesearch.view.FileSearch",type:sap.ui.core.mvc.ViewType.XML,viewData:{context:e.context,searchScope:t[e._SEARCH_SCOPE_KEY],serachScopeDefaultText:n}}),e._oController=e._oView.getController(),e._oController.setServices(e.context.service),e._aStyles)return e.context.service.resource.includeStyles(e._aStyles)})})},getFocusElement:function(){return this._oView?this._oView:this.getContent()},previous:function(){return 0===this._searchResults.length||0===this._oCriteria.nStart?[]:(this._oCriteria.nStart=this._oCriteria.nStart-this.FILES_PER_LOADING,this._returnSearchResults(this._oCriteria.nStart))},search:function(e){var t=Q.defer(),n=this;if(void 0===e&&(e={bContentSearch:this._oCriteria.bContentSearch,nStart:this._oCriteria.nStart+this.FILES_PER_LOADING,sFileType:this._oCriteria.sFileType,sFolderName:this._oCriteria.sFolderName,sSearchTerm:this._oCriteria.sSearchTerm},e.nStart0?t.reject():n._findFile(e).then(function(r){n._oCriteria=e,0===e.nStart&&(n._searchResults=[]),n._numSearchResultsFound=r.numFound;for(var i=[],o=0;o1?o[1]:""}return this.context.service.content.isDirty(r).then(function(n){return n&&sap.ui.commons.MessageBox.alert(t._getText("fileSearch_searchondirty"),void 0,t._getText("fileSearch_search")),t.context.service.progress.startTask(t._getText("fileSearch_search"),t._getText("fileSearch_searching")).then(function(n){return t._oFileService.search(e).fail(function(e){throw console.log(e),new Error(e)}).fin(function(){t.context.service.progress.stopTask(n).done()})})})},_getText:function(e){var t=this.context.i18n;return t.getText("i18n",e)},replace:function(e,t,r,i){var o=Q.defer(),a=this._oCriteria.sSearchTerm;return e.getContent().then(function(s){var u=null;if(void 0===r)u=s.split(a).join(t);else if(!n.isNull(i)){var c=s.split("\n");c[i]=c[i].substr(0,r)+t+c[i].substr(r+a.length),u=c.join("\n")}null!==u&&e.setContent(u).then(function(){e.save().then(function(){s.indexOf(a)!==-1?o.resolve(!0):o.resolve(!1)}).done()}).done()}).done(),o.promise},replaceAll:function(e){var t=this,n=this._oCriteria,r=[];n&&(n.nStart=0,n.nRows=99999,this._findFile(n).then(function(n){for(var i=0;i0){var t=e[0].document;t&&n._oController&&(n._oController.setCurrentFolder(t),n._oController.clearResults())}}).done()},onSplitterPositionChanged:function(e){this.isVisible()&&this._oView&&this._oView.invalidate()},_isDocumentInSearchResults:function(e){return!n.isEmpty(this._searchResults)&&n.findIndex(this._searchResults,function(t){return t.sFullPath===e})!==-1},onDocumentChanged:function(e){var t=e.params.document?e.params.document.getEntity().getFullPath():"";if(this.isVisible()&&this._oController){if(this._isDocumentInSearchResults(t)&&"content"===e.params.changeType&&!e.params.options.source)return Q();if(this._oFindReferenceContext&&this._oFindReferenceContext.targetFile===t&&this._oView)return this._oView.getModel().setProperty("/modelData/bIsRefreshEnabled",!1),this._oView.getModel().setProperty("/modelData/bHasReferencesResults",!1),this._oView.byId("ReferencesResultTree").getModel().setProperty("/oReferencesResult",{}),this._oView.getModel().setProperty("/modelData/sReferencesBulletText",this.context.i18n.getText("fileSearch_Reference_results",[0,0])),Q()}return Q()},_buildResultItem:function(e,t){var n=[],r=this;return e.exists().then(function(i){return i?e.getContent().then(function(e){if(e&&t){var i=(e.toLowerCase(),e.split(/\r\n|\r|\n/)),o=t.toLowerCase();for(var a in i)for(var s=-1,u=i[a].toLowerCase().indexOf(o,0);u>=0;){s=i[a].toLowerCase().indexOf(o,s+1);var c={sReplace:r._getText("fileSearch_replace"),sText:i[a],nLine:parseInt(a),iIndex:u,iIndexInFile:u,sPreview:"",cols:0,rows:1,nStart:s};if(c.sText.length>r.MAX_NUM_OF_CHARACTERS){var l=(r.MAX_NUM_OF_CHARACTERS-t.length)/2;c.sText=c.sText.substring(c.nStart-l,c.nStart+l)+"...",c.iIndex=c.sText.toLowerCase().indexOf(t.toLowerCase())}r._fillPreviewForSearch(c,i),n.push(c),u=i[a].toLowerCase().indexOf(o,u+1)}return Q(n)}return Q(void 0)}):Q(void 0)}).fail(function(e){return Q(e)})},_fillPreviewForSearch:function(e,t){for(var n,r=e.nLine-3;r<=e.nLine+3;r++)r>=0&&t[r]&&(r===e.nLine?n=e.sText:(n=t[r],n.length>this.MAX_NUM_OF_CHARACTERS&&(n=n.substring(0,this.MAX_NUM_OF_CHARACTERS)+"...")),n=n.replace(/ {1,}/g," ").replace(/\t/g," "),n.length>e.cols&&(e.cols=n.length>this.MAX_COLUMNS_FOR_PREVIEW?this.MAX_COLUMNS_FOR_PREVIEW:n.length),e.sPreview+=""===e.sPreview?n:"\n"+n,e.rows++)},_truncateFilename:function(e,t){for(var n=e.lastIndexOf("/"),r=0;r0?"..."+e.substr(n):e},_buildFindReferencesItem:function(e){if(!e.items||0===e.items.length)return Q();var t=[],n=this,r=e.oFileDocument;e.items.length>1&&e.items.sort(function(e,t){return e.range[0]-t.range[0]});var i=e.items[0].range[0],o=e.items[0].range[1];return r.exists().then(function(a){return a?r.getContent().then(function(r){if(r){var a=r.split(/\r\n|\r|\n/),s=0,u=0,c=0;for(var l in a){if(0===e.items.length)break;if(s=u+a[l].length,i>s)u=s+("\r"==r.charAt(s)?2:1);else{for(;e.items.length>0&&u<=i&&o<=s;){c=i-u;var p={sReplace:"",sText:a[l],nLine:parseInt(l),iIndex:c,iIndexInFile:c,sPreview:"",cols:0,rows:1,nStart:u};n._fillPreviewForSearch(p,a),t.push(p),e.items.splice(0,1),e.items.length>0&&(i=e.items[0].range[0],o=e.items[0].range[1])}u=s+("\r"==r.charAt(s)?2:1)}}return Q(t)}return Q(void 0)}):Q(void 0)}).fail(function(e){return Q(e)})},_updateFindReferencesResultsForItem:function(e,t){var n=this,r=e.sFullPath,i={sFullPath:r,sText:n._truncateFilename(r,2),oFileDocument:e.oFileDocument,iMathes:-1};return n._referencesResults[t+this._referencesPageStart]=i,n._buildFindReferencesItem(e).then(function(e){i.items=e||[],i.iMathes=i.items.length})},_returnFindReferencesResults:function(){var e=[];e=e.concat(this._referencesResults.slice(this._referencesPageStart,this._referencesPageEnd));for(var t=0,n=0;n0?s.context.depModules.length:0,t._numReferenceResultsFilesFound=s.aFileEntries.length,e.targetFile&&(n=e.targetFile.split("/"),r=n[n.length-1],i="modulefindreferences"===e.providerType?t.context.i18n.getText("fileSearch_ReferenceForFile",[e.token.value]):t.context.i18n.getText("fileSearch_ReferenceFor",[e.token.value,r])),t._oView.getModel().setProperty("/modelData/bHasReferencesResults",s.numFound>0),t._oView.getModel().setProperty("/modelData/sReferencesTitle",i),t._oView.getModel().setProperty("/modelData/sReferencesValue",e.token.value),t._numReferenceResultsFilesFoundthis._referencesPageEnd)return this._referencesPageStart=this._referencesPageEnd,this._referencesPageEnd=this._referencesPageStart+this.FILES_PER_LOADING,t=this._returnFindReferencesResults(),this._numReferenceResultsInFilesFound=this._numReferenceResultsInFilesFound+t.numFound,this._numReferenceResultsFilesFound=this._numReferenceResultsFilesFound+t.aList.length,this._oView.byId("ReferencesResultTree").getModel().setProperty("/oReferencesResult",t),this._oView.byId("ReferencesResultTree").setTerm(this._oFindReferenceContext.sToken),this._oView.getModel().setProperty("/modelData/bRefHasNextResults",this._numReferenceResultsFilesFound=0),n=this.context.i18n.getText("fileSearch_Reference_results",[t.numFound,t.aList.length]),this._oView.getModel().setProperty("/modelData/sReferencesBulletText",n),Q();this._oFindReferenceContext.nStart=this._oFindReferenceContext.nEnd}var r=this;return this._findReference(null,this._oFindReferenceContext).then(function(i){if(i&&i.numFound>0){r._referencesPageStart=r._referencesPageEnd,r._referencesPageEnd=r._referencesPageEnd+i.aFileEntries.length;var o=[];if(r._numReferenceResultsInFilesFound=e?i.numFound:r._numReferenceResultsInFilesFound+i.numFound,r._numReferenceResultsFilesFound=r._numReferenceResultsFilesFound+i.aFileEntries.length,r._oFindReferenceContext.targetFile){var a=r._oFindReferenceContext.targetFile.split("/"),s=a[a.length-1],u="";u="modulefindreferences"===r._oFindReferenceContext.providerType?r.context.i18n.getText("fileSearch_ReferenceForFile",[r._oFindReferenceContext.sToken]):r.context.i18n.getText("fileSearch_ReferenceFor",[r._oFindReferenceContext.sToken,s])}r._oView.getModel().setProperty("/modelData/sReferencesTitle",u),r._oView.getModel().setProperty("/modelData/sReferencesValue",r._oFindReferenceContext.sToken),r._oView.getModel().setProperty("/modelData/bRefHasPrevResults",!0),r._numReferenceResultsFilesFound=0),r._oView.byId("ReferencesResultTree").getModel().setProperty("/oReferencesResult",t),r._oView.byId("ReferencesResultTree").setTerm(r._oFindReferenceContext.sToken),n=r.context.i18n.getText("fileSearch_Reference_results",[i.numFound,i.aFileEntries.length]),r._oView.getModel().setProperty("/modelData/sReferencesBulletText",n),Q()})}r._oView.getModel().setProperty("/modelData/bRefHasNextResults",!1)})}return Q.reject("Target is dirty")},getPreviousReference:function(){if(this._referencesPageStart-this.FILES_PER_LOADING>=0){var e=this._returnFindReferencesResults();this._numReferenceResultsInFilesFound=this._numReferenceResultsInFilesFound-e.numFound,this._numReferenceResultsFilesFound=this._numReferenceResultsFilesFound-e.aList.length,this._oView.getModel().setProperty("/modelData/bRefHasNextResults",this._numReferenceResultsFilesFound progress").attr("value",n).html(n)},i=[],o=0;o=0})},isEnabled:function(){return this.context.service.console.isVisible()}}}),function(){"use strict";sap.ui.controller("sap.watt.platform.plugin.console.view.Console",{onInit:function(){}})}(),define("sap.watt.platform.console/view/Console.controller",function(){}),define("sap.watt.platform.console/service/Console",["sap/watt/platform/plugin/platform/service/ui/AbstractPart","../view/Console.controller"],function(e){"use strict";var t=e.extend("sap.watt.common.plugin.console.service.Console",{_iMaxLineCount:null,_iActLineCount:0,_sFormat:null,_targets:{},_aAnsiConvertMap:{1:"",3:"",4:"",21:"",23:"",24:"",30:"",31:"",32:"",33:"",34:"",35:"",36:"",37:"",39:""},_aAnsiOpenToCloseMap:{21:["1"],23:["3"],24:["4"],39:["30","31","32","33","34","35","36","37"]},_ANSI_REGEXP:/(�[(\d+)m)(.*?)(�[(\d+)m)/g,_LINE_BREAK_REGEXP:/ /g,_oOrder:{debug:0,info:1,warn:2,error:3},configure:function(e){for(var t=0;t=this._iMaxLineCount){var o=i.indexOf("");o>=0&&(i=i.substr(o+6,i.length)),this._iActLineCount--}var a=this._sFormat;a=a.replace("$TIME",e.timestamp.toLocaleTimeString()),a=a.replace("$TAG",e.tag),a=a.replace("$MESSAGE",e.message),a=jQuery.sap.encodeHTML(a),a=a.replace(t._ANSI_REGEXP,function(e,n,r,i,o,a){return t._aAnsiConvertMap[r]&&t._aAnsiConvertMap[a]&&t._aAnsiOpenToCloseMap[a]&&t._aAnsiOpenToCloseMap[a].indexOf(r)!=-1?t._aAnsiConvertMap[r]+i+t._aAnsiConvertMap[a]:i}),a=a.replace(this._LINE_BREAK_REGEXP,"
"),i+='
'+a+"
",this._iActLineCount++,r.destroy(),n.removeAllContent(),r=new sap.ui.core.HTML({id:"consoleHtml",preferDOM:!1}),r.setContent(i),n.addContent(r),this._scrollToBottom()}},onVisibilityChanged:function(e){e.params.visible&&this._scrollToBottom()},_scrollToBottom:function(){setTimeout(function(){var e=$("#Console");e=e?e[0]:null,e&&(e.scrollTop=e.scrollHeight)},100)},onLoggerEvent:function(e){var t=this,n=e.params.target;this._targets[n]&&t._addMessage(e.params.node)}});return t}),define("sap.watt.platform.pluginmanager/service/PluginManagement",["sap/watt/lib/lodash/lodash","sap/watt/core/PluginRegistry"],function(e,t){return{getPluginFile:function(e,t,n){var r=Q.defer(),i=this,o=null,a=e,s=e.indexOf("/");s>-1&&(a=a.substring(0,s));var u=t.substring(t.indexOf("/"));if(o=require.toUrl(a+u),o||r.reject(new Error(i.context.i18n.getText("i18n","pluginManagement_PluginNotFound",[a]))),n){var c=new XMLHttpRequest;c.open("GET",o),c.responseType="blob",c.onload=function(e){if(4===this.readyState&&this.status<300)r.resolve(this.response);else{if(404!==this.status)throw new Error(i.context.i18n.getText("i18n","pluginManagement_unexpectedErrorMsg"));r.reject(new Error(i.context.i18n.getText("i18n","pluginManagement_ResourceNotFound",[t,a])))}},c.send()}else i._ajax(o).then(function(e){r.resolve(e)},function(e){if(404!==e.status)throw new Error(i.context.i18n.getText("i18n","pluginManagement_unexpectedErrorMsg"));r.reject(new Error(i.context.i18n.getText("i18n","pluginManagement_ResourceNotFound",[t,a])))});return r.promise},getPluginPath:function(e){for(var n in t._mRegistry){var r=t._mRegistry[n];if(r.getMetadata().name===e){var i=URI(r.getMetadata().baseURI).path();return i}}},_ajax:function(e){return jQuery.ajax({url:e,dataType:"text"})},addi18nBundleToGrid:function(e){this.context.i18n&&this.context.i18n.applyTo(e)},_filterPluginList:function(e){var t=[];for(var n in this._pluginList){var r=this._pluginList[n]._oMetadata.name;r.indexOf(e)>-1&&t.push(this._pluginList[n])}return t},_createAvailableDialog:function(){var e=this,t=new sap.ui.commons.TextView({width:"100%",layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),text:e.context.i18n.getText("i18n","about_plugins_desc")}),n=sap.ui.getCore().byId("searchField");n||(n=new sap.ui.commons.SearchField("searchField",{enableListSuggest:!1,enableClear:!0,startSuggestion:0,width:"100%",layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),suggest:function(t){e._updateTable(t.getParameter("value"))}}).addStyleClass("searchField"));var r=sap.ui.getCore().byId("pluginTable");r||(r=new sap.ui.table.Table("pluginTable",{selectionMode:sap.ui.table.SelectionMode.Multiple}),r.addColumn(new sap.ui.table.Column({label:new sap.ui.commons.Label({text:"{i18n>pluginManagement_pluginNameColumn}"}),template:(new sap.ui.commons.TextView).bindProperty("text","PluginName").addStyleClass("selectable"),sortProperty:"PluginName",filterProperty:"PluginName",width:"30%"})).addStyleClass("PluginNameColumn"),sap.watt.getEnv("development_mode")&&r.addColumn(new sap.ui.table.Column({label:new sap.ui.commons.Label({text:"{i18n>pluginManagement_pluginVersionColumn}"}),template:(new sap.ui.commons.TextView).bindProperty("text","PluginVersion"),sortProperty:"PluginVersion",filterProperty:"PluginVersion",width:"15%"})).addStyleClass("PluginVersionColumn"),r.addColumn(new sap.ui.table.Column({label:new sap.ui.commons.Label({text:"{i18n>pluginManagement_pluginLocationColumn}"}),template:(new sap.ui.commons.TextView).bindProperty("text","PluginLocation").addStyleClass("selectable"),sortProperty:"PluginLocation",filterProperty:"PluginLocation"})).addStyleClass("PluginLocationColumn"));var i=new sap.ui.commons.Dialog({modal:!0,buttons:[new sap.ui.commons.Button({text:e.context.i18n.getText("i18n","pluginManagement_okButton"),press:function(){i.close()}})],content:[t,n,r]}).addStyleClass("AvailablePluginsDialog");return i.setTitle(e.context.i18n.getText("i18n","about_available_plugins")),this.addi18nBundleToGrid(i),i},_updateTable:function(e){var t=this._filterPluginList(e),n=this._getAvailablePluginsData(t),r=sap.ui.getCore().byId("pluginTable"),i=r.getModel();i.setData({modelData:n}),i.refresh()},_getAvailablePluginsData:function(e){var t=new Array;for(var n in e){var r={PluginName:e[n]._oMetadata.name,PluginVersion:e[n]._oMetadata.version,PluginLocation:e[n]._oMetadata.baseURI};t.push(r)}return t},_updatePluginsModel:function(e){var t=new sap.ui.model.json.JSONModel,n=this._getAvailablePluginsData(e);t.setData({modelData:n});var r=sap.ui.getCore().byId("pluginTable");r.setModel(t),r.bindRows("/modelData")},getAvailablePluginsUI:function(){var e=this,n=e.context.service.usagemonitoring;n.report("pluginManager","AvailablePluginsOpened").done();var r=t._mRegistry;e._pluginList=r,sap.watt.includeCSS(require.toUrl("sap.watt.platform.pluginmanager/css/pluginManager.css"));var i=sap.ui.getCore().byId("AvailablePluginsGrid");return void 0===i&&(i=e._createAvailableDialog()),e._updatePluginsModel(e._pluginList),jQuery("#AvailablePluginsGrid").focusout(function(){jQuery("#searchField-tf-input").focus()}),i}}}),define("sap.watt.platform.pluginmanager/service/AvailablePlugins",["sap/watt/platform/plugin/platform/service/ui/AbstractConfig"],function(e){"use strict";return e.extend("sap.watt.platform.plugin.pluginmanager.service.AvailablePlugins",{getUserPreferenceContent:function(){var e=this;return this._oUI?this._oUI:this.context.service.pluginmanagement.getAvailablePluginsUI().then(function(t){return e._oUI=t,t})}})}),define("sap.watt.platform.pluginmanager/service/DisplayInvalidPlugins",[],function(){"use strict";return{_aPluginToBeRemovedFromUserPrefs:null,_addInvalidPluginEventListener:function(){var e=this;window.addEventListener("invalid_plugin_error",function(t){e._createAndOpenInvalidPluginErrorDialog(t.pluginName,t.optionalFeatureName),window.removeEventListener("invalid_plugin_error",this)})},_createAndOpenInvalidPluginErrorDialog:function(e,t){var n=this.context.i18n,r=t?n.getText("i18n","pluginManagement_removeandreloadfeature"):n.getText("i18n","pluginManagement_removeandreload"),i=t?n.getText("i18n","pluginManagement_invalidFeatureMessage",[e,t]):n.getText("i18n","pluginManagement_invalidPluginMessage",[e]),o=new sap.ui.commons.Dialog({height:"200px",width:"600px",modal:!0,showCloseButton:!1,title:n.getText("i18n","pluginManagement_pluginError"),buttons:[new sap.ui.commons.Button({text:r,press:function(){o.close(),o.destroy(),window.location.reload()}})],content:new sap.ui.commons.TextView({text:i})});o.open()},onAfterPluginsStarted:function(e){sap.watt.includeCSS(require.toUrl("sap.watt.platform.pluginmanager/css/pluginManager.css"));var t=e.params.params;this._aPluginToBeRemovedFromUserPrefs=[],this._addInvalidPluginEventListener();for(var n=0;n0){var i=sap.ui.getCore().byId("PluginManagerDialog");i||(i=this._createDialog());var o=new sap.ui.model.json.JSONModel;o.setData({plugins:t}),this._oPluginManagerTable.setModel(o),this._oPluginManagerTable.bindRows("/plugins"),i.open()}},_addPluginToBeRemoved:function(e){var t=e.message;if(e.name&&t&&(t.indexOf("is already implemented")>-1||t.indexOf("is already registered")>-1||t.indexOf("the plugin was disabled")>-1)){var n=e.baseURI;(n.indexOf("/plugins/pluginrepository")>-1||n.indexOf("/destinations/")>-1)&&this._aPluginToBeRemovedFromUserPrefs.push(e.baseURI)}},_createDialog:function(){sap.watt.includeCSS(require.toUrl("sap.watt.ideplatform.template/css/wizard.css"));var e=this;this._oPluginManagerTable=new sap.ui.table.Table({selectionMode:sap.ui.table.SelectionMode.Single,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0})}),this._oPluginManagerTable.addColumn(new sap.ui.table.Column({width:"20%",label:new sap.ui.commons.Label({text:"{i18n>pluginManagement_pluginNameColumn}"}),template:new sap.ui.commons.TextView({text:{parts:["name","title"],formatter:function(t,n){return n?n:t?t:e.context.i18n.getText("i18n","pluginManagement_unavailableProperty")}}}),sortProperty:"pluginDescription",filterProperty:"pluginDescription"})),this._oPluginManagerTable.addColumn(new sap.ui.table.Column({width:"30%",label:new sap.ui.commons.Label({text:"{i18n>pluginManagement_pluginDescriptionColumn}"}),template:new sap.ui.commons.TextView({text:{path:"description",formatter:function(t){return t?t:e.context.i18n.getText("i18n","pluginManagement_unavailableProperty")}}}),sortProperty:"pluginDescription",filterProperty:"pluginDescription"})),this._oPluginManagerTable.addColumn(new sap.ui.table.Column({width:"50%",label:new sap.ui.commons.Label({text:"{i18n>pluginManagement_pluginReasonColumn}"}),template:(new sap.ui.commons.TextView).bindProperty("text","message").addStyleClass("pluginReasonColumn"),sortProperty:"pluginDescription",filterProperty:"pluginDescription"})),this._oPluginManagerTable.setSelectionBehavior(sap.ui.table.SelectionBehavior.RowOnly);var t=new sap.ui.commons.Button({text:"{i18n>pluginManagement_okButton}",tooltip:"{i18n>pluginManagement_okButton}",press:[this.closeDialog,this],layoutData:new sap.ui.layout.GridData({span:"L2 M3 S8"})}).addStyleClass("buttonWidth"),n=this.context.i18n.getText("i18n","pluginManagement_gotoLabel")+'.',r=new sap.ui.commons.Link({text:this.context.i18n.getText("i18n","pluginManagement_gotoLink"),press:[this.gotoPreference,this],layoutData:new sap.ui.layout.GridData({span:"L2 M3 S8"})}),i=new sap.ui.commons.FormattedTextView({htmlText:n,controls:r}).addStyleClass("FTVstyle"),o=new sap.ui.commons.Dialog("PluginManagerDialog",{width:"70%",title:"{i18n>pluginManagement_managePluginTitle}",content:[this._oPluginManagerTable],buttons:[i,t],defaultButton:t,keepInWindow:!0,resizable:!1,modal:!0}).addStyleClass("dialogStyle");return this.addi18nBundleToDialog(o),o},gotoPreference:function(){this.closeDialog(),this.context.service.perspective.renderPerspective("userpreference").done()},addi18nBundleToDialog:function(e){this.context.i18n&&this.context.i18n.applyTo(e)},closeDialog:function(){var e=sap.ui.getCore().byId("PluginManagerDialog");void 0!==e&&(this._aPluginToBeRemovedFromUserPrefs&&this._aPluginToBeRemovedFromUserPrefs.length>0&&this.context.service.pluginmanagement.removePluginsFromUserPreferences(this._aPluginToBeRemovedFromUserPrefs).fail(function(e){console.log(e)}).done(),e.close())}}}),define("sap.watt.platform.feedback/command/Feedback",[],function(){"use strict";return{execute:function(){this.context.service.feedback.getFeedbackUI().then(function(e){e&&e.getController().openForm()}).done()},isAvailable:function(){return!0},isEnabled:function(){return!0}}}),define("sap.watt.platform.feedback/service/FeedbackMenuItem",[],function(){"use strict";return{init:function(){var e=this;this.oButton=new sap.ui.commons.Button({text:e.context.i18n.getText("i18n","feedback_button"),lite:!0,tooltip:"",press:function(){e.context.service.feedback.getFeedbackUI().then(function(e){e&&e.getController().openForm()}).done()}}),this.oButton.addStyleClass("feedbackButton")},configure:function(e){this._aStyles=e.styles},getContent:function(){if(this._isAvailable()){var e=this;return this.context.service.resource.includeStyles(this._aStyles).then(function(){return[e.oButton]})}return null},_isAvailable:function(){return"xs2"!==sap.watt.getEnv("server_type")}}}),define("sap.watt.platform.feedback/service/Feedback",[],function(){"use strict";return{getFeedbackUI:function(){var e=sap.ui.view({viewName:"sap.watt.platform.plugin.feedback.view.FeedbackForm",type:sap.ui.core.mvc.ViewType.JS,viewData:{service:this.context.service,context:this.context}});return e},sendFeedback:function(e,t,n){var r={texts:e,ratings:t,context:n},i=JSON.stringify(r);return Q.sap.ajax(sap.watt.getEnv("context_root")+"feedback",{data:i,type:"POST",contentType:"application/json"}).fail(function(e){throw e})}}}),define("sap.watt.platform.resource/service/Resource",[],function(){"use strict";return{_mIncludedStyles:{},_sDefaultStyleType:"css",_mIncludeStyleType:{css:function(e){var t=Q.defer();return jQuery.sap.includeStyleSheet(e,void 0,function(){t.resolve()},function(){t.reject(new Error("Could not load the CSS file from "+e))}),t.promise},less:function(e){throw new Error("Less support is not yet implemented")}},includeStyles:function(e){var t=this,n=[];return jQuery.each(e,function(e,r){var i=require.toUrl(r.uri);if(!t._mIncludedStyles[i]){t._mIncludedStyles[i]=r;var o=r.type||t._sDefaultStyleType;n.push(t._mIncludeStyleType[o].call(t,i))}}),Q.all(n)}}}),define("sap.watt.platform.resourceindex/command/ResourceList",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{_RESULTSFOUND:"Results found: ",_oTable:null,_oLabel:null,_oDialog:null,_oOpenButton:null,_bArrowUpPressed:!1,_bArrowDownPressed:!1,_iSelectionIndex:0,_oLastOpenedTemplate:null,_oSortStart:null,init:function(){var e=this;this._RESULTSFOUND=this.context.i18n.getText("i18n","results_found"),this._oInput=new sap.ui.commons.TextField({liveChange:[e._checkInput,e]}).addStyleClass("resourceListIF"),this._oOpenButton=new sap.m.Button({text:this.context.i18n.getText("i18n","open"),press:[e._closeDialog,e],enabled:!1}),this._oCancelButton=new sap.m.Button({text:this.context.i18n.getText("i18n","cancel"),press:[e._cancelDialog,e]}),this._oTable=new sap.ui.table.Table({selectionMode:sap.ui.table.SelectionMode.Single,selectionBehavior:sap.ui.table.SelectionBehavior.RowOnly,selectedIndex:0,columnHeaderVisible:!1,navigationMode:sap.ui.table.NavigationMode.Scrollbar,columns:[{template:(new sap.ui.commons.TextView).bindProperty("text","name"),width:"25%",resizable:!1},{template:(new sap.ui.commons.TextView).bindProperty("text","parentPath"),width:"75%",resizable:!1},{template:(new sap.ui.commons.TextView).bindProperty("text","path"),visible:!1,resizable:!1},{template:(new sap.ui.commons.TextView).bindProperty("text","lastOpened"),visible:!1,resizable:!1}]}).attachEvent("rowSelectionChange",e._rowSelection,e).attachBrowserEvent("dblclick",function(t){e._cellClick(t)},e),this._oLabel=new sap.ui.commons.Label,this._oLabel.setText(""),this._oDialog=new sap.ui.commons.Dialog("ResourceList",{title:this.context.i18n.getText("i18n","resource_list_title"),buttons:[this._oOpenButton,this._oCancelButton],content:[this._oInput,this._oTable,this._oLabel],defaultButton:this._oOpenButton,modal:!0,initialFocus:this._oInput}).addStyleClass("resourceListDLG").attachBrowserEvent("keydown",function(e){this._handleKeyboardEvents(e)},this)},_handleKeyboardEvents:function(e){switch(e.keyCode){case 13:this._oTable.getSelectedIndex()!==-1&&this._openDocument();break;case 37:this._bArrowUpPressed=!1,this._bArrowDownPressed=!1;break;case 39:this._bArrowUpPressed=!1,this._bArrowDownPressed=!1;break;case 38:this._bArrowUpPressed=!0,this._bArrowDownPressed=!1;break;case 40:this._bArrowUpPressed=!1,this._bArrowDownPressed=!0}"input"!==e.target.localName&&this._checkInput(e)},_openDocument:function(){var e=this;this._oTable._getRowCount()<=0||this.context.service.filesystem.documentProvider.getDocument(this._getFullName(this._oTable)).then(function(t){return e.context.service.resourceindex.resort(t).then(function(){return e.context.service.document.open(t).then(function(){e.context.service.repositorybrowser.setSelectionToCurrentDocument().done(),e._oDialog.close()})})}).fail(function(t){t&&e.context.service.log.error("Open Resource",t.message,["system"]).done()}).done()},_rowSelection:function(e){this._oOpenButton.setEnabled(this._oTable.getSelectedIndex()!==-1),this._oTable.isIndexSelected(e.getParameters().rowIndex)&&(this._sFullName=this._getFullName(this._oTable))},_getFullName:function(e){var t=e.getSelectedIndex()-e.getFirstVisibleRow();if(t>-1){var n=e.getRows()[t];if(n&&n.getCells()&&n.getCells().length>1){var r=n.getCells()[0].getText(),i=n.getCells()[1].getText();return i+"/"+r}return this._sFullName}return this._sFullName},_cellClick:function(){this._sFullName&&this._openDocument()},_getSorterComparator:function(t){var n=this,r=new RegExp("^"+e.escapeRegExp(t),"i");return function(e,i){var o=(new Date).getTime(),a=o-n._oSortStart;if(a>150)return 0;var s=e.name,u=i.name,c=s.toLowerCase();if(c===t)return-1;var l=u.toLowerCase();if(l===t)return 1;if(r.test(c))return-1;if(r.test(l))return 1;var p=c.indexOf(t),f=l.indexOf(t);return p>0?-1:f>0?1:su?1:0}},_getSorter:function(e){var t=e.toLowerCase(),n=new sap.ui.model.Sorter(this._oTable.getColumns()[0].getSortProperty(),!1);return n.fnCompare=this._getSorterComparator(t),n},_checkInput:function(){var e=this._oTable.getSelectedIndex(),t=[],n=this._oInput.getLiveValue();if(n&&n.length>0){var r=new sap.ui.model.Filter("path",sap.ui.model.FilterOperator.Contains,n);t.push(r)}var i=this._oTable.getBinding("rows");i&&(i.attachChange(function(e){if("filter"===e.getParameter("reason")){var t=e.getSource().aIndices.length;this._oLabel.setText(0!==t?this._RESULTSFOUND+" "+t:"")}},this),i.filter(t,"Application"),n&&n.length>1&&(this._oSortStart=(new Date).getTime(),i.sort(this._getSorter(n))));var o=this._oTable._getRowCount()-1;this._bArrowUpPressed?this._iSelectionIndex=0===e?e:e-1:this._bArrowDownPressed&&(this._iSelectionIndex=e===o?e:e+1),o<=this._iSelectionIndex?this._iSelectionIndex=o:o>0&&this._iSelectionIndex===-1&&(this._iSelectionIndex=0),this._iSelectionIndex>9&&this._oTable.setFirstVisibleRow(this._iSelectionIndex-9),this._oTable.setSelectedIndex(this._iSelectionIndex)},execute:function(){var e=this.context.service;e.usagemonitoring.startPerf("search_resource","open").done();var t=this;t._oTable.setBusy(!0),t._oTable.setShowNoData(!1),t._oInput.setValue(""),t._oDialog.open(),e.resourceindex.getMetadata().then(function(n){var r=new sap.ui.model.json.JSONModel;r.setData(n),t._oDialog.setModel(r),t._oTable.bindRows("/filesIndex"),t._iSelectionIndex=n.filesIndex.length>0?0:-1,t._oTable.setSelectedIndex(t._iSelectionIndex),t._oTable.setShowNoData(!0),t._oTable.setBusy(!1),t._oLabel.setText(""),e.usagemonitoring.report("search_resource","open","open").done()}).done()},isAvailable:function(){return!0},isEnabled:function(){return this.context.service.perspective.getCurrentPerspective().then(function(e){return"development"===e})},_closeDialog:function(){this._openDocument()},_cancelDialog:function(){this._oDialog.close()}}}),define("sap.watt.platform.resourceindex/service/Index",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{_mFiles:{filesIndex:[]},_bFinished:!1,_oMetadataFilterOptions:{hidden:!1},getMetadata:function(){var e=this;return this._bFinished?this._mFiles:e.context.service.filesystem.documentProvider.getRoot().then(function(t){return e._startIndexing(t).then(function(){return e._bFinished=!0,e._mFiles})})},_startIndexing:function(t){var n=this,r={};return t.getFolderContent().then(function(e){for(var t=[],i=0;i")},i=function(e,t){var r=new sap.ui.commons.Panel({expandable:!0,collapsed:!0,borderDesign:sap.ui.commons.enums.BorderDesign.None,text:t.i18n.getText("i18n","More_Details"),layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0})}),i=new sap.ui.table.Table({visibleRowCount:3,selectionMode:sap.ui.table.SelectionMode.None,layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),noData:t.i18n.getText("i18n","No_Params")}),o=new sap.ui.commons.Label({text:"Key",design:"Bold"});i.addColumn(new sap.ui.table.Column({label:o,template:(new sap.ui.commons.TextView).bindProperty("text","parameter"),width:"50%"})),i.addColumn(new sap.ui.table.Column({label:new sap.ui.commons.Label({text:"Value",design:"Bold"}),template:(new sap.ui.commons.TextView).bindProperty("text","value"),width:"50%"}));var a=n(e.getParameters()),s=new sap.ui.model.json.JSONModel;return s.setData({modelData:a}),i.setModel(s),i.bindRows("/modelData"),r.addContent(i),r},o=function(e,t){var n=0,o=new sap.ui.layout.Grid({layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0}),vSpacing:0});for(n=0;n]*version="4.0"/i;return{_isV4Version:function(t){return e.isString(t)?r.test(t):"4.0"===e.get(t,"version")},_getSchemas:function(t){return e.get(t,"dataServices.schema",[])},_getSchema:function(t,n){return e.find(this._getSchemas(t),["namespace",n])},_extractNamespace:function(t){return e.replace(t,n,"$2")},_extractLocalName:function(t){return e.replace(t,n,"$3")},_getAllTypeProperties:function(t,n,r){var i=this._getType(t,n,r),o=e.get(i,"basetype"),a=e.chain(i).get("property").map(e.cloneDeep).value();return o?e.concat(this._getAllTypeProperties(t,o,r),a):a},_expandTypeProperties:function(n,r,i){var o,a,s;for(r=e.map(r,e.cloneDeep),o=0;or&&(s=r-t,s<0&&(s=0)),a+n>i&&(a=a-n-20,a<0&&(a=0)),this._intellisenseHTMLElement.style.left=s+"px",this._intellisenseHTMLElement.style.top=a+"px"}var u=this;$(body)[0].appendChild(u._intellisenseHTMLElement),u._intellisenseHTMLElement.style.display="block",this.createControls().then(function(){u._textBoxElem.select(),u._textBoxElem.focus()}).done()},createTextTypeRelatedControls:function(){this._textTypesSelectControl=this._doc.createElement("input"),this._textTypesSelectControl.className="termservice_select_texttype",this._textTypesSelectControl.setAttribute("value","All text types"),this._textTypesSelectControl_value=this._service.context.i18n.getText("i18n","item_texttype_all"),this._textTypesSelectControl.setAttribute("tabIndex",2),this._params.sTextType&&(this._textTypesSelectControl.setAttribute("value",this._params.sTextType),this._textTypesSelectControl_value=this._params.sTextType),this._intellisenseHTMLElement.appendChild(this._textTypesSelectControl),this._imgElem=this._doc.createElement("div"),this._imgElem.className=".sapUiTfComboIcon termservice_img_button",this._intellisenseHTMLElement.appendChild(this._imgElem),this._texttypelistElement=this._doc.createElement("ul"),this._texttypelistElement.className="termservice_texttype_list",this._texttypelistElement.style.visibility="hidden";var e=this._textTypesSelectControl.currentStyle||window.getComputedStyle(this._textTypesSelectControl),t=parseInt(this._intellisenseHTMLElement.style.left)+240;this._texttypelistElement.style.left=t.toString()+"px",this._texttypelistElement.style.maxWidth=this._docWidth-t+"px";var n=parseInt(this._intellisenseHTMLElement.style.top)+parseInt(e.marginTop)+parseInt(e.marginBottom)+parseInt(e.paddingTop)+parseInt(e.paddingBottom)+parseInt(e.height)+parseInt(e.borderTop)+parseInt(e.borderBottom);this._texttypelistElement.style.top=n.toString()+"px",this._intellisenseHTMLElement.appendChild(this._texttypelistElement),this.addTextTypes();var r=this;this._textTypesSelectControl.onkeydown=function(e){9===e.keyCode&&(e.preventDefault(),e.stopPropagation(),r._textBoxElem.select(),r._textBoxElem.focus())},this._textTypesSelectControl.onkeyup=function(e){e.preventDefault(),e.stopPropagation(),13===e.keyCode?void 0!==r._focusedTextType&&r._selectTextType(r._focusedTextType):r._textTypesSelectControl.value!==r._textTypesSelectControl_value&&(r._filterTypeList(r._textTypesSelectControl.value),r._texttypelistElement.style.visibility="visible")},this._textTypesSelectControl.onclick=function(e){e.preventDefault(),e.stopPropagation();try{var t=r._texttypelistElement.style.visibility;"visible"===t?r._texttypelistElement&&(r._texttypelistElement.style.visibility="hidden",r._textTypesSelectControl.className.indexOf("selected")>=0&&(r._textTypesSelectControl.className=r._textTypesSelectControl.className.replace("selected",""))):r._texttypelistElement&&(r._texttypelistElement.style.visibility="visible",r._textTypesSelectControl.className.indexOf("selected")<0&&(r._textTypesSelectControl.className+=" selected"))}catch(e){}},this._texttypelistElement.onclick=function(e){e.preventDefault(),e.stopPropagation();try{var t=e.target.parentNode,n=t.attributes.selected_id,i=n.nodeValue;r._selectTextType(i)}catch(e){}},this._texttypelistElement.onmouseover=function(e){e.preventDefault(),e.stopPropagation();try{var t=e.target.parentNode,n=t.attributes.selected_id,i=n.nodeValue;r.textTypeFocusTo(i)}catch(e){}},this._imgElem.onclick=function(e){e.preventDefault(),e.stopPropagation();try{var t=r._texttypelistElement?r._texttypelistElement.style.visibility:null;"visible"==t?(r._texttypelistElement&&(r._texttypelistElement.style.visibility="hidden"),r._params.bShowTextType&&r._textTypesSelectControl.className.indexOf("selected")>=0&&(r._textTypesSelectControl.className=r._textTypesSelectControl.className.replace("selected",""))):(r._texttypelistElement&&(r._texttypelistElement.style.visibility="visible"),r._params.bShowTextType&&r._textTypesSelectControl.className.indexOf("selected")<0&&(r._textTypesSelectControl.className+=" selected"))}catch(e){}},this._selectTextType=function(e){var t=""===e?this._service.context.i18n.getText("i18n","item_texttype_all"):e;this._textTypesSelectControl.setAttribute("value",t),this._textTypesSelectControl.value=t,this._textTypesSelectControl_value=t,this._params.sTextType=e,this._texttypelistElement&&(this._texttypelistElement.style.visibility="hidden"),this.refresh(),this._textTypesSelectControl.className.indexOf("selected")>=0&&(this._textTypesSelectControl.className=this._textTypesSelectControl.className.replace("selected","")),this._textTypesSelectControl.focus()}},createTermListControl:function(){this._termlistElement=this._doc.createElement("ul"),this._termlistElement.className="termservice_list";var e=this._textBoxElem.currentStyle||window.getComputedStyle(this._textBoxElem);this._termlistElement.style.left=this._intellisenseHTMLElement.style.left;var t=parseInt(this._intellisenseHTMLElement.style.top)+parseInt(e.height)+parseInt(e.marginTop)+parseInt(e.marginBottom);t=t+parseInt(e.paddingTop)+parseInt(e.paddingBottom)+parseInt(e.borderTop)+parseInt(e.borderBottom)+10,this._termlistElement.style.top=t.toString()+"px",this._termlistElement.style.visibility="hidden",this._intellisenseHTMLElement.appendChild(this._termlistElement)},createControls:function(){return this._textBoxElem=this._doc.createElement("input"),this._textBoxElem.className="termservice_textbox",this._textBoxElem.setAttribute("tabIndex",1),this._textBoxElem.setAttribute("value",this._params.oKeyValue.sValue),this._intellisenseHTMLElement.appendChild(this._textBoxElem),this._params.bShowDoamin?(this._domainControl=this._doc.createElement("input"),this._domainControl.className="termservice_select_domain",this._domainControl.setAttribute("disabled",!0),this._domainControl.setAttribute("value",this._params.sDomain),this._intellisenseHTMLElement.appendChild(this._domainControl)):this._domainControl=void 0,this._params.bShowTextType?this.createTextTypeRelatedControls():this._textTypesSelectControl=void 0,this.createTermListControl(),this.getTerms()},getTerms:function(){this._terms=[],this._termlistElement.style.visibility="hidden";var e,t=this;return this._termlistElement.innerHTML="",this._service.getTerms(this._params.oKeyValue.sValue,this._params.sDomain,this._params.sTextType).then(function(n){if(t._searchText=t._params.oKeyValue.sValue,t._terms=n.suggestions,t._terms&&t._terms.length>t._rows?t._termlistElement.style.height=t._rows*t._rowHeight+"px":t._termlistElement.style.height="auto",t._termlistElement.style.visibility="visible",t._terms){for(e=0;e=0&&(e._textTypesSelectControl.className=e._textTypesSelectControl.className.replace("selected","")))},this._filterTypeList=function(t){if(this._texttypelistElement.innerHTML="",t=t.toUpperCase(),this._focusedTextType=void 0,""===t.trim()){var n=e._doc.createElement("li");n.setAttribute("selected_id",""),o=e._doc.createElement("span"),o.className="termservice_texttype_item",o.innerHTML=e._service.context.i18n.getText("i18n","item_texttype_all"),n.appendChild(o),e._texttypelistElement.appendChild(n)}if(e._textTypes){var r=e._textTypes.length;for(i=0;i0){var o=e._texttypelistElement.childNodes[0],a=o.attributes.selected_id,t=a.nodeValue;e.textTypeFocusTo(t)}},this._intellisenseHTMLElement.onkeydown=function(t){try{this._params.bShowTextType&&(e._texttypelistElement.style.visibility="hidden",e._textTypesSelectControl.className.indexOf("selected")>=0&&(e._textTypesSelectControl.className=e._textTypesSelectControl.className.replace("selected",""))),13===t.which?(t.preventDefault(),t.stopPropagation(),e.termSelected()):40===t.which?(t.preventDefault(),t.stopPropagation(),e.focusNext()):38===t.which?(t.preventDefault(),t.stopPropagation(),e.focusPrev()):27===t.which&&(t.preventDefault(),t.stopPropagation(),e.termCancelled())}catch(e){}},this._termlistElement.onclick=function(t){t.preventDefault(),t.stopPropagation();try{e._texttypelistElement&&(e._texttypelistElement.style.visibility="hidden");var n=t.target.parentNode,r=n.attributes.selected_id,i=parseInt(r.nodeValue);e.termSelected(i),this._params.bShowTextType&&e._textTypesSelectControl.className.indexOf("selected")>=0&&(e._textTypesSelectControl.className=e._textTypesSelectControl.className.replace("selected",""))}catch(e){}},this._termlistElement.onmouseover=function(t){t.preventDefault(),t.stopPropagation();try{e._texttypelistElement&&(e._texttypelistElement.style.visibility="hidden");var n=t.target.parentNode,r=n.attributes.selected_id,i=parseInt(r.nodeValue);e.focusTo(i),this._params.bShowTextType&&e._textTypesSelectControl.className.indexOf("selected")>=0&&(e._textTypesSelectControl.className=e._textTypesSelectControl.className.replace("selected",""))}catch(e){}}},refresh:function(){this.getTerms()},ensureFocus:function(){$(".termservice_list").scrollTop(0),this.current()||this._termlistElement.firstChild&&(this._termlistElement.firstChild.className="termservice_selected",this.showTranslation4Term(this._termlistElement.firstChild,!0))},current:function(){for(var e=this._termlistElement.childNodes,t=0;t=t.length)){var n=this.current();void 0!==n&&(n.className=" ");var r=t[e];r.className="termservice_selected";var i=-1;if(void 0!==n){var o=n.attributes.selected_id;i=parseInt(o.nodeValue)}i!==e&&this.showTranslation4Term(r)}},focusNext:function(){var e=this._termlistElement.childNodes;if(!(void 0===e||e.length<=0||this._terms.length<=0)){var t=this.current();if(void 0!==t){t.className=" ";var n=t.nextSibling||t.parentNode.firstChild;if(n.className="termservice_selected",n===t.parentNode.firstChild)$(".termservice_list").scrollTop(0);else{var r=$(".termservice_list").scrollTop(),i=[].indexOf.call(n.parentNode.childNodes,n);i*this._rowHeight-r>=this._rows*this._rowHeight&&$(".termservice_list").scrollTop(r+this._rowHeight)}this.showTranslation4Term(n)}else this.focusTo(0)}},focusPrev:function(){var e=this._termlistElement.childNodes;if(!(void 0===e||e.length<=0||this._terms.length<=0)){var t=this.current();if(void 0!=t){t.className=" ";var n=t.previousSibling||t.parentNode.lastChild;if(n.className="termservice_selected",n===t.parentNode.lastChild)t.parentNode.childNodes.length>=this._rows?$(".termservice_list").scrollTop((t.parentNode.childNodes.length-this._rows)*this._rowHeight):$(".termservice_list").scrollTop(0);else{var r=[].indexOf.call(t.parentNode.childNodes,n),i=$(".termservice_list").scrollTop();r*this._rowHeight0&&(o.translations=e[0].translations,n.showTranslationValue(o.translations,i,t))},function(e){alert(e)}).done()}n._timeout4Translation=null}},100)},showTranslationValue:function(e,t,n){e&&e.length>0&&e.sort(function(e,t){return e.language.localeCompare(t.language)}),this._service.context.event.fireTranslated({text:this._searchText,terms:this._terms,index:t,refresh:n}).done()},textTypeFocusTo:function(e){this._focusedTextType=e;var t=this._texttypelistElement.childNodes;if(!(void 0===t||t.length<=0||void 0===e)){for(var n=0;n0&&(t.translations=e[0].translations,n._callback&&n._callback(n._params.oKeyValue,t))},function(e){n._callback&&n._callback(n._params.oKeyValue,t)}).done()}}else i=$(".termservice_textbox")[0].value,o={},o.id=void 0,o.value=i,o.domainId=this._domain,o.texttypeId=this.service.getCurrentTextType(),o.availableLanguages=0,o.translations=null,this.hideTermUI(),this._callback&&this._callback(this._params.oKeyValue,o)}else t=this._terms[e],t.translations?(this.hideTermUI(),this._callback&&this._callback(this._params.oKeyValue,t)):(n.hideTermUI(),u={},u.key="TEST_KEY",u.value=t.value,u.textType=t.texttypeId,c=[],c.push(u),this._service.getTranslations(c).then(function(e){e&&e.length>0&&(t.translations=e[0].translations,n._callback&&n._callback(n._params.oKeyValue,t))},function(e){n._callback&&n._callback(n._params.oKeyValue,t)}).done())},termCancelled:function(){this.hideTermUI(),this._callback&&this._callback()},loadCSS:function(e){var t=$("");$("head").append(t)}}),define("sap.watt.platform.translation/ui/TranslationServiceUI",{getTranslationLanguageUI:function(e,t){var n,r,i;if("undefined"==typeof this._oTLDialog){r=new sap.ui.model.json.JSONModel,i={filename:e,locale:{id:"en",name:"English"},locales:t,deferred:Q.defer()},r.setData(i),n=new sap.ui.commons.Dialog({title:"Choose Translation Language",showCloseButton:!0,modal:!0}),n.setModel(r),this._oTLDialog=n,this._addCell=function(e,t){var n=new sap.ui.commons.layout.MatrixLayoutCell;n.addContent(t),e.addCell(n)};var o=new sap.ui.commons.layout.MatrixLayout,a=new sap.ui.commons.layout.MatrixLayoutRow,s=new sap.ui.commons.Label({text:"Filename:"});this._addCell(a,s);var u=new sap.ui.commons.TextView({text:"{/filename}"});this._addCell(a,u),o.addRow(a),a=new sap.ui.commons.layout.MatrixLayoutRow,s=new sap.ui.commons.Label({text:"Language:"}),this._addCell(a,s),u=new sap.ui.commons.TextView({text:"{/locale/name}"}),this._addCell(a,u),o.addRow(a),a=new sap.ui.commons.layout.MatrixLayoutRow,s=new sap.ui.commons.Label({text:"Translate to:"}),this._addCell(a,s);var c=new sap.ui.core.ListItem({key:"{id}",text:"{name}"}),l=new sap.ui.model.Sorter("name"),p=new sap.ui.commons.ComboBox({items:{path:"/locales",template:c,sorter:l}});p.attachChange(p,function(e,t){i.targetLocale=t.getSelectedKey();var n=""===i.targetLocale,r=n?sap.ui.core.ValueState.Error:sap.ui.core.ValueState.None;f.setEnabled(!n),t.setValueState(r)}),this._addCell(a,p),o.addRow(a),a=new sap.ui.commons.layout.MatrixLayoutRow,o.addRow(a),n.addContent(o);var f=new sap.ui.commons.Button({text:"Accept"}).attachPress(p,function(e,t){i.targetLocale=t.getSelectedKey(),n.close()}).setEnabled(!1);n.addButton(f),n.addButton(new sap.ui.commons.Button({text:"Cancel"}).attachPress(function(){i.targetLocale="",n.close()})),n.attachClosed(function(){""!==i.targetLocale?i.deferred.resolve(i.targetLocale):i.deferred.reject()},this)}else n=this._oTLDialog,r=n.getModel(),i=r.getData(),i.filename=e,i.targetLocale="",i.deferred=Q.defer(),r.refresh();return n.open(),i.deferred.promise},confirmTranslationUI:function(e,t){var n,r,i,o;return"undefined"==typeof this._oConfirmDialog?(r=new sap.ui.model.json.JSONModel,i={rows:t,locale:e,targets:[],deferred:Q.defer()},r.setData(i),n=new sap.ui.commons.Dialog({title:"Confirm Translation",showCloseButton:!0,modal:!0}),n.setModel(r),n.addStyleClass("wattTranslationConfirm"),this._oConfirmDialog=n,o=sap.ui.xmlfragment("sap.watt.platform.plugin.translation.ui.propertyList",this),o.bindRows("/rows"),n.addContent(o),o.onBeforeRendering=function(){o.selectAll()},n.addButton(new sap.ui.commons.Button({text:"Accept"}).attachPress(function(){i.targets=o.getSelectedIndices(),n.close()},this)),n.addButton(new sap.ui.commons.Button({text:"Cancel"}).attachPress(function(){n.close()})),n.attachClosed(function(){0translation_add_dialog_i18nFile_path}"})}),new sap.ui.commons.layout.MatrixLayoutCell({padding:sap.ui.commons.layout.Padding.Begin,vAlign:sap.ui.commons.layout.VAlign.Middle,id:"oI18nPathFieldsEdit",content:new sap.ui.commons.TextField({enabled:!1,value:"{/property/i18nFilePath}",width:"100%"})})]}),T=new sap.ui.commons.layout.MatrixLayoutRow({height:"40px",cells:[new sap.ui.commons.layout.MatrixLayoutCell({padding:sap.ui.commons.layout.Padding.End,vAlign:sap.ui.commons.layout.VAlign.Middle,content:new sap.ui.commons.Label({text:"{i18n>translation_add_dialog_i18nModel_name}"})}),new sap.ui.commons.layout.MatrixLayoutCell({padding:sap.ui.commons.layout.Padding.Begin,vAlign:sap.ui.commons.layout.VAlign.Middle,id:"oI18nModelNameEdit",content:new sap.ui.commons.TextField({enabled:!1,value:"{/property/modelName}",width:"100%"})})]});else if(p)var C=new sap.ui.commons.layout.MatrixLayoutRow({height:"40px",cells:[new sap.ui.commons.layout.MatrixLayoutCell({padding:sap.ui.commons.layout.Padding.End,vAlign:sap.ui.commons.layout.VAlign.Middle,content:new sap.ui.commons.Label({text:"{i18n>translation_add_dialog_i18nFile_path}"})}),new sap.ui.commons.layout.MatrixLayoutCell({padding:sap.ui.commons.layout.Padding.Begin,vAlign:sap.ui.commons.layout.VAlign.Middle,content:new sap.ui.commons.DropdownBox({id:"oI18nPathFields",displaySecondaryValues:!0,items:{path:"i18nFiles",template:new sap.ui.core.ListItem({text:"{fullPath}"})},change:[{context:f,model:b,existingKeys:c},s],value:"{/property/i18nFilePath}",maxPopupItems:5,width:"100%"})})]}),T=new sap.ui.commons.layout.MatrixLayoutRow({height:"40px",cells:[new sap.ui.commons.layout.MatrixLayoutCell({padding:sap.ui.commons.layout.Padding.End,vAlign:sap.ui.commons.layout.VAlign.Middle,content:new sap.ui.commons.Label({text:"{i18n>translation_add_dialog_i18nModel_name}"})}),new sap.ui.commons.layout.MatrixLayoutCell({padding:sap.ui.commons.layout.Padding.Begin,vAlign:sap.ui.commons.layout.VAlign.Middle,id:"oI18nModelName",content:new sap.ui.commons.TextField({enabled:!1,value:"{modelName}",width:"100%"})})]});var D=[new sap.ui.commons.layout.MatrixLayoutRow({height:"40px",cells:[new sap.ui.commons.layout.MatrixLayoutCell({padding:sap.ui.commons.layout.Padding.End,vAlign:sap.ui.commons.layout.VAlign.Middle,content:new sap.ui.commons.Label({text:"{i18n>translation_add_dialog_text_key}"})}),new sap.ui.commons.layout.MatrixLayoutCell({padding:sap.ui.commons.layout.Padding.Begin,vAlign:sap.ui.commons.layout.VAlign.Middle,content:w})]}),new sap.ui.commons.layout.MatrixLayoutRow({height:"40px",cells:[new sap.ui.commons.layout.MatrixLayoutCell({padding:sap.ui.commons.layout.Padding.End,vAlign:sap.ui.commons.layout.VAlign.Middle,content:new sap.ui.commons.Label({text:"{i18n>translation_add_dialog_text_value}"})}),new sap.ui.commons.layout.MatrixLayoutCell({padding:sap.ui.commons.layout.Padding.Begin,vAlign:sap.ui.commons.layout.VAlign.Middle,content:E})]}),new sap.ui.commons.layout.MatrixLayoutRow({height:"40px",cells:[new sap.ui.commons.layout.MatrixLayoutCell({padding:sap.ui.commons.layout.Padding.End,vAlign:sap.ui.commons.layout.VAlign.Middle,content:new sap.ui.commons.Label({text:"{i18n>translation_add_dialog_text_type}"})}),new sap.ui.commons.layout.MatrixLayoutCell({padding:sap.ui.commons.layout.Padding.Begin,vAlign:sap.ui.commons.layout.VAlign.Middle,content:S})]}),new sap.ui.commons.layout.MatrixLayoutRow({height:"40px",cells:[new sap.ui.commons.layout.MatrixLayoutCell({padding:sap.ui.commons.layout.Padding.Begin,vAlign:sap.ui.commons.layout.VAlign.Bottom,content:new sap.ui.commons.Label({text:"{i18n>translation_add_dialog_text_extra_info}"})})]}),new sap.ui.commons.layout.MatrixLayoutRow({cells:[new sap.ui.commons.layout.MatrixLayoutCell({colSpan:2,padding:sap.ui.commons.layout.Padding.Begin,vAlign:sap.ui.commons.layout.VAlign.Middle,content:new sap.ui.commons.TextArea({value:"{/property/extraInfo}",width:"100%",height:"100px"})})]})],A=new sap.ui.commons.Dialog("translation_add_dialog",{title:"{i18n>translation_add_dialog_title}",resizable:!1,modal:!0,content:new sap.ui.commons.layout.MatrixLayout({width:"100%",height:"100%",widths:["30%","auto"],rows:[C,T,D]}),buttons:[new sap.m.Button("newI18nOkButton",{type:sap.m.ButtonType.Emphasized,text:"{i18n>translation_add_dialog_ok}",enabled:"{/ready}",press:m}),new sap.m.Button({text:"{i18n>translation_add_dialog_Cancel}",press:g})],width:"350px",closed:v}).bindElement("/").setModel(b).addStyleClass("translation_AddI18nDialog").addStyleClass("sapUiSizeCompact").addEventDelegate({onAfterRendering:function(){var e=sap.ui.getCore().byId("oI18nPathFields");if(e){var t=e.getItems()[0];e.fireEvent("change",{selectedItem:t})}}});return n.applyTo(A),o(S),A.open(),_.promise}};return c}),define("sap.watt.platform.translation/service/TranslationImpl",["../ui/TermServiceUI","../ui/TranslationServiceUI","sap/watt/lib/lodash/lodash","../ui/AddDialogUI"],function(e,t,n,r){return{_sTextType:void 0,_oTermsUI:void 0,_sFilePrefix:void 0,_oSourceLanguage:void 0,_oTargetLanguages:void 0,_sUUID:void 0,_oTranslationUI:void 0,_oi18nEntry:void 0,_oFileService:void 0,_oTranslationProjectInfo:{},_keyStorageSrv:null,ERROR_FOLDER_NOT_EXIST:"The folder {0} doesn't exist",ERROR_FILE_NOT_EXIST:"The file {0} doesn't exist",ERROR_FILE_EXIST:"The file {0} already exists",ERROR_KEY_NOT_EXIST:"The key {0} doesn't exists",ERROR_KEY_EXIST:"The key {0} already exists",X_CSRF_token:"",init:function(){void 0===this._oFileService&&(this._oFileService=this.context.service.filesystem.documentProvider)},configure:function(e){this._aStyles=e.styles,this._aStyles&&this.context.service.resource.includeStyles(this._aStyles).done(),this._keyStorageSrv=e.keyStorage?e.keyStorage[0].service:{},this.oGitDispatcherService=e.gitDispatcher?e.gitDispatcher[0].service:{}},getGitDispatcherService:function(){return this.oGitDispatcherService},getDomains:function(e){var t=Q.defer(),n="/translation/api/v1/domains";return e&&(n+="?onlyGroups=true"),$.ajax({type:"Get",url:n}).then(function(e){t.resolve(e)},function(e,n,r){var i=new Error;i.status=e.status,i.errorThrown=r,t.reject(i)}),t.promise},getTextTypes:function(){return $.ajax({type:"Get",url:"/translation/api/v1/texttypes"})},getTemplateTextTypes:function(){return{templates:[{prefix:"breadcrumbstep",description:"Breadcrumb step",template:"#XBCB"},{prefix:"bulletlistitem",description:"Bullet list item text",template:"#XBLI"},{prefix:"button",description:"Button text",template:"#XBUT"},{prefix:"checkbox",description:"Checkbox",template:"#XCKL"},{prefix:"columnheader",description:"Column header",template:"#XCOL"},{prefix:"label",description:"Label",template:"#XFLD"},{prefix:"heading",description:"Heading",template:"#XHED"},{prefix:"hyperlink",description:"Hyperlink text",template:"#XLNK"},{prefix:"logentry",description:"Log entry",template:"#XLOG"},{prefix:"listbox",description:"List box item",template:"#XLST"},{prefix:"menuitem",description:"Menu item",template:"#XMIT"},{prefix:"messagetext",description:"Message text",template:"#XMSG"},{prefix:"radio",description:"Radiobutton",template:"#XRBL"},{prefix:"selectiontext",description:"Selection text",template:"#XSEL"},{prefix:"tab",description:"Tab strip text",template:"#XTBS"},{prefix:"tableTitle",description:"Table Title",template:"#XTIT"},{prefix:"treenode",description:"Tree node text",template:"#XTND"},{prefix:"quickInfo",description:"Quick info text",template:"#XTOL"},{prefix:"generaltext",description:"General text",template:"#XTXT"},{prefix:"messagetextlong",description:"Message text (long)",template:"#YMSG"},{prefix:"generaltextlong",description:"General text long",template:"#YTXT"}]}},getI18nRemoteValues:function(e,t){var n=this;return n.getCurrentDomain(t).then(function(t){return n.getTerms(e,t,n.getCurrentTextType())})},openAddEntryDialogForEditingI18n:function(e,t){var n=this;if(e.length>1)var i=e;return r.openAddEntryDialog(n.context.i18n,"",n.getTemplateTextTypes().templates,i,n.context,e[0]).then(function(e){if(e)return n.updatePropertyKey("",e.modelPath,e,t)})},openAddEntryDialogForI18nFiles:function(e,t){var i=this,o=e[0].fullPath,a=o.substring(o.indexOf("/i18n/")+"/i18n/".length,o.indexOf(".properties"));return this.getAllPropertyKeys("",a,t).then(function(o){return r.openAddEntryDialog(i.context.i18n,n.map(o,"key"),i.getTemplateTextTypes().templates,e,i.context,void 0,t).then(function(e){if(e&&"key"in e&&"value"in e&&"textType"in e&&"extraInfo"in e&&"i18nFilePath"in e)return i.context.service.document.getDocumentByPath(e.i18nFilePath).then(function(t){var n=Q.defer();return i._saveProperties(t,[e],n),n.promise}).then(function(){return e})})})},openAddEntryDialog:function(e,t,i){var o=this;return this.getAllPropertyKeys(e,t,i).then(function(e){return r.openAddEntryDialog(o.context.i18n,n.map(e,"key"),o.getTemplateTextTypes().templates)}).then(function(n){if(n)return o.context.service.usagemonitoring.report("translation","add_i18n_key_onOK").done(),o.updatePropertyKey(e,t,n,i)})},setCurrentDomain:function(e,t){var n="";e&&e.id&&(n=e.id);var r=this.context.service.setting.project,i=this.context.self;return r.get(this.context.service.translation,t).then(function(e){var o={};return e&&(o=e),o.translationDomain=n,null!=o.supportedLanguages&&""!==o.supportedLanguages||(o.supportedLanguages="en,fr,de"),null!=o.defaultLanguage&&""!==o.defaultLanguage||(o.defaultLanguage="en"),null!=o.defaultI18NPropertyFile&&""!==o.defaultI18NPropertyFile||(o.defaultI18NPropertyFile="i18n.properties"),null!=o.resourceModelName&&""!==o.resourceModelName||(o.resourceModelName="i18n"),r.set(i,o,t)})},onAfterGenerate:function(e){"project"!==e.params.selectedTemplate.getType()&&"Fiori_project"!==e.params.selectedTemplate.getType()||this.setCurrentDomain(e.params.model.domain,e.params.targetDocument).done()},getCurrentTextType:function(){return this._sTextType},setCurrentTextType:function(e){e&&""!==e?this._sTextType=e:this._sTextType=""},getTerms:function(e,t,r){var i=this,o=Q.defer();if(void 0===e||null==e||""===e)return setTimeout(function(){o.resolve([])},50),o.promise;var a=r||i.getCurrentTextType();""!==t&&"@ALL@"!==t||(t=void 0),""!==a&&"@ALL@"!==a||(a=void 0);var s=encodeURIComponent(e),u="/translation/api/v1/suggestions?search="+s;return t&&(u=u+"&domain="+t.toUpperCase()),a&&(u=u+"&texttype="+a.toUpperCase()),$.ajax({type:"Get",url:u}).then(function(e){var t=e.suggestions;e.suggestions=n.uniqBy(t,function(e){return e.value}),o.resolve(e)},function(){o.resolve([])}),o.promise},showGetTermsUI:function(t,n,r,i,o,a,s){var u=this;return this._callback=t,this._getModelKey(n).then(function(t){var c={},l=s?s.document:null;return t?(c.sModel=t.sModel,c.sKey=t.sKey,u.getPropertyKey(void 0,c.sModel,c.sKey,l).then(function(t){return t?(c.sValue=t.value,u._oTermsUI=e,u.getCurrentDomain(l).then(function(e){return u._oTermsUI.showTermsUI(function(e,t){u._termSelected(e,t,l)},u,c,r,e,i,u.getCurrentTextType(),o,a,s)})):void(this._callback&&this._callback(null).done())})):Q.all([u.getCurrentModel(l),u.getCurrentDomain(l)]).spread(function(t,p){c.sModel=t,c.sKey=null,c.sValue=n,u._oTermsUI=e,u._oTermsUI.showTermsUI(function(e,t){u._termSelected(e,t,l)},u,c,r,p,i,u.getCurrentTextType(),o,a,s)})})},getCurrentModel:function(e){var t=this,n="i18n",r=this.context.service.setting.project;return r.get(this.context.service.translation,e).then(function(e){if(e&&e.defaultI18NPropertyFile){var r=e.defaultI18NPropertyFile,i=r.indexOf(".");i>0&&(t._sFilePrefix=r.substring(0,i),n=t._sFilePrefix)}return e&&e.resourceModelName&&(n=e.resourceModelName),n}).fail(function(){return n})},getCurrentDomain:function(e){return this._getProjectSettingsProperty("translationDomain","BC",e)},_getProjectSettingsProperty:function(e,t,n){var r=this.context.service.setting.project;return r.get(this.context.service.translation,n).then(function(n){return n&&n.hasOwnProperty(e)?n[e]:t}).fail(function(){return t})},_getCurrentDomainObject:function(e){return this.getCurrentDomain().then(function(t){for(var n={id:"BC",name:"Basis"},r=0;r0)for(u=0;u0&&(n=t.lastIndexOf("_"),r=n<=0||n>0&&n===t.length-1)),this._sFilename=r?t:"",r},_saveProperties:function(e,t,r){var i=this;e.getContent().then(function(o){var a,s,u,c,l=o.indexOf("\r\n")>=0?"\r\n":"\n";if(t){for(a=0,s=t.length;a=0?c.oLines[c.iCommentline]="#"+u.textType+f+": "+p:c.oLines.splice(c.iKeyline,0,"#"+u.textType+f+": "+p);else{p=u.extraInfo?u.extraInfo:"",c.oLines.push(" ");var d=u.textType?"#"+u.textType+f+": "+p:"#XMSG: "+p;c.oLines.push(d),c.oLines.push(u.key+"="+u.value)}o=c.oLines.join(l)}e.setContent(o).done(function(){e.save().then(function(){r.resolve(e)},function(e){r.reject(e)})})}else r.reject("aProperties is not defined")},function(e){r.reject(e)}).done()},updatePropertyKeys:function(e,t,n,r,i){var o=this,a=Q.defer();if(r){var s=i===!0?Q(r):this._getI18NFolderEntry(r);s.then(function(r){o._getPropertyFileEntry(r,e,t).then(function(i){i?o._saveProperties(i,n,a):o._createOnePropertyFile(r,e,t).then(function(e){o._saveProperties(e,n,a)},function(e){a.reject(e)})},function(e){a.reject(e)})},function(e){a.reject(e)})}else a.reject("oDocument is not defined");return a.promise},updatePropertyKey:function(e,t,n,r){if(n&&"key"in n&&"value"in n&&"textType"in n&&"extraInfo"in n)return this.updatePropertyKeys(e,t,[n],r);var i=new Error("The oProperty that provided is malformed (missing required attributes)");throw i.name="TranslationImplSrvOPropIsMalformed",i},getAllPropertyKeys:function(e,t,r){var i=this,o=Q.defer();return this._getI18NFolderEntry(r).then(function(r){i._getPropertyFileEntry(r,e,t).then(function(e){e?e.getContent().then(function(e){var t=[],r=e.replace(/\r\n/g,"\n"),i=r.split("\n");if(i)for(var a=0;a0){var u=s.replace(/\s+=/g,"=").replace(/=\s+/g,"=").split("="),c={};c.key=u[0];var l=u[1].split(/\/\//);if(c.value=l[0],a>0){var p=i[a-1];if("#"===p.substring(0,1)){var f=p.split(":"),d=f[0].split(",");d.length>1&&(c.maxLength=d[1]),c.textType=d[0].replace(/\W/g,""),f.length>0&&(c.extraInfo=f[1])}}t.push(c)}}o.resolve(t)},function(){o.resolve(null)}):o.resolve(null)},function(){o.resolve(null)})},function(){o.resolve(null)}),o.promise},getPropertyKey:function(e,t,n,r){var i=this,o=Q.defer();return this._getI18NFolderEntry(r).then(function(r){i._getPropertyFileEntry(r,e,t).then(function(e){e?e.getContent().then(function(e){var t=i._findPropKey(e,n);if(t&&t.iKeyline!==-1){var r=null;r={};var a=t.oLines[t.iKeyline];if(a){var s=a.replace(/\s+=/g,"=").replace(/=\s+/g,"=").split("=");if(r.key=s[0],r.value=s[1].split(/\/\//)[0],t.iCommentline>=0){var u=t.oLines[t.iCommentline],c=u.split(":"),l=c[0].split(",");l.length>1&&(r.maxLength=l[1]),r.textType=l[0].replace(/\W/g,""),c.length>0&&(r.extraInfo=c[1])}o.resolve(r)}else o.resolve(null)}else o.resolve(null)},function(){o.resolve(null)}):o.resolve(null)},function(){o.resolve(null)})},function(){o.resolve(null)}),o.promise},deletePropertyKey:function(e,t,n,r){var i=this,o=Q.defer();return this._getI18NFolderEntry(r).then(function(r){i._getPropertyFileEntry(r,e,t).then(function(e){e.getContent().then(function(t){var r=i._findPropKey(t,n);r?(r.oLines.splice(r.iKeyline,1),r.iCommentline>=0&&r.oLines.splice(r.iCommentline,1)):o.reject(i._errorMessage(i.ERROR_KEY_NOT_EXIST,n));var a="\n";t.indexOf("\r\n")>=0&&(a="\r\n");var s=r.oLines.join(a);e.setContent(s).then(function(){e.save().then(function(){o.resolve(e)},function(){o.resolve(null)})})},function(){o.resolve(null)})},function(){o.resolve(null)})},function(){o.resolve(null)}),o.promise},_errorMessage:function(e,t){return MessageFormat.format(e,t)},_getI18NFolderEntry:function(e){var t=this;return this._getSelectedDocument(e).then(function(e){return t._getI18nFolderName(e).then(function(n){if(e)return t._getRootContent(e).then(function(r){var i=t._getFolders(r,"webapp");return i&&i.length>0?t._handleFolderExistence(r,i[0],n,"webapp"):t._handleWebappFolderAbsent(r,e,n)})})})},_getI18nFolderName:function(e){return this._getProjectSettingsProperty("resourceModelName","i18n",e)},_getSelectedDocument:function(e){var t=null;if(!e){var n=this.context.service.selection;return n.getSelection().then(function(e){var t=e[0];if(t&&t.document)return t.document})}return t=e,Q(t)},_getRootContent:function(e,t){return t?e.getCurrentMetadata(!0):this._getRootProject(e).then(function(e){return e.getCurrentMetadata(!0)})},_getFolders:function(e,t){var r=[];return e&&t&&(r=n.filter(e,function(e){return e.name===t&&e.folder})),r},_getRootProject:function(e){var t=this;return e.getEntity().isRoot()?null:e.getParent().then(function(n){return n?n.getEntity().isRoot()?e:t._getRootProject(n):null})},_handleWebappFolderAbsent:function(e,t,n){var r=this._getFolders(e,"src");if(r&&r.length>0)return this._handleFolderExistence(e,r[0],n,"src");var i=this._getFolders(e,n);return i&&i.length>0?this._getI18RootFolder(t,i,n):this._createI18nOnRoot(t,n)},_handleFolderExistence:function(e,t,r){var i=this._getFolders(e,r),o=this;if(i&&i.length>0){var a=t.name,s=n.find(i,function(e){return e.path.indexOf(a)>-1&&e.folder});return s?this.context.service.filesystem.documentProvider.getDocument(s.path).then(function(e){return e}):this.context.service.filesystem.documentProvider.getDocument(t.path).then(function(e){return o._createI18nOnFolder(e,r)})}return this.context.service.filesystem.documentProvider.getDocument(t.path).then(function(e){return o._createI18nOnFolder(e,r)})},_getI18RootFolder:function(e,t,r){var i=this;return this._getRootProject(e).then(function(o){var a=null;return o&&(a=n.find(t,function(e){return e.path===o.getEntity().getFullPath()+"/"+r&&e.folder})),a?i.context.service.filesystem.documentProvider.getDocument(a.path).then(function(e){return e}):i._createI18nOnRoot(e,r)})},_createI18nOnFolder:function(e,t){return e&&t?e.createFolder(t).then(function(e){return e},function(){return null}):null},_createI18nOnRoot:function(e,t){var n=this;return this._getRootProject(e).then(function(e){return n._createI18nOnFolder(e,t)})},_getPropertyFileName:function(e,t){var n=this._sFilePrefix?this._sFilePrefix:e||"i18n";return t&&(n=n+"_"+t),n+=".properties"},_createOnePropertyFile:function(e,t,n){var r=this._getPropertyFileName(n,t);return e.createFile(r)},_getAbsolutePropertyFilePath:function(e,t,n){var r=this._getPropertyFileName(e,t),i=n?n.getEntity().getFullPath()+"/"+r:"";return i},_getPropertyFileEntry:function(e,t,n){var r=this._getAbsolutePropertyFilePath(n,t,e);return this._oFileService.getDocument(r).then(function(e){return e})},_findPropKey:function(e,t){var n,r={};if(r.oLines=[],r.iKeyline=-1,r.iCommentline=-1,!(e&&t&&t.trim()))return r;var i=e.replace(/\r\n/g,"\n"),o=i.split("\n");if(r.oLines=o,void 0===o||null==o||o.length<=0)return r;for(n=0;n0){var u=o[n-1].replace(/\s/g,"");"#"===u.substring(0,1)&&(r.iCommentline=n-1)}return r}}return r},_getModelKey:function(e){var t=Q.defer();return setTimeout(function(){if(e&&""!==e){var n=e.replace(/\s/g,""),r=n.substring(0,1),i=n.substring(n.length-1);if("{"===r&&"}"===i){var o=n.substring(1,n.length-1).split(">");if(o&&2===o.length){var a={};a.sModel=o[0],a.sKey=o[1],t.resolve(a)}else t.resolve(null); }else t.resolve(null)}else t.resolve(null)},500),t.promise},_generateNewUUID:function(){return"984084ea-ab4d-48e6-e800-49d3bf1e917b"},_generateNewKey:function(e,t){if(!e)return null;var n=e.replace(/\W/g,"_").replace("./g","_");return n.length>16&&(n=n.substring(0,16)),t&&0!==t&&(n=n+"_"+t),n},_callback:void 0,_termSelected:function(e,t,r){null==e&&null==t&&this._callback&&this._callback().done();var i=this,o={};(n.isEmpty(t.id)||0===t.id)&&(t.id=n.random(1e5,999999)),e.sKey?o.key=e.sKey:o.key=this._generateNewKey(t.value,t.id),o.value=t.value,o.textType=t.texttypeId,o.extraInfo=t.id+"("+t.domainName+"("+t.domainId+"))",this.updatePropertyKey("",e.sModel,o,r).then(function(){i._callback&&i._callback("{"+e.sModel+">"+o.key+"}")},function(){console.log("The returned text for Code Editor is: "+t.value),i._callback&&i._callback(t.value)}).done()},isShowPopup:function(){return!(!this._oTermsUI||!this._oTermsUI.isVisible())},generateTranslationFiles:function(e){this._oTranslationProjectInfo=e,this.sGitUrl=this._oTranslationProjectInfo.sGitUrl;var t=this;return this._getGISTUIData().then(function(e){if(e&&e.oStaticLanguageList&&e.oStaticLanguageList.languages&&e.oSupportedLanguages)for(var n,r=0;r0){var s=n.find(i,function(t){return t.applicationName===e});t.resolve(s.projectId)}else{var u=new Error(r.context.i18n.getText("i18n","xmg_translation_hub_get_project_request_failed"));u.errorThrown="",t.reject(u)}},function(e,n,i){var o=new Error(r.context.i18n.getText("i18n","xmg_translation_hub_request_failed"));o.status=e.status,o.errorThrown=i,t.reject(o)}),t.promise},createTranslationProject:function(e,t,r,i,o){var a=Q.defer(),s=this;n.startsWith(o,"/")&&(o=o.substring(1,o.length));var u={applicationName:e,branch:t,domain:r,languages:i,objectList:0,path2File:o,typeFile:0,typeScm:3};return $.ajax({type:"GET",url:"/translationHubBeta/api/v1/projects",dataType:"json",headers:{"X-CSRF-Token":"Fetch"}}).then(function(e,t,n){s.X_CSRF_token=n.getResponseHeader&&n.getResponseHeader("X-CSRF-Token"),$.ajax({type:"POST",url:"/translationHubBeta/api/v1/projects",data:JSON.stringify(u),dataType:"json",headers:{Accept:"application/json","Content-Type":"application/json; charset=utf-8","X-CSRF-Token":s.X_CSRF_token}}).then(function(e){var t=e.code;if(0===t){var n=e.params&&e.params.length>0?JSON.parse(e.params[0]).projectId:"";a.resolve(n)}else{var r=new Error(s.context.i18n.getText("i18n","xmg_translation_hub_create_project_request_failed",[e.message]));r.errorThrown=e.message,a.reject(r)}},function(e,t,n){var r=new Error;r.status=e.status,r.errorThrown=n,a.reject(r)})},function(e,t,n){var r=new Error;r.status=e.status,r.errorThrown=n,a.reject(r)}),a.promise},updateTranslationProject:function(e,t,r,i,o,a){var s=Q.defer(),u=this;n.startsWith(o,"/")&&(o=o.substring(1,o.length));var c={applicationName:e,branch:t,domain:r,languages:i,objectList:0,path2File:o,typeFile:0,typeScm:3};return $.ajax({type:"GET",url:"/translationHubBeta/api/v1/projects",dataType:"json",headers:{"X-CSRF-Token":"Fetch"}}).then(function(e,t,n){u.X_CSRF_token=n.getResponseHeader&&n.getResponseHeader("X-CSRF-Token"),$.ajax({type:"PUT",url:"/translationHubBeta/api/v1/projects/"+a,data:JSON.stringify(c),dataType:"json",headers:{Accept:"application/json","Content-Type":"application/json; charset=utf-8","X-CSRF-Token":u.X_CSRF_token}}).then(function(e){var t=e.code;if(0===t)s.resolve(t);else{var n=new Error(u.context.i18n.getText("i18n","xmg_translation_hub_create_project_request_failed",[e.message]));n.errorThrown=e.message,s.reject(n)}},function(e,t,n){var r=new Error;r.status=e.status,r.errorThrown=n,s.reject(r)})},function(e,t,n){var r=new Error;r.status=e.status,r.errorThrown=n,s.reject(r)}),s.promise},translatePropertiesFiles:function(e,t){var n=Q.defer(),r=this,i={operation:"gist",password:t,projectId:e};return $.ajax({type:"GET",url:"/translationHubBeta/api/v1/projects",dataType:"json",headers:{"X-CSRF-Token":"Fetch"}}).then(function(e,t,o){r.X_CSRF_token=o.getResponseHeader&&o.getResponseHeader("X-CSRF-Token"),$.ajax({type:"POST",url:"/translationHubBeta/api/v1/workflow ",data:JSON.stringify(i),dataType:"json",headers:{Accept:"application/json","Content-Type":"application/json; charset=utf-8","X-CSRF-Token":r.X_CSRF_token}}).then(function(e){var t=e.code;if(0===t)n.resolve(e.message);else{var i=new Error(r.context.i18n.getText("i18n","xmg_translation_hub_translation_project_request_failed",[e.message]));i.errorThrown=e.message,n.reject(i)}},function(e,t,r){var i=new Error;i.status=e.status,i.errorThrown=r,n.reject(i)})},function(e,t,r){var i=new Error;i.status=e.status,i.errorThrown=r,n.reject(i)}),n.promise},handleError:function(e){var t=e.message,n=e.status;n&&403===n?t=this.context.i18n.getText("i18n","xmg_translation_hub_request_forbiden"):n&&(t=this.context.i18n.getText("i18n","xmg_translation_hub_request_failed")),this.context.service.log.error("STH",this.context.i18n.getText("i18n","xmg_translation_hub_error",[e.errorThrown]),["user"]).done(),this.context.service.usernotification.alert(t).done()}}}),define("sap.watt.platform.translation/service/TranslationSettings",["sap/watt/platform/plugin/platform/service/ui/AbstractConfig"],function(e){"use strict";return e.extend("sap.watt.platform.plugin.translation.service.TranslationSettings",{_oContent:null,_oDomainDropdownBox:null,_oSelelctAllCheckBox:null,_oDropdownDefault:null,_oLenguageTable:null,_oTrData:{},_oDocumentByPath:null,_createEmptyModel:function(){return{translationDomain:"",supportedLanguages:"",defaultLanguage:"",defaultI18NPropertyFile:"",resourceModelName:""}},getCurrentSettings:function(e){var t=this,n=this.context.service;return this._getDocumentByPath(e).then(function(e){return t._oDocumentByPath=e,n.setting.project.get(n.translation,e).then(function(e){return e})})},getTranslationHubProjectId:function(e){return this.getCurrentSettings(e).then(function(e){return e.translationHubProjectId}).fail(function(){return null})},getProjectSettingLanguages:function(e){return this.getCurrentSettings(e).then(function(e){var t=e.supportedLanguages;return t?t.split(","):[]}).fail(function(){return[]})},getProjectSettingContent:function(e,t,n){var r=this,i=this.context.service;return this._getDocumentByPath(n).then(function(e){return r._oDocumentByPath=e,i.setting.project.get(i.translation,e).then(function(e){return r._oTrData.oSettings=e,r._oTrData.oSettings&&0!==r._oTrData.oSettings.length||(r._oTrData.oSettings=r._createEmptyModel()),r._oContent?(r._prepareData(),r._initModel(),r._oContent):r._getData().then(function(e){if(e)return r._oTrData.oStaticLanguageList=e.oStaticLanguageList,r._oTrData.oDomainsList=e.oDomainsList,r._oContent=r._createUI(),r._prepareData(),r._initModel(),r._oContent})}).fail(function(){return r._onErrorDataFetch(),r.context.service.log.error("project settings","Failed to load language settings",["user"]).done(),r._oContent})})},_getDocumentByPath:function(e){return this.context.service.document.getDocumentByPath(e)},_getData:function(){var e=this,t={},n=this.context.service.translation;return n.getLanguages().then(function(n){return t.oStaticLanguageList=n,e._fetchDomains().then(function(e){return t.oDomainsList=e,t}).fail(function(){return t})}).fail(function(){return e.getLanguages().then(function(n){return e._oTrData.bShowDomains=!1,t.oStaticLanguageList=n,t.oDomainsList={domains:[]},t}).fail(function(){e.context.service.log.error("project settings","Error while fetching data for languages",["user"]).done()})})},_fetchDomains:function(){var e=this;return e.context.service.translation.getDomains(!0).then(function(e){return e}).fail(function(){return e.context.service.log.error("project settings","Error while fetching data for domains!",["user"]).done(),[]})},getLanguages:function(){var e=[],t="resources/sap/watt/platform/plugin/translation/languages/languageList.json";return Q.sap.ajax(t).then(function(t){if(t[0]){var n;n="string"==typeof t[0]?JSON.parse(t[0]):t[0];var r=n.languages;for(var i in r)e.push({id:i,name:r[i]})}return{languages:e}})},_initModel:function(){var e=this._oContent.getModel();e.setProperty("/oTrData",this._oTrData)},_prepareData:function(){this._oTrData.oDomain=this._getDomainObjFromSettings(),this._oTrData.aLanguageList=this._createLanguageList(),this._setSupportedLanguages(),this._oTrData.oDefault=this._getDefaultObjFromSettings(),this._oTrData.aDefaultList=this._getDefaultListFromSettings(),this._oTrData.sTristateState=this._getTristateInitialState(),this._oTrData.bDefaultEditable=0!==this._oTrData.aDefaultList.length},_onErrorDataFetch:function(){this._oContent||(this._oContent=this._createUI()),this._oDomainDropdownBox.setEnabled(!1),this._oDropdownDefault.setEnabled(!1),this._oSelelctAllCheckBox.setEnabled(!1),this._oLenguageTable.setEditable(!1),this._oLenguageTable.setVisibleRowCount(5)},_createLanguageList:function(){var e=this._oTrData.oStaticLanguageList.languages,t=[],n=!1,r=e.map(function(e){return e.id}).indexOf("en_us_sappsd");r>=0&&(n=!0),!n&&sap.watt.getEnv("internal")&&t.push({selected:!1,languageName:"2Q",languageId:"en_us_sappsd"});for(var i=0;i=0?{id:t[n].id,name:t[n].name}:{id:"",name:""}},_getDefaultObjFromSettings:function(){var e=this._oTrData.oSettings.defaultLanguage,t=this._oTrData.oSettings.supportedLanguages;!e&&t&&(e=t.split(",")[0],this._oTrData.oSettings.defaultLanguage=e),this.context.service.setting.project.set(this.context.service.translation,this._oTrData.oSettings,this._oDocumentByPath).done();var n=this._oTrData.aLanguageList,r=n.map(function(e){return e.languageId}).indexOf(e);return r>=0?{id:n[r].languageId,name:n[r].languageName}:{id:"",name:""}},_getDefaultListFromSettings:function(){for(var e=[],t=this._oTrData.aLanguageList,n=0;n=0&&(e._oTrData.aLanguageList[a].selected=!0)}},saveTranslationHubNewSetting:function(e,t,n,r){var i=this;return this.getCurrentSettings(e).then(function(o){return o.supportedLanguages=t,o.translationDomain=n,o.translationHubProjectId=r,i._getDocumentByPath(e).then(function(e){return i.context.service.setting.project.set(i.context.service.translation,o,e).then(function(){return!0})})})},_getTristateInitialState:function(){return 0===this._oTrData.aDefaultList.length?"Unchecked":this._oTrData.aDefaultList.length===this._oTrData.aLanguageList.length?"Checked":"Mixed"},saveProjectSetting:function(e,t,n){var r=this._oContent.getModel(),i=r?r.getProperty("/oTrData/oSettings"):null;if(i){var o=r.getProperty("/oTrData/oDomain/id");i.translationDomain=o;for(var a=r.getProperty("/oTrData/aLanguageList"),s="",u=0;u=0&&!t[r].selected&&(n.length>0?this._oContent.getModel().setProperty("/oTrData/oDefault",{id:n[0].id,name:n[0].name}):this._oContent.getModel().setProperty("/oTrData/oDefault",{id:"",name:""}))},_updateDefaultDropBoxState:function(){var e=this._oContent.getModel().getProperty("/oTrData/aDefaultList");0===e.length?this._oContent.getModel().setProperty("/oTrData/bDefaultEditable",!1):this._oContent.getModel().setProperty("/oTrData/bDefaultEditable",!0)},_registerChildren:function(e){for(var t=this._oContent.getModel().getProperty("/oTrData/aLanguageList"),n=0,r=0;rtlt_selectAll}",hAlign:"Center"})),this._oLenguageTable.addColumn(new sap.ui.table.Column({label:new sap.ui.commons.Label({text:"{i18n>lbl_availableLanguages}"}),template:(new sap.ui.commons.Label).bindProperty("text","languageName"),width:"300px",sortProperty:"languageName",filterProperty:"languageName"}));var t=new sap.ui.commons.Label({text:"{i18n>lbl_defaultLanguage}"});this._oDropdownDefault=new sap.ui.commons.DropdownBox({value:"{/oTrData/oDefault/name}",editable:"{/oTrData/bDefaultEditable}",change:[this._onDefaultSelected,this],width:"100%"});var n=new sap.ui.core.ListItem;n.bindProperty("text","name"),n.bindProperty("key","id"),this._oDropdownDefault.bindItems("/oTrData/aDefaultList",n);var r=new sap.ui.layout.form.SimpleForm("sf1",{layout:sap.ui.layout.form.SimpleFormLayout.ResponsiveGridLayout,emptySpanL:4,emptySpanM:2,emptySpanS:1,columnsL:1,labelSpanL:2,labelSpanM:3,maxContainerCols:1,content:[new sap.ui.commons.Label,new sap.ui.commons.TextView({text:"",visible:"{/oTrData/bShowDomains}"}),new sap.ui.commons.Label({text:"{i18n>lbl_applicationDomain}"}),this._oDomainDropdownBox,new sap.ui.commons.Label,new sap.ui.commons.TextView({text:""}),new sap.ui.commons.Label({text:"{i18n>lbl_selectLanguages}",tooltip:"{i18n>tlt_selectLanguages}"}),this._oLenguageTable,new sap.ui.commons.Label,new sap.ui.commons.TextView({text:""}),t,this._oDropdownDefault]}),i=new sap.ui.model.json.JSONModel;return r.setModel(i),this.context.i18n.applyTo(r),r}})}),define("sap.watt.platform.content/command/ContentCommand",[],function(){"use strict";function e(){}return e.prototype={isAvailable:function(){return Q.spread([this.context.service.perspective.getPerspectivesForService(this.context.service.content),this.context.service.perspective.getCurrentPerspective()],function(e,t){return e.indexOf(t)!==-1})}},e}),define("sap.watt.platform.content/command/ContentTabRelatedCommand",["./ContentCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.isAvailable=function(){return e.prototype.isAvailable.call(this).then(function(e){return!!e&&this.context.service.selection.getOwner().then(function(e){return e.instanceOf("sap.watt.common.service.editor.Editor")})}.bind(this))},t}),define("sap.watt.platform.content/command/Close",["./ContentTabRelatedCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.isEnabled=function(){return this.context.service.content.getDocumentCount().then(function(e){return e>0})},t.prototype.execute=function(){var e=this.context.service.content;return e.getContextTab().then(function(t){return t?e.close(t.document,t.editor):e.close()})},t}),define("sap.watt.platform.content/command/CloseAll",["./ContentCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.isEnabled=function(){return this.context.service.content.getDocumentCount().then(function(e){return e>0})},t.prototype.execute=function(){return this.context.service.content.closeAll()},t}),define("sap.watt.platform.content/command/CloseOthers",["./ContentTabRelatedCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.isEnabled=function(){return this.context.service.content.getDocumentCount().then(function(e){return e>1})},t.prototype.execute=function(){var e=this.context.service.content;return e.getContextTab().then(function(t){return e.closeOthers(t.document,t.editor)})},t}),define("sap.watt.platform.content/command/CloseTabsToTheRight",["./ContentTabRelatedCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.isEnabled=function(){var e=this.context.service.content,t=[e.getDocumentCount(),e.getContextTab()];return Q.spread(t,function(e,t){return t.index1})},t.prototype.execute=function(){return this.context.service.content.openRightTab()},t}),define("sap.watt.platform.content/command/OpenLeftTab",["./ContentCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.isEnabled=function(){return this.context.service.content.getDocumentCount().then(function(e){return e>1})},t.prototype.execute=function(){return this.context.service.content.openLeftTab()},t}),define("sap.watt.platform.content/command/MaximizeActiveEditor",["./ContentCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.isAvailable=function(){var t=this,n=this.context.service.perspective;return e.prototype.isAvailable.apply(this,arguments).then(function(e){return!!e&&n.getAreaForService(t.context.service.content).then(function(e){return n.isAreaMaximized(e)}).then(function(e){return!e})})},t.prototype.isEnabled=function(){return this.context.service.content.getDocumentCount().then(function(e){return e>0})},t.prototype.execute=function(){var e=this.context.service.perspective;return e.getAreaForService(this.context.service.content).then(function(t){return e.setAreaMaximized(t,!0)})},t}),define("sap.watt.platform.content/command/RestoreActiveEditor",["./ContentCommand"],function(e){"use strict";function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.isAvailable=function(){var t=this,n=this.context.service.perspective;return e.prototype.isAvailable.apply(this,arguments).then(function(e){return!!e&&n.getAreaForService(t.context.service.content).then(function(e){return n.isAreaMaximized(e)})})},t.prototype.isEnabled=function(){return this.context.service.content.getDocumentCount().then(function(e){return e>0})},t.prototype.execute=function(){var e=this.context.service.perspective;return e.getAreaForService(this.context.service.content).then(function(t){return e.setAreaMaximized(t,!1)})},t}),define("sap.watt.platform.content/navigation/Navigation",[],function(){function e(){this.aTabsHistory=[],this.iLastEditTabIndex=-1,this.iSelectedTabIndex=-1,this.MAX_TABS_LENGTH=50}return e.prototype.getSelectedTabIndex=function(){return this.iSelectedTabIndex},e.prototype.getLastEditTabIndex=function(){return this.iLastEditTabIndex},e.prototype.setLastEditTabIndex=function(e){this.iLastEditTabIndex=this.aTabsHistory.lastIndexOf(e)},e.prototype.getLastEditTabId=function(){return this.iLastEditTabIndex>-1&&this.iLastEditTabIndex-1&&this.iSelectedTabIndex0&&this.aTabsHistory.splice(r,i)}this.addTab(e)}}},e.prototype.hasNavigateBack=function(){return!!(this.hasTabs()&&this.iSelectedTabIndex>0)},e.prototype.hasNavigateToLastEdit=function(e){return this.iLastEditTabIndex>=0&&e!==this.getLastEditTabId()},e.prototype.hasNavigateForward=function(){return!!(this.hasTabs()&&this.iSelectedTabIndex0},e.prototype._handleMaxTabsLength=function(){this.aTabsHistory.length>this.MAX_TABS_LENGTH&&this.aTabsHistory.splice(0,1)},e}),define("sap.watt.platform.content/control/EditorContainer",["ui5!sap/ui/core/Control"],function(e){"use strict";jQuery.sap.declare("sap.watt.platform.content.control.EditorContainer");var t=e.extend("sap.watt.platform.content.control.EditorContainer",{metadata:{aggregations:{header:{type:"sap.ui.core.Control",multiple:!1},content:{type:"sap.ui.core.Control",multiple:!1}}},renderer:function(e,t){function n(t,n){t&&(e.write(""),e.renderControl(t),e.write(""))}e.write(""),n(t.getHeader(),"wattEditorHeader"),n(t.getContent(),"wattEditor"),e.write("")}});return t}),define("sap.watt.platform.content/control/EditorTab",["ui5!sap/m/IconTabFilter"],function(e){"use strict";jQuery.sap.declare("sap.watt.platform.content.control.EditorTab");var t=e.extend("sap.watt.platform.content.control.EditorTab",{metadata:{properties:{isLoading:{type:"boolean",group:"Misc",defaultValue:!1},isDirty:{type:"boolean",group:"Misc",defaultValue:!1},loadingText:{type:"string",group:"Misc",defaultValue:""},closeTooltip:{type:"string",group:"Misc",defaultValue:""}}},render:function(e){if(this.getVisible()){var t=this.getId();e.write(""),this.getIcon()&&(e.write("")),e.write(""),e.writeEscaped(this.getIsLoading()?this.getLoadingText():this.getText()),e.write(""),e.write(""),e.write("")}},renderInSelectList:function(e,t){if(this.getVisible()){var n=this.getId(),r=t.getItems(),i=this.getTooltip_AsString();e.write(""),e.write(""),e.writeEscaped((this.getIsDirty()?"* ":"")+this.getText()),e.write("
"),e.write("")}},setProperty:function(e,t,n){switch(e){case"isDirty":case"isLoading":case"loadingText":case"closeTooltip":if(this.getProperty(e)===t)return this;sap.ui.core.Control.prototype.setProperty.call(this,e,t,!0),!n&&this.getParent()&&this.getParent().invalidate();break;default:sap.m.IconTabFilter.prototype.setProperty.apply(this,arguments)}return this}});return t}),define("sap.watt.platform.content/control/NavigationBar",["ui5!sap/m/IconTabHeader","./EditorTab"],function(e,t){"use strict";jQuery.sap.declare("sap.watt.platform.content.control.NavigationBar");var n=e.extend("sap.watt.platform.content.control.NavigationBar",{metadata:{publicMethods:["setTitle","createTab","closeTab","setDirty","selectTab","showTabLoadingTitle","showTabTitle","hasTabs","getTabTitle","getTabIndexById","getSelectedIndex","getAllTabIndexes","getEditorId"],events:{tabSelect:{},tabCloseRequest:{},tabContextMenu:{},tabDoubleClicked:{},tabReorder:{parameters:{tabs:{type:"array"}}}}},renderer:{},init:function(){e.prototype.init&&e.prototype.init.apply(this,arguments),this._iSelectedItemIndex=-1,this.addStyleClass("wattTabStrip"),this.attachBrowserEvent("contextmenu",this.onTabContextMenu,this),this.attachBrowserEvent("dblclick",this.onTabDblClick,this),this.setEnableTabReordering(!0),this.setShowOverflowSelectList(!0)},onmousedown:function(t){if(0===t.button&&t.target.className.indexOf("sapWattNBItem")!==-1){var n=jQuery("#"+t.target.id).control()[0];this.oSelectedItem!==n&&(this._iSelectedItemIndex=this.indexOfItem(n),this.setSelectedItem(n),this.fireTabSelect({index:this.getSelectedIndex(),TabId:this.oSelectedItem.getId(),clicked:!0,editorId:this.oSelectedItem.data("editorId")})),e.prototype.onmousedown.apply(this,arguments)}},onmouseup:function(e){if(this._isTabCloseButtonClickEvent(e)){var t=e.target;this.fireTabCloseRequest({tabIndex:this._getItemIndexFromDom(t),tabId:this._getItemIdFromDom(t)})}},ontouchstart:function(t){this._isTabCloseButtonClickEvent(t)||e.prototype.ontouchstart.apply(this,arguments)},_isTabCloseButtonClickEvent:function(e){var t=e.target;return 0===e.button&&"sapUiTabClose"===t.className||1===e.button&&t.className.indexOf("sapWattNBItem")!==-1},hasTabs:function(){return this.getItems().length>0},closeTab:function(e){this.getItems()[e].destroy()},selectTab:function(e,t,n,r){if(e<0||!this.hasTabs())return this._iSelectedItemIndex=-1,void this.fireTabSelect({index:-1,TabId:-1,clicked:t,editorId:void 0});var i=this.getItems();if(ecommand_close}",loadingText:"{i18n>loading}",tooltip:e.tooltip,isDirty:!!e.dirty});return r.data("identifier",e.identifier),r.data("editorId",e.editorId),this.insertAggregation("items",r,n,!0),this.invalidate(),n},_isAnyTabSelected:function(){return this._iSelectedItemIndex!==-1},getTabTitle:function(e){return this.getItems()[e].getText()},getTabIndexById:function(e){for(var t=0,n=this.getItems(),r=n.length;t0;if(this._iSelectedItemIndex=this.getTabIndexById(this._oDragContext.tab.getId()),e.prototype._stopMoving.apply(this,arguments),t){var n=this.getItems().map(function(e){return e.data("identifier")});this._aTabs=n.map(this.getTabByIdentifier.bind(this)),this.fireTabReorder({tabs:n})}},_onTabSelectAfterOverflowMenuChange:function(e){var t=e.getParameter("selectedItem");this._iSelectedItemIndex=this.indexOfItem(t),this.fireTabSelect({index:this.getSelectedIndex(),TabId:t.getId(),clicked:!0,editorId:t.data("editorId")})},_overflowButtonPress:function(){this.attachSelect(this._onTabSelectAfterOverflowMenuChange),e.prototype._overflowButtonPress.apply(this,arguments),this._oPopover.attachEventOnce("afterClose",function(){this.detachSelect(this._onTabSelectAfterOverflowMenuChange)},this)},_closeOverflow:function(){this._oPopover.close(),sap.m.IconTabHeader.prototype._closeOverflow.apply(this,arguments)}});return n}),define("sap.watt.platform.content/view/Content.controller",["sap/watt/lib/lodash/lodash","ui5!sap/ui/core/mvc/Controller","../navigation/Navigation","../control/EditorContainer","../control/NavigationBar","sap/watt/ui/utils/ProxyUtils"],function(e,t,n,r,i,o){"use strict";var a=t.extend("sap.watt.platform.content.view.Content",{_bIsMaximized:!1,_oContentServiceImpl:null,_oNavigation:new n,onAfterRendering:function(){var e,t=this.getSelectedIndex();t!==-1&&(e=this._getNavBar().getEditorId(t),this._toggleVisibility(e,t)),this.fireEvent("finishedContentRendering")},setContext:function(e,t){return this._oContentServiceImpl=e,this},getEditorArea:function(){return this.byId("editorArea")},_getNavBar:function(){return this.byId("tabStripNavBar")},createTab:function(e,t){var n,i,o=this.getEditorArea();return e.editorId=e.editorControl.getId(),o.getContainerByContentId(e.editorId)||(n=new r({content:e.editorControl}),n.addEventDelegate({onAfterRendering:e.requestFocus}),o.addContainer(n)),i=this._getNavBar().createTab(e),t&&this.selectTab(i),i},_toggleVisibility:function(e,t){var n=this.getEditorArea(),r=n.getContainerByContentId(e);this._toggleHeader(r,t),n.setContentContainer(r)},_toggleHeader:function(e,t){if(t>-1){var n=this,r=this._oContentServiceImpl._getTab(t),i=r.getDocument(),o=r.getDecorator(),a=Q.defer();o?o.getHeader(i).then(function(t){e.setHeader(t||null),a.resolve()}).done():(e.setHeader(null),a.resolve()),a.promise.then(function(){n.fireEvent("tabHeaderHandled")}).done()}},onTabSelect:function(e){this._oNavigation.selectTab(e.getParameter("TabId"),e.getParameter("tabNavigated")),this._toggleVisibility(e.getParameter("editorId"),e.getParameter("index")),this.forwardEvent(e)},closeTab:function(e){void 0===e&&(e=this.getSelectedIndex());var t=this.getTabIdByIndex(e);this._getNavBar().closeTab(e);var n=this._removeTabFromNavigationHistory(t,e);this.getSelectedIndex()===e?this.selectTab(n,!0):this.selectTab(n,!1,!1,!0)},forEachEditor:function(t){e.each(this.getEditorArea().getContainers(),t.bind(this))},onExit:function(){this.forEachEditor(function(e){e.destroy()})},navigateToLastEdit:function(){var e=this._oNavigation.navigateToLastEdit(),t=this._getNavBar().getTabIndexById(e);t>=0&&this.selectTab(t,!0,!1)},navigateBack:function(){var e=this._oNavigation.navigateBack();if(e>=0){var t=this._getNavBar().getTabIndexById(this._oNavigation.getSelectedTabId());this.selectTab(t,!0,!0)}},navigateForward:function(){var e=this._oNavigation.navigateForward();if(e>=0){var t=this._getNavBar().getTabIndexById(this._oNavigation.getSelectedTabId());this.selectTab(t,!0,!0)}},hasNavigateToLastEdit:function(){return this._oNavigation.hasNavigateToLastEdit(this._oNavigation.getSelectedTabId())},hasNavigateBack:function(){return this._oNavigation.hasNavigateBack()},hasNavigateForward:function(){return this._oNavigation.hasNavigateForward()},setLastEditTabIndex:function(){this._oNavigation.setLastEditTabIndex(this._oNavigation.getSelectedTabId())},_removeTabFromNavigationHistory:function(e,t){var n,r=this._oNavigation.removeTabs(e);return r>-1?n=this._getNavBar().getTabIndexById(this._oNavigation.getSelectedTabId()):this.hasTabs()&&(n=Math.max(t-1,0)),n},forwardEvent:function(e){this.fireEvent(e.getId(),e.getParameters())}});return function(){var t=function(){return this._getNavBar()};e.each(["getSelectedIndex","getAllTabIndexes","getTabIndexById","getTabTitle","getTabIdByIndex","hasTabs"],function(e){o.addGetterMethodProxy(a,i,e,t)}),e.each(["showTabLoadingTitle","showTabTitle","setDirty","setTabIcon","selectTab","setTitle","setTabIdentifier"],function(e){o.addSetterMethodProxy(a,i,e,t)})}(),a}),sap.ui.define(["sap/ui/core/Control"],function(e){"use strict";var t=e.extend("sap.watt.platform.content.control.EditorArea",{metadata:{aggregations:{containers:{type:"sap.watt.platform.content.control.EditorContainer",multiple:!0,singularName:"container"}},associations:{contentContainer:{type:"sap.watt.platform.content.control.EditorContainer",multiple:!1}}},renderer:function(e,t){e.write(""),e.renderControl(t.getContentContainer()),e.write("")}});return t.prototype.getContainerByContentId=function(e){for(var t=this.getContainers(),n=null,r=0,i=t.length;r-1){var r=this._getTabsOfDocument(e)[0];return this._oOpenCloseTabQueue.next(function(){return t._showTab(r,!0)})}},_bRestored:!1,getContent:function(){var t=this;return e.prototype.getContent.apply(this,arguments).then(function(){var e=[];return t._bRestored||(t._bRestored=!0,e.push(t._restoreTabs())),t._aStyles&&e.push(t.context.service.resource.includeStyles(t._aStyles)),Q.all(e).thenResolve(t._oView)})},_restoreTabs:function(){var e=this.context.service.contentPersistence,t=this;return this._iActiveTabIndex=-1,Q.all([e.getTabs(),e.getActiveTab()]).spread(function(n,r){return n.reduce(function(n,i){return n.then(function(){return t._restoreTab(i,r).then(function(t){if(!t)return e.remove(i)})})},Q())}).then(function(){if(t.context.service.dirtyDocumentsStorage.clearStorage().done(),t._aTabs.length>0){var e=t._iActiveTabIndex>-1?t._iActiveTabIndex:t._aTabs.length-1;return t._iActiveTabIndex=void 0,t._showTab(e,!0)}}).fail(function(e){t.context.service.log.error("Content","Failed to get Tab"+e.message,["system"]).done()})},_restoreTab:function(e,t){var n=this;return this.context.service.document.getDocumentByKeyString(e.keystring).then(function(r){var i;return!!r&&n._oEditorProvider.getSpecificEditor(r,e.editor).then(function(e){return i=e.service,e.service.isRestorable()}).then(function(e){return!!e&&Q.all([n._createTab(r,i),n._restoreDocumentFromLocalStorage(r)]).spread(function(e){return n.testTabIdentifier(i,r,t)&&(n._iActiveTabIndex=e),!0})})}).fail(function(t){var r=n.context.i18n.getText("content_restoreTabError",[e.keystring,t.message]);return n.context.service.log.warn("Content",r,["system"]).done(),!1})},_restoreDocumentFromLocalStorage:function(e){return this.context.service.dirtyDocumentsStorage.getContent(e).then(function(t){if(t)return e.setContent(t,this.context.self)}.bind(this))},getFocusElement:function(){var e=this.getCurrentEditor();return e||(e=this._getTabController().getEditorArea()),e},getSelection:function(){var e=this.getCurrentDocument();return e?{document:e}:[]},_getCurrentTab:function(){return this._oCurrentTab},getCurrentEditor:function(){var e=this._getCurrentTab();return e?e.getEditor():null},_isCurrentEditor:function(e){if(!e)return Q(!1);var t=this.getCurrentEditor();return t.instanceOf("sap.watt.common.plugin.multieditor.service.MultiEditor")?t.containsEditor(e):Q(this.getCurrentEditor()._sName===e._sName)},getDocumentCount:function(){return t.size(this._getDocumentsMap())},_getDocumentsMap:function(){var e={};return t.each(this._aTabs,function(t){var n=t.getDocument(),r=n.getEntity().getKeyString();e[r]=n}),e},getDocuments:function(e){var n=t.values(this._getDocumentsMap());return e?t.filter(n,function(e){return e.isDirty()}):n},getCurrentDocument:function(){var e=this._getCurrentTab();return e?e.getDocument():null},isCurrentDocumentDirty:function(){var e=this.getCurrentDocument();return!!e&&e.isDirty()},_isCurrentDocument:function(e){return this.getCurrentDocument()&&(this.getCurrentDocument()===e||this.getCurrentDocument().getKeyString()===e.getKeyString())},hasDocuments:function(){return this.getDocumentCount()>0},open:function(e,t){var n=this;return this._oOpenCloseTabQueue.next(function(){return n.context.self.setVisible(!0).then(function(){return n._open(e,t)})})},_open:function(e,t){var n=this,r=this._findTabIndex(e,t);return r===-1?this._createTab(e,t).then(function(e){return n._getTabController().showTabLoadingTitle(e),n._showTab(e,!0).then(function(t){t&&n._getTabController().showTabTitle(e)})}):this._getTabController().getSelectedIndex()!==r?this._showTab(r,!0):void 0},_createTab:function(e,t){var n=this;return Q.spread([t.getContent(),t.getTitleForDocument(e),t.getTooltipForDocument(e)],function(i,o,a){var s=n._oDecorator,u=e.getExtInfo();(u&&u.external||e._bExtDoc)&&(u.title&&(o=u.title),u.tooltip&&(a=u.tooltip),s=u.decoratorObj);var c=n._getTabController().createTab({title:o,tooltip:a,identifier:n.createTabIdentifier(t,e),dirty:e.isDirty(),editorControl:i,requestFocus:n._setFocus.bind(n,t)},!1),l=new r(e,t,i,s);return n._aTabs.splice(c,0,l),n._storePersistence(e,t,c),c})},_setFocus:function(e,t){this.context.service.focus.setFocus(e).done()},_storePersistence:function(e,t,n){var r=this;t.isRestorable().then(function(i){if(i)return r.context.service.contentPersistence.add(r.createTabIdentifier(t,e),n)}).done()},close:function(e,t,n){var r=this;return this._oOpenCloseTabQueue.next(function(){if(e&&t){var i=r._findTabIndex(e,t);return i>-1?r._tryCloseTab(i,n):r._closeDocument(e,n)}return e?r._closeDocument(e,n):r._tryCloseTab(r._getTabController().getSelectedIndex(),n)})},_tryCloseTab:function(e,t){var n=this,r=n._aTabs[e].getDocument();if(r.isDirty()){var i;return i=t?n._closeTab(e).thenResolve(!0):n._showDataLossDialog(e),i.then(function(e){e&&(n._getDocumentsMap()[r.getEntity().getKeyString()]||r.isDirty()&&r.revert(n.context.self).done())})}return n._closeTab(e)},_showDataLossDialog:function(e){var t=this,n=this.context.i18n.getText("i18n","content_confirmSaveBeforeClose",[this._getTabController().getTabTitle(e)]);return this.context.service.usernotification.confirm(n,!0).then(function(n){return"YES"===n.sResult?t._beforeSave(t._aTabs[e]).then(function(){return t._aTabs[e].save().then(function(){return t._closeTab(e).thenResolve(!0)})}):"NO"===n.sResult?t._closeTab(e).thenResolve(!0):"CANCEL"!==n.sResult&&void 0})},_closeTab:function(e){var t=this,n=this._getTab(e),r=n.getDocument(),i=Q();if(n.isContentLoaded()){var o=n.getEditor();i=this.context.service.focus.detachFocus(o).then(function(){return o.close(n.getDocument())})}return i.then(function(){return t._getTabController().closeTab(e),t._aTabs.splice(e,1),t.context.service.contentPersistence.remove(t.createTabIdentifier(n.getEditor(),r)).done(),t.context.event.fireTabClosed({document:r,editor:n.getEditor()}).done(),r.release().then(function(){if(0===t._aTabs.length)return t._oCurrentTab=null,Q.all([t.context.service.perspective.getAreaForService(t.context.self).then(function(e){return t.context.service.perspective.isAreaMaximized(e).then(function(n){if(n)return t.context.service.perspective.setAreaMaximized(e,!n)})}),t.context.service.focus.setFocus(t.context.self),t.context.event.fireSelectionProviderChanged({selectionProvider:null})])})})},_closeTabs:function(e,n){var r=this;return t.reduceRight(e,function(e,t){return e.then(function(){return r._tryCloseTab(t,n)})},Q())},_closeDocument:function(e,t,n){var r;return r=n&&n.length>0?n:this._getTabsOfDocument(e,!0),this._closeTabs(r,t)},_hasTabs:function(){return this._aTabs.length>0},closeAll:function(e){var t=this;return this._oOpenCloseTabQueue.next(function(){if(t._hasTabs()){var n=t._getAllTabIndices();return t._closeTabs(n,e)}})},closeOthers:function(e,t){var n=this;return e&&t?this._oOpenCloseTabQueue.next(function(){var r=n._findTabIndex(e,t),i=n._getAllTabIndices();return i.splice(r,1),n._closeTabs(i)}):Q()},closeTabsToTheRight:function(e,t){var n=this;return e&&t?this._oOpenCloseTabQueue.next(function(){var r=n._findTabIndex(e,t),i=n._getAllTabIndices().slice(r+1);return n._closeTabs(i)}):Q()},isClickedTabSelected:function(){return this._oContextTab===this._getSelectedTab()},_beforeSave:function(e){var t=this;return this.context.event.fireBeforeSave({document:e.getDocument(),editor:e._oEditor}).fail(function(e){t.context.service.log.debug("Content","Before save document handler error :"+e.message,["user"]).done()})},save:function(){var e=this,t=this._getCurrentTab();return this._beforeSave(t).then(function(){return t.save().fail(function(t){return e.context.service.usernotification.alert(t.message)})})},saveAll:function(){var e=this,n=this.getDocuments(!0);return t.isEmpty(n)?Q():this.context.service.usernotification.liteInfo(e.context.i18n.getText("content_saving"),!1).fin(function(){var r=t.map(n,function(t){return e.getCurrentDocument()===t?e._flushCurrentEditor().then(t.save()):t.save()});return Q.all(r).then(function(){return e.context.service.log.info("Content","All changes have been saved in all open files",["user"]).done(),e.context.service.usernotification.liteInfo(e.context.i18n.getText("content_allChangesSaved"),!0)}).fail(function(t){return e.context.service.usernotification.liteInfo(e.context.i18n.getText("content_saveAllError"),!0).fin(function(){throw t})})})},undo:function(){this._getCurrentTab().undo()},hasUndo:function(){var e=this._getCurrentTab();return!!e&&e.hasUndo()},redo:function(){this._getCurrentTab().redo()},hasRedo:function(){var e=this._getCurrentTab();return!!e&&e.hasRedo()},isDirty:function(e){for(var n=0;n-1)return t._tryCloseTab(e)}).done()},_onTabContextMenu:function(e){var t=e.getParameter("index");this._oContextTab=this._getTab(t);var n=e.getParameter("mouseEvent");this.context.service.focus.setFocus(this.context.self).then(function(){return this.context.service.contextMenu.open(this._oContextMenuGroup,n.pageX,n.pageY)}.bind(this)).done()},_onTabSetPerspective:function(){var e=this;this.context.service.perspective.getAreaForService(this.context.self).then(function(t){return e.context.service.perspective.isAreaMaximized(t).then(function(n){return e.context.service.perspective.setAreaMaximized(t,!n).then(function(){return e.context.event.fireTabDoubleClicked({maximized:!n})})})}).then(function(){return e.context.service.focus.setFocus(e.getCurrentEditor())}).done()},_flushCurrentEditor:function(){var e=this._getCurrentTab();return e?e.flush():Q()},_handleTabOpeningError:function(e,t,n){var r=e.getDocument(),i=n&&n.message||this.context.i18n.getText("i18n","content_unexpectedEditorError");this.context.service.log.error("Content",i,["user"]).done();var o=this.context.i18n.getText("i18n","content_openFileError",[r.getName(),i]),a=this;return this.context.service.usernotification.alert(o).then(function(){return a._tryCloseTab(t,!0)})},_showTab:function(e,t){if(this._getTabController().getAllTabIndexes().length<=0)return Q(!1);var n=this._tabExists(this._oCurrentTab)?this._oCurrentTab:{flush:function(){return Q()}},r=this._getTab(e);if(!r)return Q(!1);var i=r.getDocument(),o=this;return n.flush().then(function(){return t&&o._getTabController().selectTab(e),o.context.event.fireBeforeShow({document:i,editor:r.getEditor()})}).then(function(){return r.show()}).then(function(){return o._oCurrentTab=r,o.context.event.fireSelectionProviderChanged({selectionProvider:r.getEditor()})}).then(function(){return o.context.service.contentPersistence.setActiveTab(o.createTabIdentifier(r.getEditor(),r.getDocument())).done(),o.context.service.command.invalidateAll().done(),!0}).fail(function(t){return o._handleTabOpeningError(r,e,t).thenResolve(!1)})},getSelectionProvider:function(){return this._tabExists(this._oCurrentTab)?this._oCurrentTab.getEditor():null},refreshTab:function(e){return this._showTab(e,!0)},_getAllTabIndices:function(){return t.map(Object.keys(this._aTabs),Number)},_getTabsOfDocument:function(e,n){var r=[];return t.each(this._aTabs,function(t,i){t.hasDocument(e,n)&&r.push(i)}),r},_createReadOnlyDocument:function(e){var t=e.getEntity(),r="ReadOnly_"+t.getName()+"_"+Date.now(),i=new n("file",r,t.getParentPath());i.oMetadata.readOnly=!0;var o=e._dirtyContent||e._savedContent;return this.context.service.document.getDocument(i).then(function(e){return e.getContent=function(){return Q(o)},e})},onOpenedDocumentConflict:function(e){var t=e.params.document;if(this._isCurrentDocument(t)){var n=e.params.conflictType;"locked"===n?this.context.service.usernotification.alert(e.params.conflictMessage).done():"notSynced"===n&&this._handleNotSyncedConflict(t).done()}},_handleNotSyncedConflict:function(e){var t=this,n=e.isDirty(),r=n?"conflictDocument_notSynced_refreshAndOpen":"conflictDocument_notSynced_refresh",i=this.context.i18n.getText("i18n",r,[e.getEntity().getFullPath()]);return this.context.service.usernotification.info(i).then(function(){return n?t._createReadOnlyDocument(e).then(function(n){return Q.all([e.refresh(),t.open(n,t.getCurrentEditor())])}):e.refresh()})},onDocumentChanged:function(e){var t=e.params.document,n=e.params.changeType,r=e.params.options;"content"===n&&r?this._handleDocumentContentChange(t,r.source).done():"renamed"===n&&this._handleDocumentRename(t,e.params.newDocument).done()},_handleDocumentContentChange:function(e,t){var n=this;return t===this.context.self?Q():this._oOpenCloseTabQueue.next(function(){if(n._isCurrentDocument(e))return n._isCurrentEditor(t).then(function(t){return t?void n._getTabController().setLastEditTabIndex():n.getCurrentEditor().open(e,!0)})})},_handleDocumentRename:function(e,t){if(t.getEntity().getFileExtension()!==e.getEntity().getFileExtension())return this.close(e).done(),Q();var n=this._getTabsOfDocument(e),r=this,i=[];return n.forEach(function(n){var o=r._getTab(n),a=o.getEditor();o.setDocument(t),r.context.service.contentPersistence.update(r.createTabIdentifier(a,e),t.getKeyString()).done();var s=Q.all([a.getTitleForDocument(t),a.getTooltipForDocument(t)]).spread(function(i,s){if(r._getTabController().setTitle(n,i,s).setTabIdentifier(n,r.createTabIdentifier(a,t)),o.isContentLoaded())return a.close(e)}).then(function(){if(r._getCurrentTab()===o)return r.context.service.contentPersistence.setActiveTab(r.createTabIdentifier(a,t)).done(),r._oOpenCloseTabQueue.next(function(){return a.open(t)})});i.push(s)}),Q.all(i)},onDocumentStateChanged:function(e){var n=this._getTabController(),r=e.params.document,i=r.isDirty(),o=this._getTabsOfDocument(r);t.each(o,function(e){n.setDirty(e,i)}),o.length>0&&this.context.service.command.invalidateAll().done()},setTabIcon:function(e,n){n||(n=this.getCurrentDocument());var r=this._getTabController();t.each(this._getTabsOfDocument(n),function(t){r.setTabIcon(t,e)})},onDocumentDeleted:function(e){var t=e.params.document;this.close(t,void 0,!0).done()},onRDELoad:function(){var e=this;this.context.service.aceeditor.config.getUserSetting().then(function(t){t.autoSave&&e.startAutoSave()}).done()},stopAutoSave:function(){this._iAutoSaveInterval&&clearInterval(this._iAutoSaveInterval)},startAutoSave:function(){var e=this;this._iAutoSaveInterval=setInterval(function(){e.isDirty()&&e.saveAll().fail(function(t){e.context.service.usernotification.alert(t.message).done(),e.stopAutoSave()}).done()},3e4)},hasNavigateToLastEdit:function(){return this._getTabController().hasNavigateToLastEdit()},hasNavigateBack:function(){return this._getTabController().hasNavigateBack()},hasNavigateForward:function(){return this._getTabController().hasNavigateForward()},navigateToLastEdit:function(){var e=this;return e._getTabController().navigateToLastEdit(),!0},navigateBack:function(){var e=this;return e._getTabController().navigateBack(),!0},navigateForward:function(){ return this._getTabController().navigateForward(),!0},openRightTab:function(){var e=this,t=this._getTabController().getSelectedIndex();if(t0)return this._oOpenCloseTabQueue.next(function(){return e._showTab(t-1,!0)})},getContextTab:function(){if(this._oContextTab){var e=this._oContextTab.getDocument(),t=this._oContextTab.getEditor();return{document:e,editor:t,index:this._findTabIndex(e,t)}}return null},testTabIdentifier:function(e,t,n){return n.keystring===t.getKeyString()&&n.editor===e.getProxyMetadata().getName()},createTabIdentifier:function(e,t){return{keystring:t.getKeyString(),editor:e.getProxyMetadata().getName()}}});return i}),define("sap.watt.platform.content/service/ContentServicePersistence",["sap/watt/common/error/AssertError"],function(e){"use strict";return{_CHANGED_THRESHOLD_IN_MS:2e3,_VERSION:1,_aTabs:[],_oActiveTab:null,_scheduled:!1,_sNode:"sap.watt.common.content.service.ContentServicePersistence",init:function(){return this._load()},_load:function(){var e=this;return this.context.service.preferences.get(this._sNode).then(function(t){t&&t.version===e._VERSION&&($.isArray(t.tabs)?(e._aTabs=t.tabs,e._removeDuplicates(),t.activetab?e._exists(t.activetab.keystring,t.activetab.editor)===-1?(e._oActiveTab=null,e._scheduleSave()):e._oActiveTab=t.activetab:e._oActiveTab=null):e.clear())}).fail(function(t){e.context.service.log.error("Content Persistence","Failed to get preferences"+t.message,["system"]).done()})},_removeDuplicates:function(){for(var e=!1,t=0;t9e5?this._getCsrfToken(s):Q.resolve(this._sCsrfToken);var l={type:n,headers:s,contentType:s["Content-Type"],data:"application/json"===u?JSON.stringify(a):a};e.isEmpty(r)||e.merge(l,r);var p=this;return c.then(function(n){return!e.isEmpty(n)&&e.isString(n)&&(l.headers["X-CSRF-Token"]=n),Q.sap.ajax(t,l).spread(function(t,n){return e.isEmpty(p._sCsrfToken)&&(p._sCsrfToken=n.getResponseHeader("X-CSRF-Token"),p._oCsrfFetchTime=Date.now()),t}).fail(function(n){switch(n.status){case"403":case 403:if("Required"===n.getResponseHeader("X-CSRF-Token")){if(e.isEmpty(p._sTokenUrl))throw n;return p._getCsrfToken(s).then(function(e){return l.headers["X-CSRF-Token"]=e,Q.sap.ajax(t,l).spread(function(e){return e})})}throw n;case"200":return n.responseText;default:throw n}})})},t.prototype.get=function(e,t,n,r){return this.execute(e,"GET",t,n,r)},t.prototype.delete=function(e,t,n,r){return this.execute(e,"DELETE",t,n,r)},t.prototype.put=function(e,t,n,r,i){return this.execute(e,"PUT",t,n,r,i)},t.prototype.post=function(e,t,n,r,i){return this.execute(e,"POST",t,n,r,i)},t.prototype.head=function(e,t,n,r){return this.execute(e,"HEAD",t,n,r)};var n={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t,n,r,i,o,a,s,u="",c=0;for(e=this._utf8_encode(e);c>2,o=(3&t)<<4|n>>4,a=(15&n)<<2|r>>6,s=63&r,isNaN(n)?a=s=64:isNaN(r)&&(s=64),u=u+this._keyStr.charAt(i)+this._keyStr.charAt(o)+this._keyStr.charAt(a)+this._keyStr.charAt(s);return u},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t}};return t}),define("sap.watt.platform.ajaxrequest/service/AjaxRequest",["../util/AjaxClientUtil"],function(e){"use strict";var t=function(t,n,r){return new e(t,n,r)};return{createClient:t}}),define("sap.watt.platform.contextmenu/service/ContextMenu",[],function(){"use strict";var e=function(){};return e.prototype=jQuery.extend(e.prototype,{_oContextMenu:null,_oMenuService:null,init:function(){this._oMenuService=this.context.service.menu,this._oContextMenu=(new sap.ui.commons.Menu).addStyleClass("sapWattContextMenu").addStyleClass("WattMenu"),this._oOpenQueue=new Q.sap.Queue},_open:function(e,t){var n=this;if(0==this._oContextMenu.getItems().length)return Q();var r=e,i=t,o=r,a=i,s=$("body").width(),u=$("body").height();n._oContextMenu.getDomRef()||n._oContextMenu.open(!1,void 0,void 0,void 0,void 0,"-2000 -2000","none");var c=n._oContextMenu.$().context.clientWidth,l=n._oContextMenu.$().context.clientHeight;if(0==l)return Q.delay(0).then(function(){return n._open(e,t)});var p=s-r0},decorate:function(e,t){var n=[],r=[];return jQuery.each(this._aDecorators,function(n,i){r.push(i.service.decorate(e,t))}),Q.all(r).then(function(e){return jQuery.each(e,function(e,t){t&&n.push(t)}),n})},updateDecorations:function(e,t,n){return e instanceof Array||(e=e?[e]:[]),this.context.event.fireDecorationsChanged({documents:e,updateChildren:t,event:n})}}}),define("sap.watt.platform.help/service/Help",[],function(){"use strict";return{_sUrl:null,init:function(){},configure:function(e){var t=e.url;this._sUrl=t?t.replace("{{help_url}}",sap.watt.getEnv("help_url")):null},getHelpUrl:function(){return this._sUrl}}}),define("sap.watt.platform.filefilter/command/ShowHiddenFiles",[],function(){"use strict";return{execute:function(){var e=this;return e.context.service.usagemonitoring.report("repositoryBrowser","showHiddenFiles","from_toolbar").done(),this.context.service._filefilter.hide.unhideDocuments().then(function(){return e.context.service.command.invalidateAll()})},isAvailable:function(){var e=this;return this.context.service._filefilter.hide.supportParameterExists().then(function(t){return!t&&e.context.service._filefilter.hide.getHiddenState().then(function(e){return e})})}}}),define("sap.watt.platform.filefilter/command/HideFiles",[],function(){"use strict";return{execute:function(){var e=this;return e.context.service.usagemonitoring.report("repositoryBrowser","hideFiles","from_toolbar").done(),this.context.service._filefilter.hide.hideDocuments().then(function(){return e.context.service.command.invalidateAll()})},isAvailable:function(){var e=this;return this.context.service._filefilter.hide.supportParameterExists().then(function(t){return!t&&e.context.service._filefilter.hide.getHiddenState().then(function(e){return!e})})}}}),define("sap.watt.platform.filefilter/service/FileFilter",[],function(){"use strict";return{_mConfig:{},_oReadOnlyRegExp:null,_oIgnoreService:null,_oSourceControlIgnoreRegExp:null,_oProjectTypeService:null,configure:function(e){e&&(this._mConfig=e,e.ignore&&(this._oIgnoreService=e.ignore.service),this._oReadOnlyRegExp=this._createRegularExpression(this._mConfig.alwaysReadOnly),this._oSourceControlIgnoreRegExp=this._createRegularExpression(this._mConfig.sourceControlIgnore),this._oProjectTypeService=e.projectTypeHandler.service)},getProjectTypeService:function(){return this._oProjectTypeService},filterMetadata:function(e,t){var n=[];if(!t)return e;for(var r=0;r0){var a=t[0];if(t.length>1)for(var s=1;s0&&(sap.watt.getEnv("internal")||(i=e.filter(i,function(e){return!e.internalOnly}))),t._createProjectTypeToRegExpMap(i,"defaultHidden")})},_createProjectTypeToRegExpMap:function(e,t){if(e.length>0){for(var n={},r=0;r0&&this._oFileUploader.setMaximumFileSize(t),this._oFileUploader.attachFileSizeExceed(this._onFileSizeExceed,this)},_onFileSizeExceed:function(e){this._oFileUploader.clear();var t=this._oModel.getProperty("/maxFileSize");0===t&&(t=this._oFileUploader.getMaximumFileSize());var n=e.mParameters.fileName,r=Math.floor(e.mParameters.fileSize);this._setErrorStyleClassAndTooltip(this._oFileUploader,"file_size_exceed",[t,n,r])},_getImportToTextField:function(){var e=this._oImportDialog.getContent()[0],t=e.getContent()[3];return t},_isDestinationPathValid:function(e){var t=this._getImportToTextField();if("/"===e||""===e)return this._setErrorStyleClassAndTooltip(t,"import_to_empty");if(e.indexOf("//")!==-1||e.indexOf("\\")!==-1)return this._setErrorStyleClassAndTooltip(t,"import_to_invalid");var n=e.split("/"),r=n.length,i=0;for(0===e.indexOf("/")&&(i=1),e.lastIndexOf("/")===e.length-1&&r--;i0&&t.getContent()[0].attachSelect(e.onRepositorySelectFile,e),e._oRepositoryBrowserControl=t,e._oRepositoryBrowserControl})})},onWorkspace:function(e){var t=e.oSource.getText(),n=this.context.i18n.getText("importFileDialog_hideworkspace"),r=this.context.i18n.getText("importFileDialog_showworkspace"),i=this,o=e.oSource.oParent;t===n?(o.removeContent(this._oRepositoryBrowserControl),this._oModel.setProperty("/workspaceButtonText",r)):this._getRepositoryBrowserControl().then(function(e){o.addContent(e),i._oModel.setProperty("/workspaceButtonText",n)}).done()},_changeOkButtonState:function(e,t){e&&""!==e||(e=this._oModel.getProperty("/importDestinationPath")),t||(t=this._oModel.getProperty("/fileToImport"));var n=this._isDestinationPathValid(e,t),r=this._isFileValid(t);n&&r?this._oModel.setProperty("/okEnabled",!0):this._oModel.setProperty("/okEnabled",!1)},onRepositorySelectFile:function(e){var t=this;if(e&&e.getParameter){var n=e.getParameter("node");if(n){var r=n.mProperties.tag;this.context.service.document.getDocumentByKeyString(r).then(function(e){if(e){t._oModel.setProperty("/selectedDocument",e);var n=e.getEntity().getFullPath();""===n&&(n="/"),t._oModel.setProperty("/importDestinationPath",n),t._changeOkButtonState(n)}}).done()}}},_getDestinationFolder:function(){var t=this,n=this._oModel.getProperty("/importDestinationPath");e.startsWith(n,"/")&&(n=n.substr(1)),e.endsWith(n,"/")&&(n=n.substring(0,n.length-1));var r=n.split("/");return this.context.service.filesystem.documentProvider.getRoot().then(function(e){return t._createDestinationFolder(e,0,r)})},_createDestinationFolder:function(e,t,n){var r=this,i=n[t];return this._getFolderByName(e,i).then(function(e){return t1&&e._showInfoMessage("importCompletedSuccessfully","import_finished"),e._showInfoMessage("importCompletedSuccessfully","import_finished"); })}).fin(function(){return e.context.service.progress.stopTask(n)})}).fail(function(t){var n=e.context.i18n.getText("import_failed",[t]);e.context.service.usernotification.alert(n).done(),e.context.service.log.error("import",n,["user"]).done()}).fin(function(){e._bDestFolderWasCreated=!1,e._nQuantityOfCreatedFolders=0}).done()},_showInfoMessage:function(e,t){this.context.service.log.info("import",this.context.i18n.getText("i18n",e),["user"]).done(),this.context.service.usernotification.liteNotificationInfo(this.context.i18n.getText("i18n",t)).done()},_executeImport:function(e,t){if(this._isZipFile(t)){var n=this._oModel.getProperty("/extractArchiveChecked");return n?this._executeZipFileImport(e,t):this._executeFileImport(e,t,!1)}return this._executeFileImport(e,t,!0)},_executeFileImport:function(e,t,n){var r=this;return n=n===!0,e.getChild(t.name).then(function(i){if(i){var o=r.context.i18n.getText("import_file_overwrite");return r.context.service.usernotification.confirm(o).then(function(i){return i.bResult?r._importFileAndFireEvent(e,t,n):void r._oImportDialog.open()})}return r._importFileAndFireEvent(e,t,n)})},_importFileAndFireEvent:function(e,t,n){return this._fireClose("ExecuteImport"),this._importFile(e,t,n)},_executeZipFileImport:function(e,t){var n=this;return e.getCurrentMetadata().then(function(r){if(0!==r.length&&!n._bDestFolderWasCreated){var i=n.context.i18n.getText("import_files_overwrite",[e.getName()]);return n.context.service.usernotification.confirm(i).then(function(r){return r.bResult?n._importZipFileAndFireEvent(e,t):void n._oImportDialog.open()})}return n._importZipFileAndFireEvent(e,t)})},_importZipFileAndFireEvent:function(e,t){var n=this;return this._fireClose("ExecuteImport"),this._importZipFile(e,t).then(function(){return n.context.service.repositorybrowser.setSelection(e,!0,!0)})},_isZipFile:function(t){if(t){var n=t.name.toLowerCase();return e.endsWith(n,".zip")}return!1},onClose:function(e){var t=e.mParameters.actionName;t&&(this._oImportDialog.fireEvent("service.import.ImportDialog",{actionName:t}),this._oRepositoryBrowserControl=null)},_fireClose:function(e){this._oImportDialog.fireClosed({actionName:e}),this._oImportDialog.isOpen()&&this._oImportDialog.close()},onCancel:function(){this._fireClose("CancelImport")},_importFile:function(e,t,n){var r=this;return e.importFile(t).then(function(e){var t=[];return n===!0&&t.push(r.context.service.document.open(e)),t.push(r.context.service.repositorybrowser.setSelection(e,!0)),t.push(r.context.service.document.notifyExternalChange(e,"import")),Q.all(t)})},_importZipFile:function(e,t){var n=this;return this.context.service.usagemonitoring.startPerf("importExport","importZip").done(),e.importZip(t,!0).then(function(){return n.context.service.document.notifyExternalChange(e,"import").then(function(){n.context.service.usagemonitoring.report("importExport","importZip",t.size).done()})})},_getSelectedFolder:function(e){return e&&e.getEntity().isFile()?e.getParent():Q(e)},_createDataModel:function(e){var t=this,n=new sap.ui.model.json.JSONModel,r={};return r.fileNameToImport="",r.importDestinationPath="",r.fileUploaderTooltip="",r.fileToImport=null,r.extractArchiveVisible=!1,r.extractArchiveChecked=!0,this._getMaxFileSizeBytes().then(function(i){return r.maxFileSize=Math.floor(i/1048576),r.workspaceButtonText=t.context.i18n.getText("importFileDialog_showworkspace"),r.okEnabled=!1,t._getSelectedFolder(e).then(function(e){return e&&(r.selectedDocument=e,r.importDestinationPath=e.getEntity().getFullPath(),""===r.importDestinationPath&&(r.importDestinationPath="/")),n.setData(r),n})})},openImportUI:function(e){var t=this,n=Q.defer();return this._createDataModel(e).then(function(e){var r=sap.ui.xmlfragment("sap.watt.platform.importExport.fragment.ImportDialog",t);t._oImportDialog=sap.ui.getCore().byId(r.getId()),t.context.i18n.applyTo(t._oImportDialog),t._oImportDialog.attachClosed(t.onClose,t),t._oModel=e,t._oImportDialog.setModel(e),t._oImportDialog.attachEvent("service.import.ImportDialog",function(e){n.resolve(e.mParameters.actionName)}),t._initFileUploader(),t._oImportDialog.open()}).done(),n.promise}}}),define("sap.watt.platform.focus/service/Focus",["ui5!sap/ui/core/Popup"],function(e){"use strict";return{_currentFocusElement:null,_previousFocusElement:null,_aFocusElements:{},_detachedService:null,_boundFocusHandler:null,init:function(){this._iTabindex=-1,this._boundFocusHandler=jQuery.proxy(this._focusHandler,this)},setFocus:function(e){var t=this;return e?this.attachFocus(e).then(function(){return t._fireFocus(e)}):Q()},getFocus:function(){return this._currentFocusElement},attachFocus:function(e){var t=this;return this._getFocusElement(e).then(function(n){t._iterateElements(n,function(n){t._attachFocus(n,e)})})},_attachFocus:function(e,t){if(e&&t&&!this._getElementFocusId(e)){this._iTabindex++,e.setAttribute("tabindex",this._iTabindex);var n="focusId_"+this._iTabindex;e.setAttribute("focusId",n),this._aFocusElements[n]=t,e=this._getElementForFocusEvent(e),e&&e.addEventListener("focus",this._boundFocusHandler,!0)}},_getElementForFocusEvent:function(e){if(e instanceof HTMLIFrameElement){if(!this._isIFrameAccesible(e))return;e=e.contentWindow}return e},_isIFrameAccesible:function(e){try{return e.contentWindow.addEventListener,!0}catch(e){return!1}},detachFocus:function(e){var t=this;return this._detachedService=e,t._removeFocusElement(e).fin(function(){t._detachedService=null})},onDialogOpened:function(e){this._previousFocusElement=this._currentFocusElement,this._currentFocusElement=null,this.context.event.fireChanged().done()},onDialogClosed:function(e){if(!this._currentFocusElement){var t=this;this.setFocus(this._previousFocusElement).then(function(){t._previousFocusElement=null}).done()}},onNonModalDialogClosed:function(){this.setFocus(this._currentFocusElement).done()},_focusHandler:function(e){var t=e.target,n=this._getElementFocusId(t),r=e.currentTarget.frameElement||e.currentTarget,i=this._getElementFocusId(r),o=this._aFocusElements[n]||this._aFocusElements[i];o&&this._currentFocusElement!==o&&this._detachedService!==o&&(this._currentFocusElement=o,this.context.event.fireChanged().done())},_fireFocus:function(e){var t=this;return this._getFocusElement(e).then(function(e){t._iterateElements(e,function(e){e=t._getElementForFocusEvent(e),e&&e.focus&&e.focus()})})},_getElementFocusId:function(e){if(e&&e.getAttribute)return e.getAttribute("focusId")},_getFocusElement:function(e){var t=this,n=[];return e?e.instanceOf&&e.instanceOf("sap.watt.common.service.ui.Part")?e.getFocusElement().then(function(e){return t._getFocusElement(e)}):(this._iterateElements(e,function(e){var r=t._getRenderedElement(e);r&&n.push(r)}),0===n.length?Q(null):Q.all(n)):Q()},_getRenderedElement:function(e){var t;if(e.getDomRef){if(t=e.getDomRef(),!t&&e.onAfterRendering){var n=Q.defer(),r=this,i={onAfterRendering:function(){n.resolve(r._getRenderedElement(e)),e.removeEventDelegate(i)}};e.addEventDelegate(i),t=n.promise}}else(e instanceof HTMLElement||e instanceof HTMLIFrameElement)&&(t=e);if(t&&t.id&&""!==t.id){var o=document.getElementById(t.id);o&&(t=o)}return t},_removeFocusElement:function(e){var t=this;return this._getFocusElement(e).then(function(n){t._iterateElements(n,function(e){if(e){var n=t._getElementFocusId(e);n&&(delete t._aFocusElements[n],e.removeAttribute("focusId"));var r=t._getElementForFocusEvent(e);r&&r.removeEventListener("focus",t._boundFocusHandler,!0)}}),t._currentFocusElement===e&&(t._currentFocusElement=null)})},_iterateElements:function(e,t){if(Array.isArray(e))for(var n=0;n0&&n.startsSection||!1),i&&!r._bRTL&&(a.onAfterRendering=function(){a.$("scuttxt").text(i)}),r._createHandler(a,n),e.addItem(a),"menu"===n.type){var s=r.createMenu(n.group);return a.setSubmenu(s),n.group.getItems().then(function(){return[a]})}return[a]};i();var a={},s=Q(a);return jQuery.each(t,function(e,t){s=s.then(function(){return o(e,t)}).then(function(e){return e&&jQuery.each(e,function(e,n){if(n.getId&&n.getId()&&(a[n.getId()]=t),n.getTooltip&&n.setTooltip){var i=n.getTooltip();"string"!=typeof i&&i||n.setTooltip(r._addGroupSuffix(t,i))}}),a})}),s},filterMenuItems:function(e,t,n){return this.context.service.perspective.getCurrentPerspective().then(function(r){var i={};return jQuery.each(e,function(e,o){var a=o.getId(),s=t[a];if(s&&o.setVisible){var u=s.item.isAvailableInPerspective(r);i[a]=u,n||o.setVisible(u)}}),i})},_createHandler:function(e,t){var n=t.command;n&&("boolean"===n.getType()?e.attachSelect(function(){n.execute(!n.getValue()).done()}):e.attachSelect(function(){n.execute(n.getValue(t.itemId)).done()}))},_createMenuItem:function(e,t){var n=this;return e.getGroup().getItems().then(function(r){var i=null;if(r.length>0||"list"===e.getType()){var o=e.getGroup(),a=o.getDefaultItem();i={id:n._createId(t,e),itemId:e.getId(),type:e.getType(),label:e.getLabel(),group:o,item:o.getGroupItem(),prio:e.getPrio(),icon:e.getIcon(),iconLabel:e.getIconLabel(),defaultAction:a?n._createActionItem(a,!0,t):void 0}}return i})},_createInlineItems:function(e,t,n){var r=[],i=e.getGroup();return this._createMenuStructure(i,t,n).then(function(e){return jQuery.each(e,function(e,t){t.startsSection=t.startsSection||0==e,r.push(t)}),r})},_createActionItem:function(e,t,n){var r=e.getCommand();return{id:this._createId(n,e),itemId:e.getId(),type:"action",label:e.getLabel(),enabled:t,command:r,icon:e.getIcon(),iconLabel:e.getIconLabel(),value:e.getValue(),prio:e.getPrio(),item:e}},_createMenuStructure:function(e,t,n){if(void 0==e)return Q([]);var r=this;return n=n||e.getId(),t=t!==!1,e.getItems().then(function(e){return t?r._filterByPerspective(e).then(function(e){return r._oCommandService.filter(e)}).then(function(e){return r._createMenuStructureForItems(e,!0,n)}):r._createMenuStructureForItems(e,t,n)})},_filterByPerspective:function(e){return this.context.service.perspective.getCurrentPerspective().then(function(t){var n=[];return jQuery.each(e,function(e,r){r&&r.isAvailableInPerspective(t)&&n.push(r)}),n})},_createMenuStructureForItems:function(e,i,o){var a=this,s=[],u=[];return jQuery.each(e,function(e,u){var c=u;i&&(c=u.item),c instanceof n?s.push(a._createMenuItem(c,o)):c instanceof r?s.push(a._createInlineItems(c,i,o)):c instanceof t&&s.push(a._createActionItem(c,!i||u.enabled,o))}),Q.all(s).then(function(e){var t=!1;return jQuery.each(e,function(e,n){if(jQuery.isArray(n)){t=!1;var r=n.length-1;jQuery.each(n,function(e,n){u.push(n),e==r&&(t=!0)})}else n&&(t&&!n.startsSection&&(n.startsSection=!0),u.push(n))}),u})},_createId:function(e,t){return e+"-"+t.getId()}}}),define("sap.watt.platform.menubar/service/MenuBar",["sap/watt/platform/plugin/platform/service/ui/AbstractPart"],function(e){"use strict";var t=function(e){throw new Error("MenuBar: "+e)},n=sap.m.Link.extend("MenuItem",{_mSubmenu:null,_bCanOpenSubmenu:!0,getSubmenu:function(){return this._mSubmenu},setSubmenu:function(e){this._mSubmenu=e},openSubmenu:function(){if(this.getSubmenu()){var e=this.$().get(0),t=sap.ui.core.Popup.Dock;this.getSubmenu().open(!1,e,t.BeginTop,t.BeginBottom,e),this.$().addClass("active");var n=this;this.getSubmenu().oPopup.attachEventOnce("closed",function(e){n.$().removeClass("active")})}},closeSubmenu:function(){this.getSubmenu()&&this.getSubmenu().close()},canOpenSubmenu:function(){return this._bCanOpenSubmenu},setCanOpenSubmenu:function(e){this._bCanOpenSubmenu=e},renderer:{}}),r=e.extend("sap.watt.platform.plugin.menubar.service.MenuBar",{_oGroup:null,_oMenuService:null,_oCommandGroupService:null,_lastOpenedMenuItem:null,_mIdToItem:null,_oMenuBar:null,init:function(){this._oMenuService=this.context.service.menu,this._oCommandGroupService=this.context.service.commandGroup,this._oMenuBar=new sap.tnt.ToolHeader({id:"menubar",design:sap.m.ToolbarDesign.Transparent}),this._oMenuBar.addStyleClass("sapWattMenuBar")},configure:function(e){var n=this;return this._oCommandGroupService.getGroup(e.group).then(function(r){return r||t("Configured group '"+e.group+"' is not defined"),n.setGroup(r)})},getContent:function(){return this._oMenuBar},_onMenuItemHoverEvent:function(e,t){for(var n,r=e.getContent(),i=0;i").addClass("ideProgressBar").attr("id",this.PROGRESS_BAR_ID),t=$("
").addClass("ideProgressBarWrapper").append(e);$("body").append(t)},configure:function(e){return this.context.service.resource.includeStyles(e.styles)},_startAnimation:function(){$("#"+this.PROGRESS_BAR_ID).addClass("animate")},_stopAnimation:function(){$("#"+this.PROGRESS_BAR_ID).removeClass("animate")},startTask:function(){var e=Math.floor(1e5*Math.random()+1);return void 0!==e&&null!==e&&(this.runningTasks.push(e),1===this.runningTasks.length&&this._startAnimation()),e},stopTask:function(e){if(void 0!==e&&null!==e){var t=$.inArray(e,this.runningTasks);t!==-1&&(this.runningTasks.splice(t,1),0===this.runningTasks.length&&this._stopAnimation())}}});return t}),define("sap.watt.platform.progress/service/DialogProgress",["sap/watt/platform/plugin/platform/service/ui/AbstractPart"],function(e){"use strict";var t="dialogProgressLoading",n="",r="",i=null,o=e.extend("sap.watt.platform.plugin.progress.service.DialogProgress",{configure:function(e){this._aStyles=e.styles},init:function(){r=n=this.context.i18n.getText("wait_message")},show:function(e,t){if("object"==typeof e){var o=e.onCancel;t=e.onlyOverlay,e=e.message}else"boolean"==typeof e&&(t=e,e=null);r=e||n,i=o;var a=this;return this.context.service.resource.includeStyles(this._aStyles).then(function(){a._isLoaded()&&(jQuery("body").addClass("screenBlocker"),t||a._getDialog(0).show())})},setProgress:function(e,t){this._isLoaded()&&jQuery("body").hasClass("screenBlocker")&&(t&&(r=t),this._getDialog(e||0))},hide:function(){var e=$("#dialogProgressLoading button").control()[0];e&&e.destroy(),jQuery("#"+t).remove(),jQuery("body").removeClass("screenBlocker")},_getDialog:function(e){var n=this,o=jQuery("#"+t);if(!o.length&&(o=jQuery("
").attr("id",t).addClass("sapUiDlg").appendTo("body"),jQuery("
").appendTo(o),jQuery("").attr("max","100").attr("value","0").appendTo(o),"function"==typeof i)){var a=new sap.m.Button({text:this.context.i18n.getText("cancel_button_text"),press:function(){this.setEnabled(!1),Q().then(function(){return i()}).catch(function(e){console.log(e)}).finally(function(){return n.context.service.dialogprogress.hide()}).done()}});a.placeAt(t)}return e=e||0,o.find("> div").text(r),o.find("progress").attr("value",e).html(e),o},_isLoaded:function(){var e=jQuery("#loading");return 0===e.length||"none"===e.css("display")},_getDialogId:function(){return t}});return o}),define("sap.watt.platform.selection/service/Selection",["sap/watt/common/error/AssertError"],function(e){"use strict";return{_oSelectionProvider:null,configure:function(e){var t=this;this.typedSelections={},e.typedSelections.forEach(function(e){var n,r=function(e){return t.selectionProviderChanged(n,e)},i=function(){return t._specialSelectionChangedHandler(n)};t.typedSelections[e.id]=n={id:e.id,service:e.service,provider:void 0,handler:r,providerHandler:i},e.service.attachEvent("selectionProviderChanged",r,t)}),t.typedSelections[""]=this.focusDef={provider:t.context.service.dummyselectionprovider}},getSelection:function(e){var t=this;return this.getOwner(e).then(function(e){return e?e.getSelection().then(t._fixSelection):[]})},_fixSelection:function(e){if(e&&jQuery.isArray(e)){for(var t=0;t0)throw new e("Selection is not empty");return t})},onFocusChanged:function(){var e=this;this.context.service.focus.getFocus().then(function(t){return e.focusDef.provider&&e.focusDef.provider.detachEvent&&e.focusDef.provider.detachEvent("selectionChanged",e._selectionChangedHandler,e),t&&t.instanceOf&&t.instanceOf("sap.watt.common.service.selection.Provider")?(t.attachEvent&&t.attachEvent("selectionChanged",e._selectionChangedHandler,e),e.focusDef.provider=t):e.focusDef.provider=e.context.service.dummyselectionprovider,e._selectionChangedHandler()}).done()},_selectionChangedHandler:function(){var e=this;return this.getSelection().then(function(t){return e.context.event.fireChanged({selection:t,owner:e.focusDef.provider})})},selectionProviderChanged:function(e,t){var n=this,r=t.params.selectionProvider||n.context.service.dummyselectionprovider;if(e.provider!==r)return e.provider&&e.provider.detachEvent("selectionChanged",e.providerHandler,n),e.provider=r,r.attachEvent("selectionChanged",e.providerHandler,n),e.providerHandler()},_specialSelectionChangedHandler:function(e){var t=this;return this.getSelection(e.id).then(function(n){return t.context.event.fireTypedSelectionChanged({id:e.id,selection:n,owner:e.provider})})}}}),define("sap.watt.platform.selection/service/DummySelectionProvider",[],function(){"use strict";return{getSelection:function(){return Q([])}}}),define("sap.watt.platform.usernotification/service/UserNotification",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{_messageBox:null,_oOpenQueue:new Q.sap.Queue,_oResult:{sResult:null,bResult:void 0},_oMessageTypes:{error:{type:"error",title:"",id:"MSG_ERROR"},info:{type:"info",title:"",id:"MSG_INFO"},warning:{type:"warning",title:"",id:"MSG_WARNING"},confirm:{type:"info",title:"",id:"MSG_CONFIRM"},confirmYesNo:{type:"info",title:"",id:"MSG_YESNO"},confirmWithCancel:{type:"info",title:"",id:"MSG_YESNOCANCEL"}},_infoTimeout:4e3,_successTimeout:8e3,_failureTimeout:16e3,_liteNotificationType:{SUCCESS:"SUCCESS",FAILURE:"FAILURE",INFO:"INFO"},configure:function(e){return this.context.service.resource.includeStyles(e.styles).done()},init:function(){var e=this;for(var t in this._oMessageTypes)this._oMessageTypes[t].title=this.context.i18n.getText("i18n","usernotification_"+t+"_title");jQuery.sap.require("sap.ui.commons.MessageBox"),this._messageBox=sap.ui.commons.MessageBox, this.oNotificationsTable=new sap.ui.table.Table({showNoData:!1,visibleRowCount:1,columnHeaderVisible:!1,selectionMode:sap.ui.table.SelectionMode.None,columns:[new sap.ui.table.Column({resizable:!1,template:new sap.ui.core.Icon({src:{path:"type",formatter:function(t){return t===e._liteNotificationType.SUCCESS?"sap-icon://watt/success":t===e._liteNotificationType.FAILURE?"sap-icon://watt/failure":t===e._liteNotificationType.INFO?"sap-icon://watt/info":void 0}},color:{path:"type",formatter:function(t){return t===e._liteNotificationType.SUCCESS?"#75BB75":t===e._liteNotificationType.FAILURE?"#EF6060":void 0}},useIconTooltip:!1}).addStyleClass("notificationIcon"),width:"30px"}),new sap.ui.table.Column({resizable:!1,template:new sap.ui.layout.VerticalLayout({content:[new sap.ui.commons.TextView({text:"{text}"}).addStyleClass("notificationText"),new sap.ui.commons.Button({lite:!0,visible:{path:"command",formatter:function(e){return!!e}},text:{path:"command",formatter:function(e){if(e)return e.getLabel()}},press:function(t){var n=t.getSource().getBindingContext().getObject(),r=n.command,i=n.commandExecuteValue;r.execute(i);var o=n.index;e._closeNotification(o)}}).addStyleClass("actionButton notificationText")]}).addStyleClass("cellVerticalLayout")}),new sap.ui.table.Column({resizable:!1,template:new sap.ui.core.Icon({src:"sap-icon://watt/abort",useIconTooltip:!1,size:"7px",customData:new sap.ui.core.CustomData({writeToDom:!1,value:"{index}"}),press:function(){var t=this.getCustomData()[0].getValue();e._closeNotification(t)}}),width:"20px"})],rows:"{/notifications}"}).addStyleClass("visibleTable"),this.oNotificationsTable.addDelegate({onAfterRendering:function(e){for(var t=e.srcControl.getRows(),n=0;n0&&Q.all(n).then(function(){i.context.service.usernotification.liteInfo(t.context.i18n.getText("i18n","pseudo_files_generated_msg")).done(),i.context.service.log.info("pseudo-translation","Translation test files have been generated successfully.",["system"]).done()})}).done()}},_isDeveloperProperties:function(e){var t=e.getEntity().getName();return t.indexOf(".properties")!==-1&&t.indexOf("_")===-1},_translateTo2Q:function(e){e=this._addDots(e);for(var t="[[[",n=0;n0&&(e+=Array(t+1).join("∙")),e},_getDotsLength:function(e){return e<=4?10-(e+6):e<=10?20-(e+6):e<=15?25-(e+6):e<=20?30-(e+6):e<=80?Math.round(.5*e-6):Math.round(.3*e-6)},_getPseudoContent:function(e){for(var t="",n="",r="",i=!1,o="",a="",s=0;s0&&(r=t.substring(n)),u.report("unhandledError","filepath",r).done()}catch(e){}}),window.addEventListener("webide_service_method_timeout",function(e){u.report("serviceTimeout","module",e.module,"method",e.method).done()})},onAllPluginsStarted:function(){if("xs2"!==sap.watt.getEnv("server_type")){var t=this;return this.context.service.preferences.get("UsageAnalytics").then(function(n){if(!n||n.allowTracking!==!1){var r=e.findIndex(t._aComponents,function(e){return"WARP_TEST"===e});if(t._oService&&r===-1){var i={};return Q.spread(t._getPromisses(),function(e,n,r){return i.isSAPUser=/(@sap.com)$/.test(e.sEMail),i.account=e.sAccount,i.IDE_version=n.version.replace("SNAPSHOT",n.timestamp),i.user=r&&r[0]?r[0]:"",t._oService.setCustomProperties(i).then(function(){t._handleWebIDERefresh(),t._reportLoadedFeatures()})})}}})}},startPerf:function(e,t){if("xs2"!==sap.watt.getEnv("server_type")){var n=this;return this.context.service.preferences.get("UsageAnalytics").then(function(r){r&&r.allowTracking===!1||e&&t&&(n._mPerfMeasures[n._getPerfMeasuresKey(e,t)]=Date.now())})}},report:function(t,n,r,i,o,a){if("xs2"!==sap.watt.getEnv("server_type")){var s=this;return this.context.service.preferences.get("UsageAnalytics").then(function(u){if((!u||u.allowTracking!==!1)&&s._oService){var c=null,l=s._getPerfMeasuresKey(t,n),p=s._mPerfMeasures[l];if(p){var f=Date.now();c=f-p,delete s._mPerfMeasures[l]}var d=s.context.service.log,h=e.findIndex(s._aEventTypes,function(e){return e===n}),m="GENERIC";if(h===-1){n=n?m+"_"+n:m;var g="The reported Event Type: "+n+" should be configured in the reporter's plugin Plugin.json. sEventType is set to "+n;console.error(g),d.error("UsageMonitoring",g).done()}if(n.length>25){n=n.substr(0,25);var v="Event Type "+n+" is too long. Only 25 chars allowed.";d.error("UsageMonitoring",v).done(),console.error(v)}var y=e.findIndex(s._aComponents,function(e){return e===t});if(y===-1){t=t?m+"_"+t:m;var x="The reported Event Component: "+t+" should be configured in the reporter's plugin Plugin.json. sEventComponent is set to "+t;console.error(x),d.error("UsageMonitoring",x).done()}return s._oService.report(t,n,r,c,i,o,a)}})}return Q()},_getPerfMeasuresKey:function(e,t){return e+"~"+t},_getPromisses:function(){var e=[];e.push(this.context.service.system.getSystemInfo());var t=jQuery.sap.getModulePath("sap.watt.uitools.version",".json");return e.push(Q(jQuery.ajax({url:t,dataType:"json"}))),e.push(Q.sap.ajax(sap.watt.getEnv("che_server")+"usageAnalytics/getHashedUser")),e},_handleWebIDERefresh:function(){var e="refresh";sessionStorage.getItem("refreshIDE")?this.report("refreshIDE",e,e).done():sessionStorage.setItem("refreshIDE",e)},_reportLoadedFeatures:function(){var t=this;return t.context.service.featureConfig.getRootFeatureConfig().then(function(n){if(n){var r=n.optionalBundledFeatures;e.forEach(r,function(n){return t.context.service.featureConfig.isFeatureEnabled(n,!0).then(function(r){if(r){var i=e.chain(n.messages).filter(function(e){return"error"===e.severity}).map(function(){return!0}).head().value();i||t.report("featureLoaded","OptionalFeatureLoaded",n.title,n.additionalProperties.account,n.additionalProperties.destination,!n.additionalProperties.isProviderAccount).done()}})})}})}}}),define("sap.watt.platform.warpmonitoring/service/WarpMonitoring",[],function(){"use strict";return{configure:function(e){e&&e.configParams&&(window.swa={baseUrl:e.configParams.baseUrl,clicksEnabled:e.configParams.clicksEnabled})},report:function(e,t,n,r,i,o,a){return n||(n=t),t="ide_"+t,window.swa.custom1={ref:e},window.swa.custom2={ref:r?"USAGE_PERF":"USAGE"},window.swa.custom8={ref:r?r:null},window.swa.custom4={ref:i?i:null},window.swa.custom5={ref:o?o:null},window.swa.custom9={ref:a?a:null},this._trackCustomEvent(t,n)},_trackCustomEvent:function(e,t){if(window.swa.trackCustomEvent&&window.swa.plugin)return window.swa.trackCustomEvent(e,t);var n=setInterval(function(){if(window.swa.trackCustomEvent&&window.swa.plugin)return clearInterval(n),window.swa.trackCustomEvent(e,t)},1e4)},isFioriCloudEdition:!1,setCustomProperties:function(e){function t(){return r._getLandscape(window.document.URL)}function n(){return r._getPerfTime()}window.swa.custom10={ref:e.account},window.swa.custom11={ref:e.user},window.swa.custom3={ref:e.isSAPUser?"SAP":"NONE_SAP"},window.swa.custom6={ref:e.IDE_version};var r=this;return window.swa.custom7={ref:t},window["sap-ide-perf"]&&(window.swa.custom8={ref:n}),this._isFioriCloudEdition().then(function(e){r.isFioriCloudEdition=e}).then(function(){r._initWarp()})},_getPerfTime:function(){return Date.now()-window["sap-ide-perf"]},_getLandscape:function(e){return e.indexOf("int.sap.hana.ondemand.com")>-1?"CANARY":e.indexOf("dispatcher.hana.ondemand.com")>-1||e.indexOf("dispatcher.eu1.hana.ondemand.com")>-1||e.indexOf("cert.hana.ondemand.com")>-1?"FACTORY_GERMANY":e.indexOf("dispatcher.us1.hana.ondemand.com")>-1?"FACTORY_US1":e.indexOf("dispatcher.us2.hana.ondemand.com")>-1?"FACTORY_US2":e.indexOf("dispatcher.ap1.hana.ondemand.com")>-1?"FACTORY_AUS":e.indexOf("dispatcher.eu2.hana.ondemand.com")>-1?"FACTORY_EU2":e.indexOf("dispatcher.cn1.hana.ondemand.com")>-1?"FACTORY_CN1":e.indexOf("dispatcher.jp1.hana.ondemand.com")>-1?"FACTORY_JP1":e.indexOf("hanatrial.ondemand.com")>-1?"TRIAL":e.indexOf("dispatcher.neo.ondemand.com")>-1?"PROD":e.indexOf("staging.hanavlab.ondemand.com")>-1?"STAGING":"UKNOWN"},_isFioriCloudEdition:function(){var e="sap.watt.common.Monitoring",t=this,n="FioriCloudEditionUser";return this.context.service.preferences.get(e).then(function(r){return r&&void 0!==r[n]?r[n]:t.context.service.ajaxrequest.createClient().then(function(i){return i.get("/sap/flp/fiorilaunchpad/fiori/v1/feature_toggle/v1").then(function(){return r={},r[n]=!0,t.context.service.preferences.set(r,e).then(function(){return!0})}).fail(function(){return r={},r[n]=!1,t.context.service.preferences.set(r,e).then(function(){return!1})})})})},_getPubtoken:function(){var e=window.document.URL,t=sap.watt.getEnv("usage_analytics"),n=sap.watt.getEnv("ws_server");if("trial"===t&&e.indexOf("hanatrial.ondemand.com")>-1)return"di"===n?"09cb080a-19aa-f641-8c5b-f38ad7ff1a1b":"4d4c4389-5436-2a46-b0b6-52f55466cc91";if("factory"===t&&e.indexOf(".hana.ondemand.com")>-1)return this.isFioriCloudEdition?"7ca7cffd-c500-bd40-a748-b964812ca4ef":"di"===n?"389d8834-f8fe-7c4b-9142-50e97fc1e087":"9cd40036-9be2-a644-a76b-4b955748f028";switch(t){case"fiori":return sap.watt.getEnv("cd")?"98befd03-ddee-7346-90bb-4339bc1e04ad":"22a14762-30cd-0044-a322-ee69b5026bdf";case"prod":return"851bd492-e2db-5c4f-9916-9a2bbc6cefdf";case"canary_multicloud":return"6992a2f5-c018-e44d-8fd6-e3a72944351c";case"selenium":return"a4f97033-2a5b-cf45-8558-8af24bcc31fc";case"local_trial":return"c8521440-ef31-ae42-a3d2-899d47faa04a";case"local_productive":return"1a29d3cf-2cb6-ba4a-adfb-19fa53425573";default:return"7a7ab2fe-3cf9-4eab-892a-9dc80cad0ca5"}},_initWarp:function(){window.swa.pubToken=this._getPubtoken(),window.swa.optOutCookieTimeout=63113852,window.swa.visitorCookieTimeout=63113852;var e=document,t=e.createElement("script"),n=e.getElementsByTagName("script")[0];t.type="text/javascript",t.defer=!0,t.async=!0,t.src=window.swa.baseUrl+"js/privacy.js",n.parentNode.insertBefore(t,n)}}}),define("sap.watt.common.document/service/Document",["sap/watt/lib/lodash/lodash","sap.watt.platform.filesystem/document/ProjectDocument"],function(e,t){"use strict";return{_mDocumentProvider:{},_mDocuments:{},_changedDocuments:{},init:function(){var t=this;this._freeLockedDocuments=function(){e.forEach(t._mDocuments,function(e){e.then(function(e){return e.release()}).done()})},this.context.service.unloadHandler.addHandler(this._freeLockedDocuments).done()},configure:function(e){var t=this;jQuery.each(e.providers,function(e,n){t._mDocumentProvider[n.type]=n})},getDocument:function(n,r){var i=n.getKeyString(),o=this._mDocuments[i];if(o)return o.then(function(r){var i=r.getEntity();!i.isProject()&&n.isProject()&&(i._bProject=!0,e.assign(r,t.prototype)),i.isProject()&&n.oProjectMetadata&&r.setProjectMetadata(n.oProjectMetadata);var o=i.oMetadata.hasChildren,a=n.getBackendData();a&&!e.isEmpty(a)&&i.setBackendData(a);var s=n.oMetadata;return s&&!e.isEmpty(s)&&e.assign(i.oMetadata,s),n.isFolder()&&void 0!==s.hasChildren&&o!==s.hasChildren&&r._oEventEmitter.fireChanged({document:r,changeType:"children" }).done(),r});if(r)return null;var a=this,s=this.getDocumentProvider(n.getType()),u=s.createDocumentInternally(n,this.context.event);return a._mDocuments[i]=u,u},getContainedDocuments:function(e,t){t=t===!0;for(var n=[],r=[],i=e.getEntity(),o=i.getFullPath()+"/",a=i.getDAO(),s=Object.keys(this._mDocuments),u=0;uthis._nMaxAllowedSizeOfCachedContent?(this.context.service.usagemonitoring.report("contentManager","total_cache_limit",this._nTotalCachedContentSize).done(),this._handleTotalCacheLimitExceeded()):Q()},_removeFilesFromCacheThatShouldBeRemovedFirst:function(){for(var t=[],n=e.values(this._oContentDataMap),r=0;rn;){var a=i[o];t._nTotalCachedContentSize=t._nTotalCachedContentSize-a.length;var s=a.key;r.push(t.context.service.document.getDocumentByKeyString(s)),t._oSpecialFilesContent[a.name]!==!0&&i.shift(),delete t._oContentDataMap[s],o++}return t._invalidateFilesContent(r)})},_handleContentData:function(e){var t=e.key;this._removeContentData(t),this._oContentDataMap[t]=e,e.bRetainInCache=this._oSpecialFilesContent[e.name],this._reportCacheSizeToUsageAnalytics(e),this._nTotalCachedContentSize=this._nTotalCachedContentSize+e.length},_reportCacheSizeToUsageAnalytics:function(e){for(var t=this._nTotalCachedContentSize/this._nMaxAllowedSizeOfCachedContent*100,n=(this._nTotalCachedContentSize+e.length)/this._nMaxAllowedSizeOfCachedContent*100,r=100;r>=10;r-=10)if(n>r&&t<=r){this.context.service.usagemonitoring.report("contentManager","total_cache_size",r).done();break}},onContentChanged:function(e){var t=e.params.document,n=t.getEntity();if(n.isFile()&&t._savedContent&&!t.isDirty()){var r=this._getDocumentContentLength(t),i=n.getKeyString(),o=t.getName(),a=r>this._nMaxAllowedSizeOfCachedFileContent;a?this._invalidateFile(i,r,t):this._updateTotalContentSize({key:i,length:r,timestamp:Date.now(),name:o}).done()}},_invalidateFile:function(e,t,n){t>this._nMaxAllowedSizeOfCachedFileContent&&this.context.service.usagemonitoring.report("contentManager","file_cache_limit",t,n.getEntity().getFullPath()).done(),this._removeContentData(e),n.invalidate()},_getDocumentContentLength:function(e){var t=e.getEntity().oMetadata.length;return t?t:e._savedContent?e._savedContent.length:0}}}),define("sap.watt.common.platform.runinnewprocess/service/RunInNewProcess",[],function(){"use strict";var e=!0;return{openWindowInternal:function(){return Q()},openWindow:function(t){var n=this;!localStorage.getItem("pageBlockAlertRaised")||sap.ui.Device.browser.safari&&e?n._simulate(t).then(function(r){r?n.context.service.popupblockerdialog.openPopupBlockerDialog():n._openWindow("loading",t).done(),localStorage.setItem("pageBlockAlertRaised",!0),e=!1}).done():n._openWindow("loading",t).done()},_openWindow:function(e,t){var n=document.getElementById(e),r=document.createElement("a");return r.setAttribute("href",t.toString()),r.setAttribute("rel","noreferrer"),r.setAttribute("target","_blank"),n.appendChild(r),r.click(),n.removeChild(r),Q()},_simulate:function(e){var t=window.open(e.toString(),"toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1");return!t||t.closed||"undefined"==typeof t.closed||null==t||"undefined"==typeof t?Q(!0):(t.blur(),t.close(),Q(!1))}}}),define("sap.watt.common.platform.runinnewprocess/service/PopupBlockerDialog",[],function(){"use strict";return{_getView:function(e,t){var n="sap.watt.platform.PopupBlockerDialog",r=this.context.i18n.getText("i18n","popup_blocker_text"),i=this.context.i18n.getText("i18n","popup_blocker_info_text"),o=this.context.i18n.getText("i18n","popup_blocker_click_link");return sap.ui.jsview(n,{createContent:function(){var n=new sap.ui.commons.Image({src:require.toUrl(e)}).addStyleClass("popupBlockerDialogImage"),a=new sap.ui.commons.TextView({text:r}).addStyleClass("popupBlockerDialogText"),s=new sap.ui.commons.TextView({text:i}).addStyleClass("popupBlockerDialogText"),u=new sap.ui.commons.Link({text:o,target:"_blank",href:t}).addStyleClass("popupBlockerDialogText"),c=new sap.ui.layout.HorizontalLayout({content:[s,u]}),l=new sap.ui.layout.VerticalLayout({content:[a,c]}),p=new sap.ui.layout.VerticalLayout({content:[l,n]}).addStyleClass("popupBlockerDialogVerticalLayout");return p}}),sap.ui.view({type:sap.ui.core.mvc.ViewType.JS,viewName:n})},_getParamsPerBrowser:function(e){var t,n;switch(e){case"ff":t="sap.watt.common.platform.runinnewprocess/img/PopupBlockerFirefox.gif",n="https://support.mozilla.org/en-US/kb/pop-blocker-settings-exceptions-troubleshooting#w_pop-up-blocker-settings";break;case"ie":t="sap.watt.common.platform.runinnewprocess/img/PopupBlockerIE.gif",n="https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings";break;case"ed":t="sap.watt.common.platform.runinnewprocess/img/PopupBlockerEdge.gif",n="https://support.microsoft.com/en-us/instantanswers/cbfc3333-c95c-4e49-954e-318d3362623c/block-pop-ups-in-microsoft-edge";break;case"sf":t="sap.watt.common.platform.runinnewprocess/img/PopUpBlockerSafari.gif",n="https://support.apple.com/kb/PH21485?locale=en_US";break;case"cr":default:t="sap.watt.common.platform.runinnewprocess/img/PopupBlockerChrome.gif",n="https://support.google.com/chrome/answer/95472?co=GENIE.Platform%3DDesktop&hl=en"}return{sGifUrl:t,sLink:n}},openPopupBlockerDialog:function(e){var t=this,n=this.context.i18n.getText("i18n","popup_blocker_text"),r=this.context.i18n.getText("i18n","popup_blocker_info_text"),i=this.context.i18n.getText("i18n","popup_blocker_visit_site");sap.watt.includeCSS(require.toUrl("sap.watt.common.platform.runinnewprocess/css/PopupBlockerDialogStyles.css"));var o=this._getParamsPerBrowser(sap.ui.Device.browser.name),a=new sap.ui.commons.Dialog({title:t.context.i18n.getText("i18n","popup_blocker_dialog_title"),resizable:!1,width:"500px",height:"550px",modal:!0}).addStyleClass("popupBlockerDialog sapUiSizeCompact");return a.insertButton(new sap.m.Button({text:t.context.i18n.getText("i18n","popup_blocker_dialog_close_button"),press:function(){t.context.service.log.info("Popup Blocker",n+r+" "+i+" "+o.sLink,["user"]).done(),console.log(n+r+" "+i+" "+o.sLink),a.close()}}),0),a.addContent(this._getView(o.sGifUrl,o.sLink)),$("sapWattPopupBlockerImageLoader").remove(),e?void $("").attr("src",require.toUrl(o.sGifUrl)).addClass("sapWattPopupBlockerImageLoader").hide().appendTo("body"):void a.open()}}}),define("sap.watt.platform.filesystem/document/FileDocument",["./AbstractFileSystemDocument"],function(e){"use strict";function t(){e.apply(this,arguments),this._dirtyContent=null,this._savedContent=null,this._oSaveQueue=new Q.sap.Queue,this._oLoadedPromise=Q()}return t.prototype=jQuery.extend(t.prototype,e.prototype),t.prototype.getContent=function(){var e=this;return this._ensureLoaded().then(function(t){return null===e._dirtyContent?t:e._dirtyContent})},t.prototype.setContent=function(e,t){var n=this;return n._ensureLoaded().then(function(r){return n._ensureETagExists().then(function(){var i,o=n._mState.bDirty;if(r===e)n._dirtyContent=null,i=!1;else{if(n._dirtyContent===e)return;n._dirtyContent=e,i=!0}return n._setState({bDirty:i}).then(function(){if(o!==i||r!==e)return n._oEventEmitter.fireChanged({document:n,changeType:"content",options:{source:t}})})})})},t.prototype=jQuery.extend(t.prototype,{save:function(e){var t=this;return e=e!==!1,this.isDirty()?this._oSaveQueue.next(function(){return t._ensureETagExists().then(function(){return t._oDAO.save(t).then(function(n){return t._savedContent=t._dirtyContent,t._dirtyContent=null,t._setState({bDirty:!1,bNew:!1,sETag:n}).then(function(){return t.getProject(!0).then(function(n){if(t._oDAO.context.service.document.context.service.usagemonitoring.report("document","documentSaved",t._mEntity.getName(),t._mEntity.getType(),n.getEntity().getFullPath()).done(),e)return t._oEventEmitter.fireSaved({document:t})})}).thenResolve(n)})})}):Q()},needToReloadCheck:function(){var e=this;return Q.spread([this.getETag(),this.getETag(!0),this.isDirty()],function(t,n,r){return null!==n&&(t!==n?r?e._oOwner.context.service.document.context.service.usernotification.confirm(e._oOwner.context.service.document.context.i18n.getText("i18n","document_reloadQuestion",[e.getEntity().getFullPath()])).then(function(t){return!!t.bResult&&e.reload().then(function(){return!0})}):e.reload().then(function(){return!0}):void 0)}).fail(function(t){return e.exists().then(function(e){if(!e)return Q();throw t})})},_ensureLoaded:function(){var e=this;return this._oLoadedPromise=this._oLoadedPromise.then(function(){return null===e._savedContent?e._oDAO.load(e).then(function(t){return e._savedContent=t.mContent,e._setState({bDirty:!1,sETag:t.sETag}).then(function(){return e._oEventEmitter.fireLoaded({document:e}).thenResolve(t.mContent)})}):e._savedContent}),this._oLoadedPromise},reload:function(e){var t=this;return this.invalidate(),this._dirtyContent=null,this._ensureLoaded().then(function(){return t._oEventEmitter.fireChanged({document:t,changeType:"content",options:{source:e}})})},invalidate:function(){this._savedContent=null},revert:function(e){return this.setContent(this._savedContent,e)},refresh:function(){return this.reload(this)},delete:function(){var e=this;return this.getParent().then(function(t){return Q.spread([e._oDAO.deleteFile(e),e._setState({bExists:!1})],function(n){return n||(n=t),n._deleteDocumentHandler(e)})})},readFileMetadata:function(){var e=this.getETag(!1);return null!==e&&void 0!==e?e:this.getETag(!0)},isBinary:function(){switch(this.getEntity().getFileExtension().toLowerCase()){case"jpg":case"jpeg":case"gif":case"ico":case"png":case"ttf":case"zip":case"jar":case"war":case"bmp":case"tif":case"tiff":case"mtar":return Q(!0);default:return Q(!1)}},createFileBlob:function(){return this.getContent().then(function(e){var t;return"string"==typeof e?t=new Blob([e],{type:"application/text; charset=UTF-8"}):e.type&&!sap.ui.Device.browser.safari?t=new Blob([e],{type:e.type}):e.type&&sap.ui.Device.browser.safari&&(t=new Blob([e],{type:"application/binary"})),t})}}),t}),define("sap.watt.platform.filesystem/document/shared/DocumentLock",["sap/watt/lib/lodash/lodash"],function(e){"use strict";function t(e,t){this._oFileDAOService=t,this._lockExpiredId=void 0,this._oDocument=e,this._oLockQueue=new Q.sap.Queue}return t.prototype.acquire=function(){var e=this;return this._oLockQueue.next().then(function(){return e._bLocked?Q(!0):e._oFileDAOService.getSharedWorkspaceService().then(function(t){var n=Date.now();return Q.spread([t.getLockTimeout(),t.lockDocument(e._oDocument)],function(t){var r=Date.now(),i=t-(r-n);if(i<0)throw new Error("Could not acquire lock for document: "+e._oDocument.getEntity().getFullPath());clearTimeout(e._lockExpiredId),e._bLocked=!0,e._lockExpiredId=setTimeout(function(){e._bLocked=!1},i)}).fail(function(t){if(409===t.status){var n=e._getLockedErrorMessage(t);return e._oDocument._oOwner.context.service.document.notifyConflict(e._oDocument,"locked",n).done(),Q.reject(new Error(n))}return Q.reject(t)})})})},t.prototype._getLockedErrorMessage=function(t){var n=t.responseJSON?t.responseJSON.message:null;return e.isEmpty(n)&&(n=this._oDocument._oOwner.context.service.document.context.i18n.getText("i18n","sharedDocument_locked",[this._oDocument.getEntity().getFullPath()])),n},t.prototype.release=function(){var e=this;return this._oLockQueue.next().then(function(){return e._bLocked?e._oFileDAOService.getSharedWorkspaceService().then(function(t){return t.unlockDocument(e._oDocument).then(function(){e._bLocked=!1,clearTimeout(e._lockExpiredId)})}):Q()})},t}),define("sap.watt.platform.filesystem/document/shared/SharedFileDocument",["../FileDocument","../FileFolderEntity","./DocumentLock"],function(e,t,n){"use strict";function r(){e.apply(this,arguments)}return r.prototype=jQuery.extend(r.prototype,e.prototype),r.prototype=jQuery.extend(r.prototype,{_bWithLock:!0,_initializeLockIfNeeded:function(){this._oLock||(this._oLock=new n(this,this._oDAO))},getContent:function(){var t=this,n=Array.prototype.slice.call(arguments);return this._ensureETagExists().then(function(){return e.prototype.getContent.apply(t,n)})},setContent:function(){var t=Array.prototype.slice.call(arguments);return this._execute(this,e.prototype.setContent,t)},_execute:function(e,t,n){var r=this;return this._bWithLock?(this._initializeLockIfNeeded(),this._ensureETagExists().then(function(){return r._oLock.acquire().then(function(i){return i?t.apply(e,n):Q.spread([r.getETag(),r.getETag(!0)],function(i,o){return i!==o?r._notifyNotSyncedConflictAndReject():t.apply(e,n)})})})):t.apply(e,n)},_notifyNotSyncedConflictAndReject:function(){this._oOwner.context.service.document.notifyConflict(this,"notSynced").done();var e=this._oOwner.context.service.document.context.i18n.getText("i18n","sharedDocument_notSynced",[this.getEntity().getFullPath()]);return Q.reject(new Error(e))},revert:function(){var t=this,n=arguments;return this._releaseLock().then(function(){return t._bWithLock=!1,t._execute(t,e.prototype.revert,n)}).fin(function(){t._bWithLock=!0})},reload:function(){var t=this,n=arguments;return this._releaseLock().then(function(){return t._bWithLock=!1,t._execute(t,e.prototype.reload,n)}).fin(function(){t._bWithLock=!0})},save:function(){var t=this,n=Array.prototype.slice.call(arguments);return t._execute(this,e.prototype.save,n).fin(function(){return t._releaseLock()})},_releaseLock:function(){return this._oLock?this._oLock.release():Q()},release:function(){return this._releaseLock()}}),r}),define("sap.watt.platform.filesystem/service/FilesystemDocumentProvider",["../document/ProjectDocument","../document/FolderDocument","../document/FileDocument","../document/FileFolderEntity","../document/shared/SharedFileDocument"],function(e,t,n,r,i){"use strict";return{_oDAO:null,_workspaceRoot:null,_oFileFilterHandlerService:null,configure:function(e){var t=this;this._oDAO={},e.dao.forEach(function(e){t._oDAO[e.id]=e.service,e.service.attachEvent("externalChanged",t._onExternalChanged,t)}),e.fileFilterHandler&&(this._oFileFilterHandlerService=e.fileFilterHandler.service)},_onExternalChanged:function(e){var t;return t=e.params.oDocument?e.params.oDocument.refresh():this.getRoot().then(function(e){return e.refresh()}),Q.all([this.context.service.document.notifyExternalChange(e.params.oDocument),t])},createDocumentInternally:function(e,t){var n,r=this,i=this._oDAO[e.getDAO()];return i.isShared().then(function(o){return n=o?r._createSharedDocument(e,i,t):r._createDocument(e,i,t),r._oFileFilterHandlerService&&r._oFileFilterHandlerService._prepareDocument(n,i).done(),e.isProject()?n.setProjectMetadata(e.oProjectMetadata).then(function(){return n}):n})},_createSharedDocument:function(n,r,o){var a;switch(n.getType()){case"file":a=new i(this,r,n,o);break;case"folder":a=n.isProject()?new e(this,r,n,o):new t(this,r,n,o);break;default:throw new Error("Not supported entity type "+n.getType())}return a},_createDocument:function(r,i,o){var a;switch(r.getType()){case"file":a=new n(this,i,r,o);break;case"folder":a=r.isProject()?new e(this,i,r,o):new t(this,i,r,o);break;default:throw new Error("Not supported entity type "+r.getType())}return a},createExtDocumentInternally:function(e,t){var i=e.type,o=e.name,a=e.path,s=e.content,u=new r(i,o,a),c=new n(this,null,u,t);return c._savedContent=s,c},_workspaceRoots:{},getRoot:function(e){var t=this,n="workspace";return e=e||n,this._workspaceRoots[e]?Q(this._workspaceRoots[e]):e===n?this.getDocument("").then(function(n){return t._workspaceRoots[e]=n,n}):this._oDAO[e].getRoot(e).then(function(n){return t._workspaceRoots[e]=n,n})},getDocumentByKeyString:function(e){var t=r.fromKeyString(e),n=t.getFullPath(),i=t.getDAO(),o=t.getVersionId();return this.getDocument(n,i,o).then(function(e){return e&&e.getType()===t.getType()?e:null})},getDocument:function(e,t,n){t=t||"workspace";var i=this,o=i.context.service.document;return Q.spread([o.getDocument(new r("file",e,void 0,t),!0),o.getDocument(new r("folder",e,void 0,t),!0)],function(r,o){return r||o||i._oDAO&&i._oDAO[t]&&i._oDAO[t].getDocument(e,t,n)})},search:function(e,t){return t=t||"workspace",this._oDAO[t].search(e,t)},_getParentDocument:function(e,t){return e&&e.getEntity().isFolder()?Q(e):this.getRoot(t)},createProject:function(e,t,n){return n=n||"workspace",this._getParentDocument(t,n).then(function(t){return t.createProject(e)})}}}),define("sap.watt.platform.filesystem/service/FilesystemJsonProvider",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{_getFileContent:function(e){if(e)return e.getContent().then(function(e){try{var t=JSON.parse(e);return t}catch(e){var n=new Error(e);throw n.name="ParseError",n}});var t=new Error("File does not exist");throw t.name="FileDoesNotExist",t},_isContentLengthValid:function(e){var t=e.length;return!(t&&t>5e6)},_setFileContent:function(e,t){if(!e){var n=new Error("File does not exist");throw n.name="FileDoesNotExist",n}if(!this._isContentLengthValid(t)){var r=new RangeError("Invalid content length");throw r}try{var i=JSON.stringify(t,null,"\t");return e.setContent(i).then(function(){return e.save().then(function(){return!0})})}catch(e){var n=new Error(e);throw n.name="JsonError",n}},_getFileDocument:function(t,n,r){var i=this;return this.context.service.filesystem.documentProvider.getDocument(t).then(function(t){return t&&t.getEntity().isFolder()?t.getCurrentMetadata(r).then(function(t){var r=e.find(t,function(e){return e.name===n});if(r)return i.context.service.filesystem.documentProvider.getDocument(r.path)}):t})},readJson:function(e,t,n){var r=this;return this._getFileDocument(e,t,n).then(function(e){return r._getFileContent(e)})},findAndWriteJson:function(e,t,n,r){var i=this;return this._getFileDocument(t,n,r).then(function(t){return i._setFileContent(t,e)})},writeJson:function(e,t){var n=this;if(t){var r=t.lastIndexOf("/"),i=t.substring(0,r);return this.context.service.filesystem.documentProvider.getDocument(i).then(function(i){if(i){var o=t.substring(r+1,t.length);return i.touch(o).then(function(t){return n._setFileContent(t,e)})}})}},writeJsonByDocument:function(e,t){return this._setFileContent(e,t)},getJSONContent:function(e){var t=this;return e?e.getContent().then(function(n){var r=function(){return e.setContent("{\n\n}").then(function(){return e.save().then(function(){return{}})})};if(""===n)return r();try{return JSON.parse(n)}catch(e){return t.context.service.log.error("FileSystemJSONProvider","Failed to parse JSON content,"+e.message,["user"]).done(),{}}}):Q({})}}}),define("sap.watt.platform.tipsandtricks/command/OpenTipsAndTricks",{execute:function(){return this.context.service.tipsandtricks.openTipsAndTricksDialog()},isAvailable:function(){return this.context.service.tipsandtricks.getValidConfiguredTipsArray().then(function(e){return e&&e.length>=1})},isEnabled:function(){return!0}}),define("sap.watt.platform.tipsandtricks/datastructures/CyclicDoublyLinkedList",[],function(){var e=function(e){void 0===e&&(e=[]),this._currentNode=null,this._firstNode=null,this._lastNode=null;for(var t=0;t1});e.forEach(o,function(e){console.error("Tip ID: "+e[0].id+" exists "+e.length+" times and that's not cool! Only one of them will appear in the dialog.")})}var a=e.map(r,function(e){return void 0!==e.available?Q():e.service.isAvailable().then(function(t){e.available=t})});return Q.all(a).then(function(){var t=e.filter(r,function(e){return e.available});return t})}function u(n){return s(n.tips).then(function(n){d=n,f=new t(e.shuffle(n))})}function c(){return f}function l(){return d}var p,f=null,d=null,h="sap.watt.platform.tipsandtricks.service.tipsandtricks";return{init:n,openTipsAndTricksDialog:o,configure:u,getValidConfiguredTipsArray:l,getShowOnStartup:r,_getConfigsList:c,_changeDialogContentTo:a,_filterInvalidTips:s}}),define("sap.watt.platform.tipsandtricks/uicontrols/ShortcutLabel",[],function(){jQuery.sap.require("sap.ui.commons.Label");var e=sap.ui.commons.Label.extend("sap.watt.platform.plugin.tipsandtricks.ui.controls.ShortcutLabel",{renderer:function(e,t){e.addStyle("color","#346187"),e.addStyle("font-size","12px"),e.addStyle("font-family","Segoe UI"),e.addStyle("border-color","#4d4d4d !important"),e.addStyle("background-color","white"),e.addStyle("border-bottom","1px double"),e.addStyle("border-bottom-width","4px"),e.addStyle("border-top","1px solid"),e.addStyle("border-right","1px solid"),e.addStyle("border-left","1px solid"),sap.ui.commons.LabelRenderer.render(e,t),e.writeStyles()}});return e}),define("sap.watt.platform.tipsandtricks/service/TipsAndTricksViewsFactory",["sap/watt/lib/lodash/lodash","../uicontrols/ShortcutLabel"],function(e,t){function n(){s=this}function r(e){var t=e.getKeyBindingAsText(),n=t.indexOf("+")>=0?t.split("+"):t.split("");return n}function i(n){var i=[];return e.forEach(n,function(e){for(var n=r(e),o=[],a=0,s=0;a<2*n.length-1;++a)a%2===0?(o.push(new t({text:n[s]})),s++):o.push(new sap.ui.commons.Label({text:"+"}));var u=new sap.ui.layout.HorizontalLayout({content:o}).addStyleClass("tipsAndTricksViewShortcutsHorizontalLayout");i.push(u)}),new sap.ui.layout.VerticalLayout({content:i}).addStyleClass("tipsAndTricksViewShortcutsVerticalLayout")}function o(t,n,r,o,a){var u=e.map(o,function(e){return s.context.service.command.getCommand(e)});return Q.all(u).then(function(e){return sap.ui.jsview(t,{createContent:function(){var t=new sap.ui.commons.Image({src:require.toUrl(n)}).addStyleClass("tipsAndTricksViewImage"),o=new sap.ui.commons.Label({text:r}).addStyleClass("tipsAndTricksViewTipTitle"),s=new sap.ui.commons.TextView({text:a}).addStyleClass("tipsAndTricksViewTipText"),u=i(e),c=new sap.ui.layout.VerticalLayout({content:[o,u,s]}).addStyleClass("tipsAndTricksViewVerticalLayout"),l=new sap.ui.layout.HorizontalLayout({content:[t,c]}).addStyleClass("tipsAndTricksViewHorizontalLayout");return l}}),sap.ui.view({type:sap.ui.core.mvc.ViewType.JS,viewName:t})})}function a(e,t,n,r){return sap.ui.jsview(e,{createContent:function(){var e=new sap.ui.commons.Image({src:require.toUrl(t)}).addStyleClass("tipsAndTricksViewImage"),i=new sap.ui.commons.Label({text:n}).addStyleClass("tipsAndTricksViewTipTitle"),o=new sap.ui.commons.TextView({text:r}).addStyleClass("tipsAndTricksViewTipText"),a=new sap.ui.layout.VerticalLayout({content:[i,o]}).addStyleClass("tipsAndTricksViewVerticalLayout"),s=new sap.ui.layout.HorizontalLayout({content:[e,a]}).addStyleClass("tipsAndTricksViewHorizontalLayout");return s}}),sap.ui.view({type:sap.ui.core.mvc.ViewType.JS,viewName:e})}var s;return{init:n,buildShortcutView:o,buildSimpleTipView:a,_getCommandKeyBindingAsArray:r,_buildShortcutsLayout:i}}),define("sap.watt.common.perspective/command/ResetToDefault",[],function(){"use strict";return{execute:function(){this.context.service.perspective.resetToDefault().done()},isAvailable:function(){return!0},isEnabled:function(){return!0}}}),function(){"use strict";jQuery.sap.declare("sap.watt.common.plugin.perspective.control.Shell"),sap.ui.core.Control.extend("sap.watt.common.plugin.perspective.control.Shell",{metadata:{aggregations:{content:{type:"sap.ui.core.Control"}}},renderer:function(e,t){e.write(""),e.write("");for(var n=t.getContent(),r=0;r"),e.write("
")}})}(),define("sap.watt.common.perspective/control/Shell",function(){}),function(){"use strict";jQuery.sap.declare("sap.watt.common.plugin.perspective.control.Box"),sap.ui.core.Control.extend("sap.watt.common.plugin.perspective.control.Box",{metadata:{aggregations:{content:{type:"sap.ui.core.Control"}}},renderer:function(e,t){e.write("
");for(var n=t.getContent(),r=0;r")}})}(),define("sap.watt.common.perspective/control/Box",function(){}),function(){"use strict";jQuery.sap.declare("sap.watt.common.plugin.perspective.control.Splitter"),sap.ui.commons.Splitter.extend("sap.watt.common.plugin.perspective.control.Splitter",{renderer:"sap.ui.commons.SplitterRenderer"}),sap.watt.common.plugin.perspective.control.Splitter.prototype.setResizeListener=function(e,t){this.fnResizeListener=e,this.oResizeListenerContext=t},sap.watt.common.plugin.perspective.control.Splitter.prototype.resizeSplitterElements=function(){var e,t,n,r,i,o,a;sap.ui.getCore().getConfiguration().getRTL();this.spOrientation===sap.ui.commons.Orientation.Vertical?(n=jQuery(this.splitterDIV).width(),a=this.getProperty("splitterBarVisible")?this.sbSize:0,e=100*a/n,this.sBarPosition>100||this.sBarPosition+e>100?(this.sBarPosition>99&&(this.sBarPosition=e>1?99:100-e), a=(100-this.sBarPosition)*n/100,i=0):i=100-e-this.sBarPosition,jQuery(this.firstPane).css("width",this.sBarPosition+"%"),jQuery(this.splitterBar).css("width",a+"px"),jQuery(this.secondPane).css("width",i+"%")):(r=jQuery(this.splitterDIV).height(),a=this.getProperty("splitterBarVisible")?this.sbSize:0,t=100*a/r,this.sBarPosition>100||this.sBarPosition+t>100?(this.sBarPosition>99&&(this.sBarPosition=t>1?99:100-t),a=(100-this.sBarPosition)*r/100,o=0):o=100-t-this.sBarPosition,jQuery(this.firstPane).css("height",this.sBarPosition+"%"),jQuery(this.splitterBar).css("height",a+"px"),jQuery(this.secondPane).css("height",o+"%")),this.setProperty("splitterPosition",this.sBarPosition+"%",!0),0===jQuery(this.splitterDIV).height()&&(jQuery(this.splitterDIV).css("height","100%"),jQuery(this.splitterBar).css("height","100%")),this.fnResizeListener&&this.fnResizeListener.call(this.oResizeListenerContext,this)}}(),define("sap.watt.common.perspective/control/Splitter",function(){}),define("sap.watt.common.perspective/service/Perspective",["sap/watt/platform/plugin/platform/service/ui/AbstractPart","../control/Shell","../control/Box","../control/Splitter"],function(e){"use strict";function t(){this._oParent=void 0,this._iPaneNumber=void 0,this._sDefaultSplitterPosition=void 0,this._bIsVisible=!0}function n(){t.call(this),this._aChildContainers=[],this._aAreas=[]}function r(e){n.call(this),this._oSplitter=e}function i(e){n.call(this),this._oBox=e}function o(e,n){t.call(this),this._sId=e.id,this._sPositionDefinition=e.position,this._sCssClass=e.cssclass,this._sDefaultView=e.view,this._sCurrentView=e.view,this._bIsVisibleByDefault=e.view&&"false"!==e.visible,this._oContent=null,this._mViews=n}function a(e,t,n,r){this._sId=e,this._mAreas={},this._oPreferencesModel=n,this._bEnableSplitterEvents=!0,this._bSplitterEventsFiredWhilePostponed=!1,this._bPerspectiveLoadError=!1,this._oMainContainer=null,this._mBeforeMaximized=null,this._mViews=t,this._mViewToDefaultArea={},this._bIsListeningToServicesVisibility=!1,this._oFocusService=r.service.focus,this._oEvents=r.event}function s(e){this._sCurrentPerspective=void 0,this._mPerspectiveStates={},this._bEnabled=!1,this._fPersistenceSrv=e.service,this._sPersistenceNode=e.node,this._formatVersion=1}t.prototype={setParent:function(e,t,n){this._oParent=e,this._iPaneNumber=t,this._sDefaultSplitterPosition=n},setContent:function(e){this._oParent.setChildContent(this._iPaneNumber,e)},removeContent:function(){this._oParent.removeChildContent(this._iPaneNumber)},hasContent:function(e){return this._oParent.hasChildContent(this._iPaneNumber,e)},getFullSizePosition:function(){return this._oParent.getChildFullSizePosition(this._iPaneNumber)},hide:function(){this._oParent&&this._oParent.canHideChild()&&(this._bIsVisible=!1,this._oParent.hideChild(this._iPaneNumber))},show:function(e){this._bIsVisible=!0,this._oParent&&this._oParent.showChild(this._iPaneNumber,e)},isVisible:function(){return this._bIsVisible}},n.prototype=jQuery.extend(Object.create(t.prototype),{addChildContainer:function(e){this._aChildContainers.push(e),e instanceof o&&this._aAreas.push(e)},traverse:function(e){e(this);for(var t=0;t0&&this._oSplitter.removeAllFirstPaneContent():this._oSplitter.getSecondPaneContent().length>0&&this._oSplitter.removeAllSecondPaneContent()},addChildContent:function(e,t){0===e?this._oSplitter.addFirstPaneContent(t):this._oSplitter.addSecondPaneContent(t)},hasChildContent:function(e,t){return 0===e?this._oSplitter.indexOfFirstPaneContent(t)!==-1:this._oSplitter.indexOfSecondPaneContent(t)!==-1},getChildFullSizePosition:function(e){return 0===e?"100%":"0%"},getChildHiddenSizePosition:function(e){return 0===e?"0%":"100%"},canHideChild:function(e){return!0},hideChild:function(e){for(var t=!1,n=0;n0&&this._oBox.removeAllContent()},addChildContent:function(e,t){this._oBox.addContent(t)},hasChildContent:function(e,t){return this._oBox.indexOfContent(t)!==-1},getChildFullSizePosition:function(e){},canHideChild:function(e){return!1},hideChild:function(e){},showChild:function(e,t){}}),o.prototype=jQuery.extend(Object.create(t.prototype),{getCurrentViewId:function(){return this._sCurrentView},getCurrentView:function(){return this._mViews[this._sCurrentView]},setCurrentViewId:function(e){this._sCurrentView=e},canRestore:function(){var e=this.getCurrentView();return!!e&&(void 0===e.restore||"true"===e.restore)},shouldOpenAfterNormalize:function(){if(this._sCurrentView){var e=this.getCurrentView();return!!e&&"true"===e.alwaysOpenAsDefaultAfterNormalized}return!1},getOtherAreaInParent:function(){if(!this._oParent)return null;for(var e=0;eUnavailable service: '"+t+"'
",sanitizeContent:!0});return o.setContent(n),console.error("Perspective: cannot acquire content from view '"+t+"'",e),!0})},_showViewAt:function(e,t,n){var r=this;return this._setViewContentAtArea(e,t,!0,n).then(function(t){if(t){var n=r.getArea(e);if(!n.isVisible()){var i=r._getAreaDefaultPosition(e);n.show(i)}}return t})},_getAreaDefaultPosition:function(e){var t,n=this.getArea(e),r=n.getOtherAreaInParent();return r&&!r.isVisible()&&(t=n.getFullSizePosition()),t||(t=this._getAreaLastKnownPosition(e)||n._sDefaultSplitterPosition),t},hasLoadError:function(){return this._bPerspectiveLoadError},clearLoadError:function(){this._bPerspectiveLoadError=!1},setDefaultFocus:function(){var e=this,t=void 0;return jQuery.each(this._mAreas,function(n,r){if(r.isVisible()){var i=r.getCurrentView();if(i&&i.service)return t=e._oFocusService.setFocus(i.service),!1}}),t||Q()},hide:function(){this._stopListeningToServicesVisibility();var e=[];return jQuery.each(this._mAreas,function(t,n){if(n._oContent=null,n.isVisible()){var r=n.getCurrentView();r&&e.push(r.service.setVisible(!1))}}),Q.all(e)},onServiceVisibilityChanged:function(e){var t=this,n=this.findViewForService(e.source);if(!n)return Q();var r,i=!1,o=this.getAreaForView(n);return e.params.visible?(o||(o=this._mViewToDefaultArea[n]),o&&(r=this._showViewAt(o,n,!1),i=!0)):o&&(this.getArea(o).hide(),i=!0),r=r||Q(),i&&(r=r.then(function(e){return t.savePreferences().then(function(){return t._oEvents.firePerspectiveChanged({from:t._sId,to:t._sId}).then(function(){return e})})})),r},_createLayoutStructure:function(){var e=this._createLayoutStructureFromAreaPositions();return e=this._restructureToBiPartitionLayout(e),e=this._condenseLayout(e,!0)},_createLayoutStructureFromAreaPositions:function(){var e,t={content:{}};return jQuery.each(this._mAreas,function(n,r){var i=r._sPositionDefinition.split(":");e=t.content;for(var o=i.length,a=0;a1?s[1]:void 0;e[u]=e[u]||{},c&&(e[u].size=c),a===o-1?e[u].area=r:(e[u].content=e[u].content||{},e=e[u].content)}}),t},_restructureToBiPartitionLayout:function(e){function t(e){for(var t=Object.keys(e),n=0,r=0,i=0;i0?100*f/r:100,u+=f,p.size=i+"%",l1){var a=new sap.watt.common.plugin.perspective.control.Splitter({showScrollBars:!1,width:"100%",height:"100%",splitterPosition:"50%"});a.setResizeListener(this.onSplitterResize,this),a.setSplitterOrientation(e.orientation),o=new r(a)}else{var s=new sap.watt.common.plugin.perspective.control.Box;o=new i(s)}for(var u=0;uUnavailable view: '"+n+"'
",sanitizeContent:!0})}).then(function(e){i._oContent=e,t._setupContentAfterRendering(i)});n.push(a)}}),Q.all(n)},_setAreasVisibilityAndContent:function(e,t){var n=this;n.postponeSplitterEvents();var r=[];return jQuery.each(this._mAreas,function(i,o){var a=e[i];if(a===s.HIDDEN_AREA)t&&o.isVisible()&&o.getCurrentViewId()?r.push(n._setViewVisibilityWithoutEvent(o.getCurrentViewId(),!1).then(function(){o.hide()})):o.hide();else{var u=n._setViewVisibilityWithoutEvent(o.getCurrentViewId(),!0).then(function(){o.hasContent(o._oContent)||o.setContent(o._oContent),o.show(a)});r.push(u)}}),Q.all(r).then(function(){n.enableSplitterEvents()})},_setupContentAfterRendering:function(e){var t=e._oContent,n=e.getCurrentView().cssclass||e._sCssClass;n&&t.addStyleClass(n),t.addStyleClass("sapWattSplitterPane"),this._attachFocusToContent(e,t)},_attachFocusToContent:function(e,t){var n=this;t.__bAfterRenderingFocusAttached||(t.__bAfterRenderingFocusAttached=!0,t.addEventDelegate({onAfterRendering:function(){var t=e.getCurrentView(),r=t.service;r&&n._oFocusService.attachFocus(r).done()}}))},_setViewVisibilityWithoutEvent:function(e,t){var n=this,r=this._mViews[e].service;return this._bIsListeningToServicesVisibility?(r.detachEvent("visibilityChanged",this.onServiceVisibilityChanged,this),r.setVisible(t).then(function(){r.attachEvent("visibilityChanged",n.onServiceVisibilityChanged,n)})):r.setVisible(t)},_getPerspectiveState:function(e){var t={content:{}};return this._oMainContainer.traverse(function(e){var n=[];jQuery.each(e._aAreas,function(i,o){var a=o._sId;if(n.push(a),o.isVisible()){e instanceof r&&(t[a]=e.getControl().getSplitterPosition());var u=o.getCurrentView();u&&"false"!==u.persist&&(t.content[a]=u.id)}else t[a]=s.HIDDEN_AREA}),2===n.length&&(t[n[1]]!==s.HIDDEN_AREA?delete t[n[1]]:t[n[0]]!==s.HIDDEN_AREA&&delete t[n[0]])}),e!==!1&&this._mBeforeMaximized&&(t.beforeMaximized=this._mBeforeMaximized),t}};var u=e.extend("sap.watt.common.plugin.perspective.service.Perspective",{_shell:void 0,_oRendererQueue:Q(),_oPreferencesModel:void 0,_defaultPerspective:void 0,_activePerspective:void 0,_mPerspectives:{},_aInitialPerspectiveChoosers:[],configure:function(e){var t=this;this._defaultPerspective=e.defaultPerspective,this._aStyles=e.styles;var n={};n.service=this.context.service.preferences,n.node=e.preferenceService&&e.preferenceService.node||"sap.watt.common.service.ui.Perspective",this._oPreferencesModel=new s(n);var r={};jQuery.each(e.perspectives,function(e,n){t._defaultPerspective||(t._defaultPerspective=n.id),t._mPerspectives[n.id]=new a(n.id,r,t._oPreferencesModel,t.context)});var i={};jQuery.each(e.views,function(e,t){r[t.id]=t,t.area&&(i[t.id]=t.area)});var u={};jQuery.each(e.areas,function(e,n){var i=n.id,a=n.perspective;if(u[i]=u[i]||[],u[i].push(a),!t._mPerspectives[a])return void t.context.service.log.warn("Perspective",'Configuration error: contribution to undefined perspective named "'+a+'"',["system"]);var s=new o(n,r);t._mPerspectives[a].addArea(s);var c=n.view;return c&&!r[c]?void t.context.service.log.warn("Perspective","Configuration error: view with id "+n.view+" not found",["system"]):void 0}),jQuery.each(e.viewToAreaMapping,function(e,n){var r=t._mPerspectives[n.perspective];if(!r)return t.context.service.log.warn("Perspective",'Configuration error: contribution to undefined perspective named "'+n.perspective+'"',["system"]).done(),!0;var i=r.getArea(n.area);return i?void r.setDefaultAreaForView(n.view,n.area):(t.context.service.log.warn("Perspective",'Configuration error: area named "'+n.area+'" not found in perspective named "'+n.perspective+'"',["system"]).done(),!0)}),jQuery.each(i,function(e,n){return u[n]?void jQuery.each(u[n],function(r,i){t._mPerspectives[i].setDefaultAreaForView(e,n)}):(t.context.service.log.warn("Perspective",'Configuration error: area named "'+n+'" set for view "'+e+'" not found',["system"]).done(),!0)});var c=[].concat(e.initialPerspectiveChooser);c.sort(function(e,t){return e.priority-t.priority}),this._aInitialPerspectiveChoosers=jQuery.map(c,function(e){return e.service})},isPerspectiveRegistered:function(e){return!!this._mPerspectives[e]},getContent:function(){var e,t=this;return e=this._aStyles?this.context.service.resource.includeStyles(this._aStyles).then(function(){return t.renderPerspective(t._activePerspective)}):this.renderPerspective(this._activePerspective),e.then(function(){return t._shell})},report:function(e,t){this.context.service.usagemonitoring.report("Perspective",e,t).done()},resetToDefault:function(){return this._getCurrentPerspective().resetToDefault()},getCurrentPerspective:function(){return this._getCurrentPerspectiveName()},_getCurrentPerspectiveName:function(){return this._activePerspective||this._defaultPerspective},_getCurrentPerspective:function(){return this._mPerspectives[this._getCurrentPerspectiveName()]},_handleViewProblem:function(e){var t=this;return this.context.service.usernotification.alert(e).then(function(){return t._getCurrentPerspective().clearLoadError(),t._getCurrentPerspective().resetToDefault(!1)})},placeServiceAt:function(e,t){return"string"==typeof t?this._getCurrentPerspective().placeViewAt(e,t):this._getCurrentPerspective().placeServiceAt(e,t)},getServiceAt:function(e){var t=this._getCurrentPerspective().getArea(e);if(t){var n=t.getCurrentView();return n?n.service:void 0}},getViewIdAt:function(e){var t=this._getCurrentPerspective().getArea(e);if(t)return t.getCurrentViewId()},getAreaForService:function(e){return"string"==typeof e?this._getCurrentPerspective().getAreaForView(e):this._getCurrentPerspective().getAreaForService(e)},setAreaMaximized:function(e,t){return this._getCurrentPerspective().setAreaMaximized(e,t)},isAreaMaximized:function(e){return this._getCurrentPerspective().isAreaMaximized(e)},setAreaVisible:function(e,t){return this._getCurrentPerspective().setAreaVisible(e,t)},isAreaVisible:function(e){var t=this._getCurrentPerspective().getArea(e);return!!t&&t.isVisible()},renderPerspective:function(e){var t=this;return this._oRendererQueue=this._oRendererQueue.then(function(){return t._renderPerspective(e)}),this._oRendererQueue},_renderPerspective:function(e){var t=this,n=Q();return e||(jQuery.each(this._aInitialPerspectiveChoosers,function(r,i){n=n.then(function(){if(!e||!t._mPerspectives[e])return i.choosePerspective().then(function(t){e=t})})}),n=n.then(function(){if(!e||!t._mPerspectives[e])return t._oPreferencesModel.read().then(function(){e=t._oPreferencesModel.getCurrentPerspective(),e&&t._mPerspectives[e]||(e=t._defaultPerspective)})})),n.then(function(){var n=t._mPerspectives[e];if(!n)return void t.context.service.log.error("Perspective","renderPerspective: requested perspective "+e+" not found",["system"]).done();var r=t._activePerspective;t._activePerspective=e;var i=Q();return t._activePerspective!==r&&(r&&(i=t._mPerspectives[r].hide()),i=i.then(function(){return n.getContent().then(function(e){return n.postponeSplitterEvents(),t._shell?(t._shell.removeAllContent(),t._shell.addContent(e),t._shell.rerender(),n.firePendingSplitterEvent().then(function(){var e=t._oPreferencesModel.getCurrentPerspective();if(e!==t._activePerspective)return t._oPreferencesModel.setCurrentPerspective(t._activePerspective),t._oPreferencesModel.storeSession()})):(t._shell=new sap.watt.common.plugin.perspective.control.Shell({id:"mainShell",content:e}),t._shell.addEventDelegate({onAfterRendering:function(){n.firePendingSplitterEvent().done()}}),n.setPreferenceSavingEnabled(!0),void 0)})})),i.then(function(){return n.setDefaultFocus().done()}).then(function(){if(n.hasLoadError())return t._handleViewProblem(t,t.context.i18n.getText("i18n","perspective_message_load_issue"))}).then(function(){return t.context.event.firePerspectiveChanged({from:r,to:t._activePerspective})})})},getPerspectivesForService:function(e){return"string"==typeof e?this._getPerspectivesForView(e):this._getPerspectivesForService(e)},_getPerspectivesForView:function(e){var t=[];return jQuery.each(this._mPerspectives,function(n,r){r.getDefaultAreaForView(e)&&t.push(n)}),t},_getPerspectivesForService:function(e){var t,n=[];return jQuery.each(this._mPerspectives,function(r,i){return!!(t=t||i.findViewForService(e))&&void(i.getDefaultAreaForView(t)&&n.push(r))}),n}});return s.HIDDEN_AREA="hidden",s.prototype={setNetEnabled:function(e){this._bEnabled=e},getNetEnabled:function(){return this._bEnabled},getCurrentPerspective:function(){return this._sCurrentPerspective},setCurrentPerspective:function(e){this._sCurrentPerspective=e},read:function(e){var t=this;return this._fPersistenceSrv.get(this._sPersistenceNode).then(function(n){if(n&&n.version===t._formatVersion){t._sCurrentPerspective=n._currentPerspective;for(var r in n)(e&&r===e||!t._mPerspectiveStates[r])&&(t._mPerspectiveStates[r]=n[r])}}).fail(function(e){return console.error("perspective: user settings could not be loaded! "+e),null})},beginSession:function(e){var t=this;return this.read(e).then(function(){return t._mPerspectiveStates[e]||{}})},storeSession:function(e,t){var n;return this.getNetEnabled()&&(this._mPerspectiveStates.version=this._formatVersion,this._mPerspectiveStates._currentPerspective=this._sCurrentPerspective,e&&(this._mPerspectiveStates[e+"_lastKnown"]=this._extractLastKnown(this._mPerspectiveStates[e+"_lastKnown"],this._mPerspectiveStates[e],t),this._mPerspectiveStates[e]=t),n=this._fPersistenceSrv.set(this._mPerspectiveStates,this._sPersistenceNode).fail(function(e){console.error("perspective: user settings could not be written! "+e)})),n||Q()},removeSession:function(e){var t;return this.getNetEnabled()&&(delete this._mPerspectiveStates[e],delete this._mPerspectiveStates[e+"_lastKnown"],t=this._fPersistenceSrv.set(this._mPerspectiveStates,this._sPersistenceNode).fail(function(e){console.error("perspective: user settings could not be written! "+e)})),t||Q()},getLastKnown:function(e){return this._mPerspectiveStates[e+"_lastKnown"]},_extractLastKnown:function(e,t,n){function r(e,t){t&&jQuery.each(t,function(t,n){return"content"===t||(n===s.HIDDEN_AREA||(!!e[t]||void(e[t]=n)))})}var i={};return r(i,n),r(i,t),r(i,e),i}},u}),define("sap.watt.common.platform/service/keepalive/KeepAlive",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{_bIsAlive:!0,_activityWasDetected:!1,_pingCounter:0,_pingSessionTimeout:void 0,_actions:["keydown","mousemove","mousedown"],_sPersistencyNode:"sap.watt.common.plugin.platform.service.keepalive.KeepAlive",init:function(){var e=this;window.addEventListener("webide_session_gone",function(){return e._openNewSessionWindow(),e.oNewSessionWindow?void e._restoreSession(e.context).then(function(){return e._reloadIfNeeded().then(function(){return e.context.service.usagemonitoring.report("keepAlive","reconnect_on_session_loss").then(function(){e._bIsAlive=!0,e._pingSession(1),e._closeNewSessionWindow()})})}).fail(function(){return e._closeNewSessionWindow(),e._reload("refresh_on_error")}).done():e.context.service.runinnewprocess.openWindow(e._getSessionGonePageUrl())},!1)},configure:function(e){!e.disabled&&e.maxPingQuantity&&(this._nLastLogonTimestamp=Date.now(),this._preferencesService=e.preferencesService,this._saveLastLogonTimestamp(this._nLastLogonTimestamp).done(),this._contentService=e.dirtyCheckService,this._ddsService=e.dirtyDocumentsStorageService,this._iTimeoutInMinutes=e.timeoutInMinutes,this._maxPingQuantity=e.maxPingQuantity,this._pingSession(1),this._manageEvents(),this.context.service.usernotification.liteNotificationInfo(this.context.i18n.getText("i18n","keepAlive_empty"),!0).done(),this.context.service.runinnewprocess.openWindowInternal().done(),this.context.service.popupblockerdialog.openPopupBlockerDialog(!0).done())},_openNewSessionWindow:function(){this.oNewSessionWindow=window.open(this._getSessionGonePageUrl())},_closeNewSessionWindow:function(){this.oNewSessionWindow&&this.oNewSessionWindow.close()},_getWebIdeVersion:function(e){var t=jQuery.sap.getModulePath("sap.watt.uitools.version",".json");return Q.sap.ajax({url:t,beforeSend:function(t){e&&t.setRequestHeader("Cache-Control","no-cache")},dataType:"json"})},_reload:function(e){return this.context.service.usagemonitoring.report("keepAlive",e).then(function(){window.location.reload()})},_reloadIfNeeded:function(){var e=this;return this._getLastLogonTimeStamp().then(function(t){return t!==e._nLastLogonTimestamp?e._reload("refresh_on_new_logon"):Q.spread([e._getWebIdeVersion(),e._getWebIdeVersion(!0)],function(t,n){var r=t[0].version,i=n[0].version;if(r!==i)return e._reload("refresh_on_version_change")})})},_saveLastLogonTimestamp:function(e){var t=this;return t.context.service.preferences.remove(this._sPersistencyNode).then(function(){return t.context.service.preferences.set({nLastLogonTimestamp:e},t._sPersistencyNode)})},_getLastLogonTimeStamp:function(){return this._preferencesService.get(this._sPersistencyNode).then(function(e){return e.nLastLogonTimestamp})},_manageEvents:function(){if(this.isAlive()){var t=this;e.forEach(this._actions,function(e){$(window).on(e,function(){t._onUserActivity()})})}},_onUserActivity:function(){if(this._activityWasDetected===!1&&(this._activityWasDetected=!0,this._pingCounter===this._maxPingQuantity&&this.isAlive())){var e=this;this.callKeepAlive().then(function(){e.isAlive()&&e._startPingCycle()}).done()}},_startPingCycle:function(){this._activityWasDetected=!1,this._stop(this._pingSessionTimeout),this._pingSession(1)},_fireSessionGoneEvent:function(){var e=window.document.createEvent("Event");e.initEvent("webide_session_gone",!0,!1),window.dispatchEvent(e)},_getSessionGonePageUrl:function(){var t=window.location.search.trim(),n="/sessionGone.html"+(""===t?"?":t),r=window.location.href;if(r=r.replace(t,""),e.endsWith(r,"/")&&(r=r.substring(0,r.length-1)),e.endsWith(r,".html")){ var i=r.lastIndexOf("/");r=r.substring(0,i)}return r+n},_restoreSession:function(){var e=Q.onerror;return Q.onerror=function(){},this._reconnect(window).fin(function(){Q.onerror=e})},_reconnect:function(e){var t=this,n=50;try{return this.oNewSessionWindow.document.getElementById("sessionGonePage")?(e.document.cookie=this.oNewSessionWindow.document.cookie,Q()):Q.delay(n).then(function(){return t._reconnect(e)})}catch(r){return Q.delay(n).then(function(){return t._reconnect(e)})}},_pingSession:function(e){var t=this;this._pingCounter=e;var n=1e3*(60*this._iTimeoutInMinutes-30);e===this._maxPingQuantity&&(n=1e3*(60*this._iTimeoutInMinutes+60)),this._pingSessionTimeout=window.setTimeout(function(){t.callKeepAlive().then(function(){if(t.isAlive()){if(e0&&(n="keepAlive_restartQuestionDirty"),e.context.service.usernotification.info(e.context.i18n.getText("i18n",n)).then(function(){return e.context.service.unloadHandler.setEnabled(!1).then(function(){return t.length>0?e._ddsService.save(t).then(function(){return e._fireSessionGoneEvent(),!0}):(e._fireSessionGoneEvent(),!0)})})}).done()},isAlive:function(){return this._bIsAlive}}}),define("sap.watt.common.platform/service/unloadhandler/UnloadHandler",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{_bEnabled:!0,_aUnloadHandlers:[],init:function(){jQuery.browser.mozilla?window.addEventListener("beforeunload",jQuery.proxy(this._onUnload,this)):jQuery(window).bind("beforeunload",jQuery.proxy(this._onUnload,this));var e=this;$(window).bind("keydown keyup",function(t){return 116===t.which?(e._onUnload(t),!0):82===t.which&&t.ctrlKey?(e._onUnload(t),!0):void 0})},addHandler:function(e){this._aUnloadHandlers.push(e)},removeHandler:function(e){var t=this._aUnloadHandlers.indexOf(e);t>-1&&this._aUnloadHandlers.splice(t,1)},setEnabled:function(e){this._bEnabled=e},_onUnload:function(t){if(this._bEnabled){var n="";if(e.forEach(this._aUnloadHandlers,function(t){var r=t.apply(null);e.isEmpty(r)||(n=n.concat(r))}),!e.isEmpty(n))return jQuery.browser.mozilla&&(t.returnValue=n),n}}}}),define("sap.watt.common.platform/service/remote/Preferences",["sap/watt/core/q","sap/watt/lib/lodash/lodash"],function(e,t){"use strict";function n(){var e,t=sap.watt.getURLParameter("settings");switch(t){case"false":e="ignore";break;case"true":e=!0;break;case"delete":e="delete";break;case"ignore":e="ignore";break;default:e=!0}return e}var r=function(e){this._oDao=e};r.prototype.set=function(e,t){return!0},r.prototype.get=function(e){return this._oDao&&this._oDao.remove(e),null},r.prototype.remove=function(e){return!0};var i=function(){r.call(this,arguments)};i.prototype=Object.create(r.prototype),i.prototype.constructor=i,i.prototype.get=function(e){return null};var o={_oDao:void 0,_oConfiguredDao:void 0,configure:function(e){e&&e.dao&&(this._oConfiguredDao=e.dao);var t=n();if(this._oDao=this._oConfiguredDao||new r(this._oConfiguredDao),"ignore"===t)this._oDao=new i(this._oConfiguredDao);else if("delete"===t&&this._oDao.removeAll)return this.removeAll()},set:function(n,r,i){return t.isObject(n)?t.isString(r)?this._oDao.set(n,r,i):e.reject("node is not a string"):e.reject("value is not an object")},get:function(n){return t.isString(n)?this._oDao.get(n):e.reject("node is not a string")},remove:function(n,r){return t.isString(n)?this._oDao.remove(n,r):e.reject("node is not a string")},removeAll:function(){return this._oDao.removeAll()}};return o}),function(e,t,n){function r(e,t,n){return e.addEventListener?void e.addEventListener(t,n,!1):void e.attachEvent("on"+t,n)}function i(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return v[e.which]?v[e.which]:y[e.which]?y[e.which]:String.fromCharCode(e.which).toLowerCase()}function o(e,t){var n,r=e.length;if(r!==t.length)return!1;for(e=e.sort(),t=t.sort(),n=0;n95&&e<112||v.hasOwnProperty(e)&&(g[v[e]]=e)}return g}function p(e,t,n){return n||(n=l()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function f(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus"),e.split("+"))}function d(e,t){var n,r,i,o=[];for(n=f(e),i=0;i1?{combination:e,sequence:i,isBindSequence:!0}:(r=d(e,t),w._callbacks[r.key]=w._callbacks[r.key]||[],{combination:e,sequence:i,isBindSequence:!1,info:r})}function x(e,t,r){var i=y(e,t,_);return i.isBindSequence?void v(e,i.sequence,_,t):void p(i.info.key,i.info.modifiers,{type:i.info.action},n,i.combination,n,r)}function b(e,t,n,r,i,o){var a=y(e,n,t);return a.isBindSequence?void v(e,a.sequence,t,n):(o||p(a.info.key,a.info.modifiers,{type:a.info.action},r,e,i),void w._callbacks[a.info.key][r?"unshift":"push"]({callback:t,modifiers:a.info.modifiers,action:a.info.action,seq:r,level:i,combo:e}))}var w=this;if(e=e||t,!(w instanceof m))return new m(e);w.target=e,w._callbacks={},w._directMap={};var E,S={},C=!1,T=!1,D=!1;w._handleKey=function(e,t,n){var r,i=p(e,t,n),o={},a=0,s=!1;for(r=0;r":".","?":"/","|":"\\"},b={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},_=function(){},w=1;w<20;++w)v[111+w]="f"+w;for(w=0;w<=9;++w)v[w+96]=w;m.prototype.bind=function(e,t,n,r){var i=this;return e=e instanceof Array?e:[e],i._bindMultiple.call(i,e,t,n,r),i},m.prototype.unbind=function(e,t,n){var r=this;return e=e instanceof Array?e:[e],r._unbindMultiple.call(r,e,t,n),r},m.prototype.trigger=function(e,t){var n=this;return n._directMap[e+":"+t]&&n._directMap[e+":"+t]({},e),n},m.prototype.reset=function(){var e=this;return e._callbacks={},e._directMap={},e},m.prototype.stopCallback=function(e,t){var n=this;return!((" "+t.className+" ").indexOf(" mousetrap ")>-1)&&(!h(t,n.target)&&("INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable))},m.prototype.handleKey=function(){var e=this;return e._handleKey.apply(e,arguments)},m.init=function(){var e=m(t);for(var n in e)"_"!==n.charAt(0)&&(m[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n))},m.init(),e.Mousetrap=m,"undefined"!=typeof module&&module.exports&&(module.exports=m),"function"==typeof define&&define.amd&&define("sap/watt/lib/mousetrap/mousetrap",[],function(){return m})}(window,document),define("sap.watt.platform.keyboardshortcuts/service/KeyboardShortcuts",["sap/watt/lib/lodash/lodash","sap/watt/lib/mousetrap/mousetrap"],function(e,t){"use strict";var n=null,r="mac"===sap.ui.Device.os.name,i="win"===sap.ui.Device.os.name,o={mod:r?"⌘":"Ctrl",ctrl:r?"⌃":"Ctrl",alt:r?"⌥":"Alt",shift:r?"⇧":"Shift",del:r?"⌦":"Delete",left:r?"←":"Left",up:r?"↑":"Up",right:r?"→":"Right",down:r?"↓":"Down",home:r?"↖":"Home",end:r?"↘":"End",pageUp:r?"⇞":"PageUp",pageDown:r?"⇟":"PageDown",backspace:r?"⌫":"Backspace",enter:r?"↩":"Enter"},a=["shift","ctrl","mod","alt"],s=["ctrl","alt","shift","mod"],u=["mod","ctrl","alt","shift"],c=r?s:i?u:a,l=r?"":"+",p=function(e,t){var n=c.indexOf(e);n<0&&(n=100);var r=c.indexOf(t);return r<0&&(r=100),n-r};return{_sNode:"sap.watt.platform.plugin.keyboardshortcuts.service.KeyboardShortcuts",_bIsDialogOpen:!1,_mFullCommands:null,_oSettings:null,_aAllowedInDialog:["del","shift+del","tab","shift+tab","mod+c","mod+v","mod+x","mod+z","mod+y"],_aBindGlobalWithoutStateShortcuts:["mod+s","mod+o","mod+f","mod+shift+a","mod+shift+s","mod+shift+m","mod+h","ctrl+space","esc","mod+shift+r","mod+shift+v"],_aLayoutEditorShortcuts:["left","right","up","down","shift+left","shift+right","shift+up","shift+down"],init:function(){var e=Q.defer();return require(["sap/watt/lib/mousetrap/mousetrap-global-bind","sap/watt/lib/mousetrap/mousetrap-record"],e.resolve,e.reject),e.promise},configure:function(e){n=e.constants.SAPDefault},registerShortcuts:function(e){var t=this;return this._mFullCommands=e,this._getCustomCommands().then(function(r){var i;jQuery.each(e,function(e,o){if(t._isValidCommand(o)){o.setKeyBindingText(t.getKeyBindingAsText(o.getDefaultKeyBinding())),t._oSettings.mSets[n].mCommands[o.getId()]=t._createDefaultCommand(o),i="",t._isCustomShortcuts&&r&&r[o.getId()]&&(i=r[o.getId()].sShortcutBasic);var a=i||o.getKeyBinding();o.setKeyBinding(a),o.setKeyBindingText(t.getKeyBindingAsText(a))}t._registerKeyBinding(o)})})},saveAllSets:function(e){var t=this;return this._updateShortcuts(e).then(function(){return t.context.service.preferences.remove(t._sNode).then(function(){if(e)return t.context.service.preferences.set(e,t._sNode)})})},_updateShortcuts:function(r){var i=this,o="",a=null,s=null,u=null;return r&&r.mSets&&r.sCurrentSetId!==n&&(u=r.mSets[0],u&&u.aCommands&&u.aCommands.length>0&&(s=u.aCommands)),jQuery.each(this._mFullCommands,function(n,r){if(i._isValidCommand(r)){if(o=r.getDefaultKeyBinding(),s){var u=e.findIndex(s,["sId",r.getId()]);u>-1&&(a=s[u],o=a.sShortcutBasic)}r._sKeyBinding&&(t.unbind(r.getKeyBinding()),r.setKeyBinding(o),r.setKeyBindingText(i.getKeyBindingAsText(o)))}}),jQuery.each(this._mFullCommands,function(e,t){i._isValidCommand(t)&&i._registerKeyBinding(t)}),this.context.service.command.invalidateAll()},getAllSets:function(){var e=this;return this._getCustomCommands().thenResolve(e._oSettings)},record:function(e){t.record(e)},stopRecord:function(){t.stopRecord()},onDialogOpened:function(){this._bIsDialogOpen=!0},onDialogClosed:function(){this._bIsDialogOpen=!1},_getCustomCommands:function(){var e=this;return this.context.service.preferences.get(this._sNode).then(function(t){var n,r;if(e._isCustomShortcuts=!1,e._initSettings(),t&&(e._oSettings.sCurrentSetId=t.sCurrentSetId,t.sCurrentSetId&&t.mSets))for(var i=0;i-1?t.bindGlobal(r,function(){return i._bIsDialogOpen?$.inArray(n,i._aAllowedInDialog)>-1:(e.execute().done(),!1)},void 0,!0):$.inArray(n,this._aLayoutEditorShortcuts)>-1?t.bind(r,function(){if(!i._bIsDialogOpen)return e.execute().done(),!1},void 0,!0):t.bindGlobal(r,function(){if(i._bIsDialogOpen)return $.inArray(n,i._aAllowedInDialog)>-1;if(e._bAvailable){var t=e._processStateValueSync("available",e._bAvailable);return t&&e.execute().done(),!t}e.execute().done()},void 0,!0))},_createDefaultCommand:function(e){return{sId:e.getId(),sAction:e.getLabel(),sShortcut:e.getKeyBindingAsText(),sShortcutBasic:e.getDefaultKeyBinding()}},_isValidCommand:function(e){return e.getLabel()&&e.getLabel().length>0&&e.getKeyBinding()&&e.getKeyBinding().length>0},getKeyBindingAsText:function(e){var t=null;if(e){var n=e.split("+");n.sort(p);for(var r=0;r0){var i=[new sap.ui.model.Filter("label",sap.ui.model.FilterOperator.Contains,r),new sap.ui.model.Filter("id",sap.ui.model.FilterOperator.Contains,r)];n.filter(new sap.ui.model.Filter(i,!1))}else e&&(n.aFilters=null,this._oTable.getModel().refresh(!0));var o=n?n.getLength()-1:0,a=0;this._bArrowUpPressed?a=0===t?t:t-1:this._bArrowDownPressed&&(a=t===o?t:t+1),o<=a?a=o:o>0&&a===-1&&(a=0),a>9&&this._oTable.setFirstVisibleRow(a-9),a>=0&&this._oTable.setSelectedIndex(a),this._oLabel.setText(this.context.i18n.getText("resultsFound",[o+1]))},execute:function(){var e=this;return Q.all([e.context.service.quickaccess.getProviders(),e._oQuickAccess._willOpenUI()]).spread(function(t){var n=new sap.ui.model.json.JSONModel;n.setData([{}]),e._oDialog.setModel(n),e._oTable.bindRows("/"),e._oTable.setBusy(!0),e._oInput.setValue(""),e._oDialog.open();var r=[],i=[],o=Object.keys(t);return o.forEach(function(n){var o=t[n];r.push(o.getItems.call(e).then(function(e){e.length>0&&e.forEach(function(e){var t={id:e.id,label:e.label,keyBinding:e.keyBinding,item:e,provider:o};i.push(t)})}))}),Q.all(r).then(function(){var t=new sap.ui.model.json.JSONModel;t.setData(i),e._oDialog.setModel(t),e._oTable.bindRows("/"),e._oTable.sort(e._oTable.getColumns()[0]),e._oTable.setBusy(!1),e._checkInput()})})},_closeDialog:function(){this._executeItem()},_cancelDialog:function(){return this._oDialog.close(),this._oQuickAccess._uiClosed()}}}),define("sap.watt.platform.quickaccess/provider/CommandQuickAccessProvider",[],function(){"use strict";function e(e,t){return t.available&&t.enabled&&e.getLabel()&&0!==e.getLabel().length?1!==Object.keys(e._mValues).length?Q([]):Q([{id:e.getId(),label:e.getLabel(),keyBinding:e.getKeyBindingAsText(),command:e}]):Q([])}return{getItems:function(){var t=this.context.service.command;return t.getAllCommands().then(function(t){var n=[];return Object.keys(t).forEach(function(r){var i=t[r];n.push(i.getState().then(function(t){return e(i,t)}))}),Q.allSettled(n).then(function(e){var t=[];return e.filter(function(e){return!!e.value}).forEach(function(e){e.value.forEach(function(e){t.push(e)})}),t})})},execute:function(e){return e.command.execute()}}}),define("sap.watt.platform.quickaccess/service/QuickAccess",["../provider/CommandQuickAccessProvider"],function(e){"use strict";var t,n,r={commands:e},i=!1,o=[];return{init:function(){this._setContext(this.context)},getProviders:function(){return r},_onSelectionChanged:function(e){o=e.params.selection},getSelectionProvider:function(){return i?t.service.quickaccess:null},getSelection:function(){return i?o:[]},_willOpenUI:function(){var e=this;return i=!0,t.service.focus.getFocus().then(function(r){if(r)return n=r,t.event.fireSelectionProviderChanged({selectionProvider:e.getSelectionProvider()})})},_uiClosed:function(){return Q.all([t.event.fireSelectionProviderChanged({selectionProvider:null}),t.service.focus.setFocus(n)]).then(function(){i=!1,o=[],n=void 0})},_setContext:function(e){t=e},_isUiOpen:function(){return i},_getSavedFocusElement:function(){return n}}}),define("sap.watt.platform.builder/service/BuildService",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{_oGruntBuildService:null,build:function(e,t){var n=this;return n.context.service.builder.isBuildSupported(e).then(function(r){return r?n.context.service.builder.build(e):n._oGruntBuildService?n._oGruntBuildService.isGruntBuildAvailable(e).then(function(r){return r?(t.builderName="grunt-builder",n._oGruntBuildService.build(e,t)):Q()}):Q()})},isBuildSupported:function(e){var t=this;return t.context.service.builder.isBuildSupported(e).then(function(n){return n?Q(!0):t._oGruntBuildService?t._oGruntBuildService.isGruntBuildAvailable(e):Q(!1)})},getTargetFolder:function(e){var t=this;return t.context.service.builder.isBuildSupported(e).then(function(n){return n?t.context.service.builder.getTargetFolder(e):t._oGruntBuildService?t._oGruntBuildService.isGruntBuildAvailable(e).then(function(n){return n?t._oGruntBuildService.getTargetFolder(e):Q(e)}):Q(e)})},configure:function(e){this._mConfig=e,this._mConfig.gruntbuild&&this._mConfig.gruntbuild.service&&(this._oGruntBuildService=this._mConfig.gruntbuild.service)},getTargetFolderByProjectSettings:function(e){var t=this;return t._mConfig.projectTypes&&t._mConfig.projectTypes.length()>0?t._mConfig.projectTypes[0].buildService.getTargetFolderByProjectSettings(e):Q(null)},isBuildRequired:function(e){var t=this;return t.context.service.builder.isBuildSupported(e).then(function(n){return n?t.context.service.builder.isBuildRequired(e):t._oGruntBuildService?Q(!0):Q(!1)})},triggerErrorMessagePopup:function(e,t){var n=this.context.i18n.getText("i18n","builder_buildCompletedWithErrors",t);e.message&&(n+=" "+e.message);var r=this.context.i18n.getText("i18n","builder_buildFailed");sap.ui.commons.MessageBox.alert(n,null,r)},getSourceFolder:function(e){var t=this;return t.context.service.builder.isBuildSupported(e).then(function(n){return n?t.context.service.builder.getSourceFolder(e):Q(e)})}}}),define("sap.watt.platform.emailsubscription/command/OpenEmailSubscription",{execute:function(){return this.context.service.emailsubscription.openEmailSubscriptionDialog()},isAvailable:function(){return!sap.watt.getEnv("internal")&&"xs2"!==sap.watt.getEnv("server_type")},isEnabled:function(){return!0}}),define("sap.watt.platform.emailsubscription/service/EmailSubscription",[],function(){"use strict";var e="sap.watt.platform.emailsubscription.service.emailsubscription";return{openEmailSubscriptionDialog:function(){var e=this;sap.watt.includeCSS(require.toUrl("sap.watt.platform.emailsubscription/css/EmailSubscriptionStyles.css"));var t=e.context.i18n.getText("i18n","email_subscription_close_button"),n=e.context.i18n.getText("i18n","email_subscription_ask_later"),r=new sap.ui.commons.Dialog({title:e.context.i18n.getText("i18n","email_subscription_title"),resizable:!1,width:"420px",height:"400px",modal:!0}).addStyleClass("emailSubscriptionDialog sapUiSizeCompact");r.insertButton(new sap.m.Button({text:t,press:function(){r.close(),e._setShowOnStartup(!1),e._addUsageAnalytics(t)}}),0),r.insertButton(new sap.m.Button({text:n,press:function(){r.close(),e._askLater(),e._addUsageAnalytics(n)}}),0),r.addContent(this._getView(r)),r.open(),$(".sapUiDlgCloseBtn").on("click",{that:this},e._dialogClosed)},getShowOnStartup:function(){var t=this;return sap.watt.getEnv("internal")?Q(!1):this.context.service.preferences.get(e).then(function(e){return e?e.showonstartup!==!1&&t._getSunscriptionTimestamp().then(function(e){if(e){var t=(new Date).getTime();return t>e+2592e6}}):(t._askLater(),!1)})},_getSunscriptionTimestamp:function(){return this.context.service.preferences.get(e).then(function(e){return e?e.subscriptionTimestamp:null})},_setShowOnStartup:function(t){return this.context.service.preferences.set({showonstartup:t},e).fail(function(e){console.error("Couldn't set user preferences",[e])})},_askLater:function(){var t=(new Date).getTime();return this.context.service.preferences.set({subscriptionTimestamp:t},e).fail(function(e){console.error("Couldn't set user preferences",[e])})},_getView:function(e){var t="sap.watt.platform.emailsubscription.EmailSubscription",n="sap.watt.platform.emailsubscription/img/letter-illustration.png",r=this.context.i18n.getText("i18n","email_subscription_text"),i=this.context.i18n.getText("i18n","email_subscription_sub_title"),o=this.context.i18n.getText("i18n","email_subscription_subscribe"),a=this;return sap.ui.jsview(t,{createContent:function(){var t=new sap.ui.commons.Image({src:require.toUrl(n)}).addStyleClass("emailSubscriptionImage"),s=new sap.ui.commons.TextView({text:i}).addStyleClass("emailSubscriptionSubTitle"),u=new sap.ui.commons.TextView({text:r}).addStyleClass("emailSubscriptionText"),c=new sap.m.Button({text:o,press:function(){e.close();var t=window.open(),n="https://www.sap.com/cmp/nl/sap-web-ide/index.html";t.location.href=n,a._setShowOnStartup(!1),a._addUsageAnalytics(o)},focus:!0}).addStyleClass("emailSubscriptionButton"),l=new sap.ui.layout.VerticalLayout({content:[t,s,u,c]});return l}}),sap.ui.view({type:sap.ui.core.mvc.ViewType.JS,viewName:t})},_dialogClosed:function(e){var t=e.data.that;t._askLater(),t._addUsageAnalytics("Close")},_addUsageAnalytics:function(e){this.context.service.usagemonitoring.report("subscription","button_clicks",e).done()}}}),define("sap.watt.platform.jsonrpc2/service/jsonrpc2factoryImpl",{create:function(e,t){return e=e||"jsonrpc2",t=jQuery.extend(t||{},{implements:"sap.watt.platform.plugin.jsonrpc2.service.Jsonrpc2",module:"sap.watt.platform.jsonrpc2/service/JsonRpcProxy"}),this.context.create(e,t)}}),define("sap.watt.platform.websocketconnectivity/service/WebsocketFactoryImpl",{create:function(e,t){return e=e||"websocketconnection",t=jQuery.extend(t||{},{implements:"sap.watt.platform.plugin.websocketconnectivity.service.WebsocketConnection",module:"sap.watt.platform.websocketconnectivity/service/WebsocketProxy"}),this.context.create(e,t)}}),define("sap.watt.platform.odatav4parser/service/OdataV4Handler",["sap/watt/lib/lodash/lodash"],function(e){return{init:function(){jQuery.sap.require("sap.ui.core.util.MockServer")},getV4Object:function(e){return this.context.service.odatav4ui5parser.getMetamodel(e,"").then(function(e){return{version:"V4",obj:e}})},isV4Version:function(e){return/]*version="4.0"/i.test(e)}}}),define("sap.watt.platform.odatav4parser/utils/Converter",["sap/watt/lib/lodash/lodash"],function(e){var t={normalizeMetamodel:function(n){function r(){var t=/^(Entity|Complex|Enum)Type$/;e.each(n,function(e,n){t.test(e.$kind)?l(n):"Schema"===e.$kind&&e.$Annotations&&i(e.$Annotations)})}function i(e){o(e)}function o(n){var r,i,o,a,s=/^((.*)\/)?([^.]*)$/;e.each(n,function(n,u){a=n["@com.sap.vocabularies.Common.v1.Label"],a&&(i=e.replace(u,s,"$2"),o=e.replace(u,s,"$3"),r=e.chain(l(i)).get("property").find(["name",o]).value(),t._safetyPush(r,"extensions",{name:"label",value:a,namespace:"http://www.sap.com/Protocols/SAPData"}))})}function a(r){return m=g[r],m||(m=g[r]={name:t._getName(r)},t._safetyPush(d(r),"entityContainer",m),e.each(n[r],function(e,t){switch(e.$kind){case"EntitySet":s(t,e);break;case"Singleton":case"FunctionImport":case"ActionImport":default:jQuery.sap.log.warning("Converter._getEntityContainer: "+e.$kind+" - not implemented")}})),m}function s(n,r){var i={entityType:r.$Type,name:n};e.each(r,function(e,t){"$kind"!==t&&"$Type"!==t&&"$NavigationPropertyBinding"!==t&&jQuery.sap.log.warning("Converter._parseEntitySet: "+t+" - not implemented")}),t._safetyPush(m,"entitySet",i),f(r.$Type)}function u(t,n){return e.transform(t,function(t,n,r){"$kind"!==r&&(t[e.toLower(r).substring(1)]=n)},{name:n})}function c(t,r,i){var o=e.findKey(n[n.$EntityContainer],{$kind:"EntitySet",$Type:t.$Type});if(!o)return null;var a=h(i,r,t.$Type,t.$Partner);return a.end.push({entitySet:o}),t.$Partner||a.end.push({entitySet:o}),e.each(t,function(e,t){"$kind"!==t&&"$Type"!==t&&"$Partner"!==t&&jQuery.sap.log.warning("Converter._parseNavProperty: "+t+" - not implemented")}),{name:r,relationship:a.association}}function l(e){var t,r=g[e];if(!r)switch(t=n[e],t.$kind){case"EntityType":case"ComplexType":return f(e);case"EnumType":return p(e);default:jQuery.sap.log.warning("Converter._getType: "+t.$kind+" - not implemented")}return r}function p(r){var i,o=g[r];return o||(i=e.clone(n[r]),e.unset(i,"$kind"),o=g[r]={name:"EnumType",attributes:[{name:"Name",value:t._getName(r)}],children:e.map(i,function(e,t){return{attributes:[{name:"Name",value:t},{name:"Value",value:e}]}})},t._safetyPush(d(r),"extensions",o)),o}function f(r){var i,o=g[r];return o||(i=n[r],o=g[r]={name:t._getName(r)},e.each(i,function(n,i){"$kind"!==i&&("Property"===n.$kind?t._safetyPush(o,"property",u(n,i)):"NavigationProperty"===n.$kind?t._safetyPush(o,"navigationProperty",c(n,i,r)):"$Key"===i?o.key={propertyRef:e.map(n,function(e){return{name:e}})}:e.startsWith(i,"$")&&(o[e.toLower(i).substring(1)]=n))}),t._safetyPush(d(r),"EntityType"===i.$kind?"entityType":"complexType",o)),o}function d(e){var n=t._getNamespace(e),r=g[n];return r||(r=g[n]={namespace:n},y.dataServices.schema.push(r)),r}function h(e,n,r,i){var o=t._getNamespace(e);e=t._getName(e),r=t._getName(r);var a=o+"."+e+"_"+n+"_"+r+"_"+i,s=o+"."+r+"_"+i+"_"+e+"_"+n,u=v[a]||v[s];return u||(u={association:a,end:[]},v[a]=u,t._safetyPush(m,"associationSet",u)),u}var m,g={},v={},y={version:"4.0",dataServices:{schema:[]}};return a(n.$EntityContainer),r(),y},_getNamespace:function(t){return e.replace(t,/^((.*)\.)?([^.]*)$/,"$2")},_getName:function(t){return e.replace(t,/^((.*)\.)?([^.]*)$/,"$3")},_safetyPush:function(e,t,n){e&&n&&(e[t]||(e[t]=[]),e[t].push(n))}};return t}),define("sap.watt.platform.odatav4parser/service/ODataV4UI5Parser",["sap/watt/lib/lodash/lodash","../utils/Converter","ui5!sap/ui/model/odata/v4/lib/_MetadataConverter"],function(e,t,n){return{getMetamodel:function(e,t){var r=jQuery.sap.parseXML(e);return r.parseError&&0!==r.parseError.errorCode?null:n.convertXMLMetadata(r)},parseAndNormalizeMetamodel:function(e){return t.normalizeMetamodel(this.getMetamodel(e))},getMetamodelFromWorkspace:function(e,t){var n=this;return this.context.service.document.getDocumentByPath(e).then(function(e){return e.getContent()}).then(function(e){return n.getMetamodel(e,t)})}}}),define("sap.watt.common.builder/command/Builder",[],function(){"use strict";return{execute:function(){var e=this;return this.context.service.selection.getSelection().then(function(t){return e.context.service.perspective.isAreaVisible("center_bottom").then(function(n){return n||e.context.service.console.setVisible(!n).done(),e.context.service.builder.build(t[0].document).fail(function(n){e.context.service.builder.triggerErrorMessagePopup(n,t[0].document.getEntity().getName()).done()})})})},isAvailable:function(){var e=this;return this.context.service.selection.getSelection().then(function(t){return 0!==t.length&&e.context.service.builder.isBuildSupported(t[0].document)})},isEnabled:function(){var e=this;return this.context.service.selection.getSelection().then(function(t){return e.context.service.builder.isBuildRequired(t[0].document)})}}}),define("sap.watt.common.builder/command/BuildConfiguration",[],function(){"use strict";return{execute:function(){var e=this;return this.context.service.selection.getSelection().then(function(t){return e.context.service.projectsetting.setVisible(!0,t[0].document,"buildConfigurationsInProjectSettings")})},isAvailable:function(){var e=this;return!!sap.watt.getEnv("internal")&&this.context.service.selection.getSelection().then(function(t){ return 0!==t.length&&e.context.service.builder.isBuildConfigurationSupported(t[0].document)})},isEnabled:function(){var e=this;return!!sap.watt.getEnv("internal")&&this.context.service.selection.getSelection().then(function(t){return e.context.service.builder.isBuildConfigurationSupported(t[0].document)})}}}),define("sap.watt.common.builder/service/BuildDecorator",{decorate:function(e){var t=this;return e.getProject().then(function(n){return t.context.service.builder.isBuildSupported(n).then(function(r){if(r)return t.context.service.builder.getTargetFolder(n).then(function(t){if(t){var r=e.getEntity(),i=t.getEntity().getFullPath(),o=n.getEntity().getFullPath(),a={styleClass:["sapUiTreeNodeGeneratedNode"]};if(i===o){var s=r.getName();if("Component-preload.js"===s||"resources.json"===s)return a}else if(r.getFullPath().indexOf(i)>-1)return a}})})})}}),define("sap.watt.common.builder/service/buildImpl",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{build:function(e,t){var n=this,r=this.context.i18n,i=e.getEntity().getFullPath(),o=!1,a="";return n.context.service.progress.startTask().then(function(s){return n._printToConsoleLog("info",r.getText("i18n","builder_buildStarted",i)),n.context.service.usernotification.liteInfo(r.getText("i18n","builder_buildStarted",i)).done(),n._getBuildConfiguration(e).then(function(s){return a=s.projectTypeId,s.buildService.build(e,t).then(function(){return s.buildService.setLastBuildDateTime(e).then(function(){n.context.service.usagemonitoring.report("builder","build",s.projectTypeId).done(),n.context.service.usernotification.liteInfo(r.getText("i18n","builder_BuildCompletedSuccessfully",i)).done()})}).fail(function(e){throw e.action="hcp_build",o=!0,e.message&&n._printToConsoleLog("error",e.message),e})}).fin(function(){var e=o?"error":"info",t=o?"builder_buildCompletedWithErrors":"builder_BuildCompletedSuccessfully";return n._printToConsoleLog(e,r.getText("i18n",t,i)),n.context.event.fireBuildCompleted({isBuildSuccess:!o,projectName:i,message:t,projectType:a}).done(),n.context.service.progress.stopTask(s).done()})})},triggerErrorMessagePopup:function(e,t){var n=this.context.i18n.getText("i18n","builder_buildCompletedWithErrors",t);e.message&&(n+=" "+e.message);var r=this.context.i18n.getText("i18n","builder_buildFailed");sap.ui.commons.MessageBox.alert(n,null,r)},isBuildSupported:function(e){return!!e.getEntity().isProject()&&this._getBuildConfiguration(e).then(function(e){return!!e})},isBuildConfigurationSupported:function(e){return!!e.getEntity().isProject()&&this._getBuildConfiguration(e).then(function(e){return!(!e||!e.buildConfigurationService)})},isBuildRequired:function(e){return this._getBuildConfiguration(e).then(function(t){return!!t&&t.buildService.isBuildRequired(e)})},getTargetFolder:function(e){var t=this;return this._getBuildConfiguration(e).then(function(n){if(n)return n.buildService.getTargetFolder(e);var r=e.getEntity().getName();throw new Error(t.context.i18n.getText("i18n","builder_notBuildable",r))})},getSourceFolder:function(e){var t=this;return this._getBuildConfiguration(e).then(function(n){if(n)return n.buildService.getSourceFolder?n.buildService.getSourceFolder(e):null;var r=e.getEntity().getName();throw new Error(t.context.i18n.getText("i18n","builder_notBuildable",r))})},getTargetFolderByProjectSettings:function(e){var t=this;return t._mConfig.projectTypes[0].buildService.getTargetFolderByProjectSettings(e)},getBuildConfigurationTitle:function(e){var t=this;return this._getBuildConfiguration(e).then(function(n){if(n)return n.buildConfigurationService.getTitle(e);var r=e.getEntity().getName();throw new Error(t.context.i18n.getText("i18n","builder_notBuildable",r))})},getBuildConfigurationUI:function(e){var t=this;return this._getBuildConfiguration(e).then(function(n){if(n)return n.buildConfigurationService.getUI(e);var r=e.getEntity().getName();throw new Error(t.context.i18n.getText("i18n","builder_notBuildable",r))})},configure:function(e){this._mConfig=e,this._aStyles=e.styles,this._aStyles&&this.context.service.resource.includeStyles(this._aStyles).done()},onDocumentChanged:function(e){var t=this;e.params.document.getProject().then(function(n){if(n)return t._getBuildConfiguration(n).then(function(t){if(t&&t.buildService)return t.buildService.setIsBuildRequired(e,n)})}).done()},_getBuildConfiguration:function(t){var n=this;return this.context.service.projectType.getProjectTypes(t).then(function(t){var r;return e.forEach(t,function(t){var i=e.find(n._mConfig.projectTypes,{projectTypeId:t.id});r=i?i:r}),r})},_printToConsoleLog:function(e,t){"error"===e?this.context.service.log.error("Builder",t,["user"]).done():"info"===e&&this.context.service.log.info("Builder",t,["user"]).done()}}}),define("sap.watt.platform.hcp.destination/service/Destination",["sap/watt/lib/lodash/lodash","sap/watt/lib/xhr/xhrlib"],function(e,t){"use strict";return{_mDestinations:[],_DESTINATIONS_PATH:sap.watt.getEnv("context_root")+"destinations",_API_PATH:sap.watt.getEnv("context_root")+"api",_API_LIST_DESTINATIONS:"/listDestinations",_mUsages:{},configure:function(e){var t=this;t._mConfig=e,jQuery.each(e.usages,function(e,n){t._mUsages.hasOwnProperty(n.name)&&t._mUsages[n.name]!==n.path&&t.context.service.log.error("destination",t.context.i18n.getText("i18n","destination_errorDuplicateUsage",n.name),["system"]).done(),t._mUsages[n.name]=n.path})},_getAsJson:function(e){return Q.sap.ajax(e,{dataType:"json"}).spread(function(e){return Q(e)})},loadDestinations:function(){var e=this;this._mDestinations=[];var t=this._API_PATH+this._API_LIST_DESTINATIONS;return this._getAsJson(t).then(function(t){e.addDestinations(t)}).fail(function(){e.context.service.log.error("destination",e.context.i18n.getText("i18n","destination_errorFetchDestinationList"),["system"]).done()})},addDestinations:function(t){var n=this,r=[];for(var i in t)try{var o=t[i];(o.RDEUsage||o.RDEEnabled||o.RDESystem)&&n.context.service.log.warn("destination",n.context.i18n.getText("i18n","destination_deprecatedPropertyName",t[i].Name),["system"]).done();var a=o.WebIDEUsage?o.WebIDEUsage:o.RDEUsage,s=o.WebIDEAdditionalData?o.WebIDEAdditionalData.split(","):[],u=a.split(","),c="";t[i].hasOwnProperty("sap-client")&&(c=t[i]["sap-client"]);for(var l in u){a=u[l].trim(),"xhr_logon"===a&&r.push(o.Name);var p=n._calculateProxyUrlPrefix(t[i]);n._addDestination({name:t[i].Name,description:t[i].Description&&t[i].Description.length>0?t[i].Description:t[i].Name,proxyUrlPrefix:p,path:n._calculatePath(t[i],a),url:n._calculateUrl(t[i],a,p),wattUsage:a,proxyType:t[i].ProxyType,systemId:o.WebIDESystem?o.WebIDESystem:o.RDESystem,entryPath:n._calculateEntryPath(t[i],a),sapClient:c,additionalData:s})}}catch(e){n.context.service.log.warn("destination",n.context.i18n.getText("i18n","destination_validDestination",t[i].Name),["system"]).done()}n._startXhrLogon(e.uniq(r))},_startXhrLogon:function(n){if(n&&n.length>0){var r=t.LogonManager.getInstance();if(r.createIgnoreList(),r.ignore){var i=n.shift();e.forEach(n,function(e){i=i+"|"+e}),r.ignore.add(new RegExp("^((?!"+i+").)*$","i"))}}},getDestinations:function(t,n,r){var i=[];for(var o in this._mDestinations)(t&&this._mDestinations[o].wattUsage===t||!t)&&i.push(this._mDestinations[o]);return n&&(r||(r="name"),i=e.sortBy(i,r)),i},getDestination:function(e){var t=[];for(var n in this._mDestinations)e&&this._mDestinations[n].name===e&&t.push(this._mDestinations[n]);return t},_addDestination:function(t){var n=this;if(t&&t.name&&t.wattUsage&&t.url&&(!t.wattUsage||void 0!==this._mUsages[t.wattUsage])){var r=e.find(this._mDestinations,{name:t.name,wattUsage:t.wattUsage});r?n.context.service.log.error("destination",n.context.i18n.getText("i18n","destination_destinationExists",t.name,t.wattUsage),["system"]).done():this._mDestinations.push(t)}else n.context.service.log.warn("destination",n.context.i18n.getText("i18n","destination_validDestination",t.name),["system"]).done()},_calculateProxyUrlPrefix:function(e){return this._DESTINATIONS_PATH+"/"+e.Name},_calculateUrl:function(e,t,n){return e.Path&&e.Path.length>1?n:n+this._mUsages[t]},_calculatePath:function(e,t){return e.Path&&e.Path.length>1?e.Path:this._mUsages[t]},_calculateEntryPath:function(e,t){return e.Path&&e.Path.length>1?void 0:this._mUsages[t]}}}),define("sap.watt.platform.hcp.logserver/service/LogServer",["sap/watt/lib/lodash/lodash"],function(e){"use strict";var t={_aBuffer:[],_oLogQueue:Q(),_currentBufferSize:0,_bPreviousCallToServerSucceeded:!0,_bAtLeastOneCallToServerSucceeded:!1,configure:function(e){var t=this;return this._intervalInMilliSeconds=e.intervalInMilliSeconds||3e4,this._bufferOptimalLimit=e.bufferOptimalLimit||5e4,this._bufferMaxLimit=e.bufferMaxLimit||10485760,t._savingLogInterval(),this.context.service.unloadHandler.addHandler(function(){t._aBuffer.length>0&&t._saveLog().done()})},_savingLogInterval:function(){var e=this,t=this._intervalInMilliSeconds;this._saveLogInterval=window.setInterval(function(){if(e._aBuffer.length>0)return e._saveAndClear()},t)},_saveAndClear:function(){var e=this;return e._oLogQueue=e._oLogQueue.then(function(){return e._saveLog().then(function(t){t&&(e._aBuffer=[],e._currentBufferSize=0)})}),e._oLogQueue},_addToBuffer:function(e){var t=this;return t._oLogQueue=t._oLogQueue.then(function(){t._aBuffer.push(e);var n=t._calculateNodeSize(e);t._currentBufferSize+=n}),t._oLogQueue},_overrideOldestMassgeInBuffer:function(e){var t=this;return t._oLogQueue=t._oLogQueue.then(function(){var n=t._aBuffer.splice(0,1,e),r=t._calculateNodeSize(e),i=t._calculateNodeSize(n[0]);t._currentBufferSize+=r-i}),t._oLogQueue},_calculateNodeSize:function(t){var n=0;return e.forIn(t,function(t,r){e.isString(t)?t&&t.length&&(n+=t.length):t&&t.toString().length&&(n+=t.toString().length)}),n},_isBufferInOptimalRange:function(){return this._currentBufferSize<=this._bufferOptimalLimit},_isBufferInMaxRange:function(){return this._currentBufferSize<=this._bufferMaxLimit},_saveLog:function(){var e=this;if(0===e._aBuffer.length)return Q(!0);var t,n=e._getBrowserType()+" "+e._getWorkspaceServerType();try{t=JSON.stringify({messages:e._aBuffer,data:n})}catch(o){var r=e._prepareBufferMessages(e._aBuffer);if(0===r.length)return Q(!0);var i={};i.messages=r,i.data=n,t=JSON.stringify(i)}var o={method:"POST",processData:!1,data:t};return Q.sap.ajax("/logger",o).then(function(){return e._bAtLeastOneCallToServerSucceeded=!0,e._bPreviousCallToServerSucceeded=!0,Q(!0)}).fail(function(t){return e._bAtLeastOneCallToServerSucceeded||(e.onLoggerEvent=function(){},window.clearInterval(e._saveLogInterval)),e._bPreviousCallToServerSucceeded&&(console.error(e.context.i18n.getText("i18n","saving_data_failed")+t.message),e._bPreviousCallToServerSucceeded=!1),Q(!1)})},_prepareBufferMessages:function(e){for(var t=0;t0){e._oButton.setEnabled(!0),e._oButton.removeStyleClass("toprightpanedisableBellIcon");var r=e._prepareModelAdminMessages(t,n);e._getPopoverController().updateModel(r);var i=e._calculateNumberOfNewMessages(r);return e._getPopoverController().isPopoverOpen()||i.alerts>0&&e._getPopoverController().openPopover(),i.newMessages>0&&e._oButton.addStyleClass("toprightpanetextDecoration"),e._setNumberOfNewMessagesInButton(i.newMessages),e._setMessagesInPreferences(e._prepareAdminMessagesForPreferences(r))}return e._setNumberOfNewMessagesInButton(0),e._oButton.removeStyleClass("toprightpanetextDecoration"),e._oButton.addStyleClass("toprightpanedisableBellIcon"),e._setMessagesInPreferences(e._prepareAdminMessagesForPreferences([]))})},_prepareModelAdminMessages:function(e,t){for(var n=t?t.messages:[],r=0;r0&&e<=9?t=e.toString():e>9&&(t="9+"),this._oButton.setText(t)},_setIconToButton:function(e){this._oButton.setIcon(e)},_getMessagesFromPreferences:function(){return this.context.service.preferences.get(this._sNode)},_setMessagesInPreferences:function(e){return this.context.service.preferences.set(e,this._sNode)},_prepareAdminMessagesForPreferences:function(e){for(var t=[],n=0;n-1)return a}})})})}}),define("sap.watt.ideplatform.che.gruntbuild/service/GruntBuilder",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{DEFAULT_TARGET_FOLDER:"dist",build:function(e,t){var n=this;t=t||{};var r=e&&e.getProjectMetadata&&"com.sap.hcp.html5"===e.getProjectMetadata().type;r?t.builderName="grunt-builder-cf":t.builderName="grunt-builder";var i=e.getTitle(),o="Build Button";return t.triggeredBy&&(o=t.triggeredBy),n.context.service.report.startOperation("Build","Build").then(function(){return n.context.service.progress.startTask("Build","Build started.").then(function(r){return e.createFolder(n.DEFAULT_TARGET_FOLDER).then(function(a){return n.context.service.git.setIgnore(a.getEntity()).then(function(){return n.context.service.usagemonitoring.startPerf("GruntBuild","GruntBuildSuccess").done(),n.context.service.chebackend.build.build(e,t).then(function(t){return n.context.service.usagemonitoring.report("GruntBuild","GruntBuildSuccess",i,o).done(),e.refresh().then(function(){return n.context.service.report.endOperationWithSuccess("Build","Build").done(),t})})}).fail(function(e){throw n.context.service.usagemonitoring.report("GruntBuild","GruntBuildFailed",i,o).done(),e.action="hcp_build",e}).fin(function(){n.context.service.progress.stopTask(r).done()})})})})},isGruntBuildAvailable:function(t){return t.getEntity().isProject()?t.getCurrentMetadata().then(function(t){var n=!1,r=!1;return e.forEach(t,function(e){"Gruntfile.js"===e.name?n=!0:"package.json"===e.name&&(r=!0)}),n&&r}):Q(!1)},getTargetFolder:function(e){return e.getChild(this.DEFAULT_TARGET_FOLDER)},triggerErrorMessagePopup:function(e,t){var n=this.context.i18n.getText("i18n","builder_buildCompletedWithErrors",t)+" "+e.message,r=this.context.i18n.getText("i18n","builder_buildFailed");sap.ui.commons.MessageBox.alert(n,null,r)}}}),define("sap.watt.ideplatform.welcomescreen/service/WelcomeScreenManager",["sap/watt/core/Proxy"],function(e){"use strict";var t=function(e,t,n,r){this._sId=e,this._mConfig=t,this._oContext=n,this._oProxy=r};t.prototype.getContainer=function(){return this._oProxy.getContainer()},t.prototype.getSection=function(){return this._mConfig.section},t.prototype.getPriority=function(){return this._mConfig.priority};var n={};return n._mContainers={},n.register=function(n,r,i){if(!this._mContainers[n]){var o={id:null,container:null,priority:null,section:null};"string"==typeof r?o.container=r:o=jQuery.extend(this._mConfig,r);var a=this;if(o.container instanceof e){var s=new t(n,o,i,o.container);return a._mContainers[n]=s,s}throw new Error(i.i18n.getText("i18n","WelcomeScreen_instance_of_Proxy"))}i.service.log.error("WelcomeScreen",n+" Container already registered",["user"]).done()},{configure:function(e){var t=this;jQuery.each(e.containers,function(e,r){n.register(r.id,r,t.context)})},getWelcomeContainers:function(){return n._mContainers}}}),define("sap.watt.ideplatform.welcomescreen/ui/view/WelcomeContent.controller",[],function(){"use strict";sap.ui.core.mvc.Controller.extend("sap.watt.ideplatform.plugin.welcomescreen.ui.view.WelcomeContent",{_oContext:null,onInit:function(){this._oContext=this.getView().getViewData().context;var e=this.byId("welcomeMainGrid");e.setLayoutData(new sap.ui.layout.GridData({span:"L12 M12 S12"})),this.oMainSection=this.oView.byId("welcomeMainSection"),this.oMainSection.setLayoutData(new sap.ui.layout.GridData({span:"L7 M7 S7"})),this.oSubSection=this.oView.byId("welcomeSubSection"),this.oSubSection.setLayoutData(new sap.ui.layout.GridData({span:"L5 M5 S5"}))}})}),define("sap.watt.ideplatform.welcomescreen/service/WelcomeScreen",["sap/watt/platform/plugin/platform/service/ui/AbstractPart","../ui/view/WelcomeContent.controller"],function(e){"use strict";var t=e.extend("sap.watt.ideplatform.plugin.welcomescreen.service.WelcomeScreen",{oView:null,_perspectiveService:null,init:function(){this._perspectiveService=this.context.service.perspective,this.oView=sap.ui.view("welcomeView",{viewName:"sap.watt.ideplatform.plugin.welcomescreen.ui.view.WelcomeContent",type:sap.ui.core.mvc.ViewType.XML,controller:sap.ui.controller("sap.watt.ideplatform.plugin.welcomescreen.ui.view.WelcomeContent"),viewData:{context:this.context}}),this.oSections={},this.oSectionsPromises={}},configure:function(){},getSelection:function(){return null},getSelectionProvider:function(){return Q(this.oView)},getFocusElement:function(){return Q(this.oView)},getContent:function(){return Q(this.oView)},getBasicContainer:function(e){return new sap.watt.ideplatform.plugin.welcomescreen.ui.controls.BasicWelcomeContainer(e)},onAllPluginsStarted:function(){var e=this;this.context.service.WelcomeScreenManager.getWelcomeContainers().then(function(t){jQuery.each(t,function(t,n){var r=n.getSection();e.oView.byId(r)&&(e.oSections[r]||(e.oSections[r]=[]),e.oSections[r].push(n))}),jQuery.each(e.oSections,function(t,n){n.sort(e._compareContainers);var r=n[0].getSection();e.oSectionsPromises[r]||(e.oSectionsPromises[r]=[]),jQuery.each(n,function(t,n){e.oSectionsPromises[r].push(n.getContainer())}),Q.all(e.oSectionsPromises[r]).spread(function(){var t=e.oView.byId(r);t&&jQuery.each(arguments,function(e,n){t.addContent(n)})}).done()})}).done()},onAfterGeneration:function(e){var t=this;return this._perspectiveService.getCurrentPerspective().then(function(e){if("welcome"===e)return t._perspectiveService.renderPerspective("development")})},_compareContainers:function(e,t){return e.getPriority()-t.getPriority()}});return t}),define("sap.watt.ideplatform.welcomescreen/service/WelcomeScreenPersistency",[],function(){"use strict";var e="sap.watt.common.service.ui.WelcomeScreen",t=function(){if(window.location.host.indexOf("webidetesting")<0){var t=this;return this.context.service.preferences.get(e).then(function(e){return e&&void 0!==e[window.location.host]?e[window.location.host]:void 0}).fail(function(e){console.error(t.context.i18n.getText("i18n","WelcomeScreen_versionReadFailed",[e]))})}return Q({bIsOnline:!1})},n=function(t){if(window.location.host.indexOf("webidetesting")<0){var n=this,r=null;return this.context.service.preferences.get(e).fail(function(e){console.error(n.context.i18n.getText("i18n","WelcomeScreen_persistenceReadFailed",[e]))}).then(function(i){return r=i,r||(r={}),r[window.location.host]||(r[window.location.host]={}),r[window.location.host]=t,n.context.service.preferences.remove(e)}).then(function(){return n.context.service.preferences.set(r,e)}).fail(function(e){console.error(n.context.i18n.getText("i18n","WelcomeScreen_persistenceSaveFailed",[e]))})}};return{getPerspectiveSettings:t,setPerspectiveSettings:n}}),define("sap.watt.ideplatform.welcomescreen/service/Version",[],function(){"use strict";var e="sap.watt.common.plugin.welcomescreen.service.Version",t="v_",n=function(){var e=jQuery.sap.getModulePath("sap.watt.uitools.version",".json"),t=this;return jQuery.ajax({url:e,dataType:"json"}).then(function(e){var t="";if(e&&e.version){t=e.version.replace("-SNAPSHOT","");for(var n=t.split(".");n.length>2;)n.pop();t=n.join(".")}return t}).fail(function(e){console.error(t.context.i18n.getText("i18n","WelcomeScreen_versionSaveFailed",[e]))})},r=function(){if(window.location.host.indexOf("webidetesting")<0){var r=this;return this.context.service.preferences.get(e).then(function(e){if(e&&void 0!==e[window.location.host]){var n=e[window.location.host].toString();return n.replace(t,"")}}).fail(function(e){console.error(r.context.i18n.getText("i18n","WelcomeScreen_versionReadFailed",[e]))})}return n()},i=function(n){if(window.location.host.indexOf("webidetesting")<0){var r=this;return this.context.service.preferences.get(e).then(function(i){return i||(i={}),i[window.location.host]=t+n,r.context.service.preferences.remove(e).then(function(){return r.context.service.preferences.set(i,e).fail(function(e){console.error(r.context.i18n.getText("i18n","WelcomeScreen_versionSaveFailed",[e]))})}).fail(function(e){console.error(r.context.i18n.getText("i18n","WelcomeScreen_versionSaveFailed",[e]))})}).fail(function(e){console.error(r.context.i18n.getText("i18n","WelcomeScreen_versionReadFailed",[e]))})}return Q()},o=function(e){var t=/(^[\.\d]+$)|(^\d{2}-\d{2}-\d{2}$)/;return t.test(e)},a=function(e,t){if(!o(e)||!o(t))throw Error("Illegal version detected!");for(var n=e.split(/\.|-/),r=t.split(/\.|-/),i=n.lengthu)return 1;if(s0){for(var r=[],i=0,o=e.length;i-1&&(n=e.substring(0,r)),this.context.service.filesystem.documentProvider.getDocument(n).then(function(e){return!!e&&e.getCurrentMetadata(!0).then(function(e){for(t=0;t-1&&(n=e.substring(t+1,e.length)),n},_isDependentPlugin:function(e){if(void 0!==this._aDependenciesPlugins&&this._aDependenciesPlugins.length>0){var t=this._aDependenciesPlugins.indexOf(e);if(t>-1)return!0}return!1},_getPluginProjectsInFolder:function(e){return this.context.service.filesystem.documentProvider.getDocument(e).then(function(e){var t=[];return e.getEntity().isFolder()?e.getCurrentMetadata(!0).then(function(e){for(var n=0;n-1&&this._aDependenciesPlugins.splice(i,1)}},_createUI:function(){var e=new sap.ui.layout.form.Form("pluginDevelopmentSettings",{layout:new sap.ui.layout.form.GridLayout});e.addStyleClass("beautifierSetting_form");var t=new sap.ui.layout.form.FormContainer("configureUrlParameters",{title:new sap.ui.core.Title({text:this.context.i18n.getText("i18n","projectSettings_ConfigureURLParametersTableTitle"),tooltip:this.context.i18n.getText("i18n","projectSettings_ConfigureURLParametersTableToolTip")}),layoutData:new sap.ui.core.VariantLayoutData({multipleLayoutData:[new sap.ui.layout.GridData({span:"L12 M12 S12"})]})}),n=new sap.ui.layout.form.FormElement;this.oSapIdeDebugCheckBox=new sap.ui.commons.CheckBox({layoutData:new sap.ui.layout.form.GridElementData({hCells:"8"})}),this.oSapIdeDebugCheckBox.setText(this.context.i18n.getText("i18n","projectSettings_SapIdeDebugTitle")),n.addField(this.oSapIdeDebugCheckBox),t.addFormElement(n);var r=new sap.ui.commons.Label({text:this.context.i18n.getText("i18n","projectSettings_SapIdeDebugDes"),tooltip:this.context.i18n.getText("i18n","projectSettings_SapIdeDebugDes")}).addStyleClass("descriptionLabels");n=new sap.ui.layout.form.FormElement,n.addField(r),t.addFormElement(n),this.oDebugAsyncDropDown=new sap.ui.commons.DropdownBox({items:[new sap.ui.core.ListItem({text:this.SEVERITY.none}),new sap.ui.core.ListItem({text:this.SEVERITY.lite}),new sap.ui.core.ListItem({text:this.SEVERITY.medium}),new sap.ui.core.ListItem({text:this.SEVERITY.full})],layoutData:new sap.ui.layout.form.GridElementData({hCells:"4"})});var i=new sap.ui.commons.Label({labelFor:this.oDebugAsyncDropDown,layoutData:new sap.ui.layout.form.GridElementData({hCells:"6"})});i.setText(this.context.i18n.getText("i18n","projectSettings_DebugAsyncTitle")),n=new sap.ui.layout.form.FormElement,n.addField(i),n.addField(this.oDebugAsyncDropDown),t.addFormElement(n);var o=new sap.ui.commons.Label({text:this.context.i18n.getText("i18n","projectSettings_DebugAsyncDes"),tooltip:this.context.i18n.getText("i18n","projectSettings_DebugAsyncDes")}).addStyleClass("descriptionLabels");n=new sap.ui.layout.form.FormElement,n.addField(o),t.addFormElement(n);var a=new sap.ui.layout.form.FormContainer("selectPlugins",{title:new sap.ui.core.Title({text:this.context.i18n.getText("i18n","projectSettings_SelectPluginsTableTitle"),tooltip:this.context.i18n.getText("i18n","projectSettings_SelectPluginsTableToolTip")}),layoutData:new sap.ui.core.VariantLayoutData({multipleLayoutData:[new sap.ui.layout.GridData({span:"L12 M12 S12"})]})});this.oDependenciesTable=new sap.ui.table.Table({selectionMode:sap.ui.table.SelectionMode.None,visibleRowCount:6}),this.oDependenciesTable.addColumn(new sap.ui.table.Column({label:new sap.ui.commons.Label({text:this.context.i18n.getText("i18n","projectSettings_SelectPluginsTable_SelectColumn")}),template:new sap.ui.commons.CheckBox({change:[this._onCheckBoxChange,this]}).bindProperty("checked","checked"),width:"80px",hAlign:"Left"})),this.oDependenciesTable.addColumn(new sap.ui.table.Column({width:"220px",label:new sap.ui.commons.Label({text:this.context.i18n.getText("i18n","projectSettings_SelectPluginsTable_PluginNameColumn")}),template:(new sap.ui.commons.TextView).bindProperty("text","PluginName")})),this.oDependenciesTable.addColumn(new sap.ui.table.Column({label:new sap.ui.commons.Label({text:this.context.i18n.getText("i18n","projectSettings_SelectPluginsTable_PluginPathColumn")}),template:(new sap.ui.commons.TextView).bindProperty("text","PluginPath")})),n=new sap.ui.layout.form.FormElement,n.addField(this.oDependenciesTable),a.addFormElement(n);var s=new sap.ui.commons.Label({text:this.context.i18n.getText("i18n","projectSettings_SelectPluginsTableDes"),tooltip:this.context.i18n.getText("i18n","projectSettings_SelectPluginsTableDes")}).addStyleClass("descriptionLabels");return n=new sap.ui.layout.form.FormElement,n.addField(s),a.addFormElement(n),e.addFormContainer(t),e.addFormContainer(a),e}})}),define("sap.watt.ideplatform.plugindevelopment/service/ProjectTypeState",[],function(){"use strict";return{isAvailable:function(){return"hcproxy"===sap.watt.getEnv("server_type")},isEnabled:function(){return!0}}}),define("sap.watt.saptoolsets.mta.common.mtaproject/service/MTAProjectSpaceProvider",[],function(){"use strict";return{_oService:null,configure:function(e){e.setService&&(this._oService=e.setService.service)},getListOfUserSpaces:function(){return this._oService?this._oService.getListOfUserSpaces():(this.context.service.log.error("MTAProjectSpaceProvider","Project space service is not configured",["user"]).done(),Q([]))},getProjectSpace:function(e){return this._oService?this._oService.getProjectSpace(e):(this.context.service.log.error("MTAProjectSpaceProvider","Project space service is not configured",["user"]).done(),Q(""))},setProjectSpace:function(e,t){return this._oService?this._oService.setProjectSpace(e,t):(this.context.service.log.error("MTAProjectSpaceProvider","Project space service is not configured",["user"]).done(),Q())},removeProjectSpace:function(e){return this._oService?this._oService.removeProjectSpace(e):(this.context.service.log.error("MTAProjectSpaceProvider","Project space service is not configured",["user"]).done(),Q())}}}),define("sap.watt.hana.build.buildcommon/command/CommonDIBuildCommand",[],function(){"use strict";return sap.ui.base.Object.extend("sap.watt.hana.build.buildcommon/command/CommonDIBuildCommand",{execute:function(){var e=this;return this.context.service.selection.getSelection().then(function(t){return e.context.service.problemsView.isVisible().then(function(n){return e.context.service.console.setVisible(!n).then(function(){return t[0].document.getProject().then(function(t){return e.context.service.builder.build(t).fail(function(n){e.context.service.builder.triggerErrorMessagePopup(n,t.getEntity().getName()).done()})})})})})},isEnabled:function(){var e=this;return this.context.service.selection.getSelection().then(function(t){return!(0===t.length||t[0].document.hasOwnProperty("isProject")&&!t[0].document.getEntity().isProject())&&e.context.service.builder.isBuildRequired(t[0].document)})}})}),define("sap.watt.hana.build.buildcommon/command/SelectiveBuildCommand",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{execute:function(){var e=this;return this.context.service.selection.getSelection().then(function(t){return e.context.service.problemsView.isVisible().then(function(n){return e.context.service.console.setVisible(!n).then(function(){return t[0].document.getProject().then(function(t){return e.context.service.builder.build(t).fail(function(n){e.context.service.builder.triggerErrorMessagePopup(n,t.getEntity().getName()).done()})})})})})},_isHdbProject:function(t){return this.context.service.projectType.getProjectTypes(t).then(function(t){return e.some(t,e.matches({id:"sap.hdb"}))})},isAvailable:function(){var e=this;return this.context.service.selection.getSelection().then(function(t){return 0!==t.length&&e._isHdbProject(t[0].document)})},isEnabled:function(){var e=this;return this.context.service.selection.getSelection().then(function(t){return 0!==t.length&&e._isHdbProject(t[0].document).then(function(e){return!!e&&t[0].document.getProject().then(function(e){for(var n=!0,r=e.getProjectMetadata().path,i=0;i0&&t[0].document.getEntity().isProject()||e.simulate_make)}if(r(n)){var i,o=[];for(i=0;ibtn_cancel}",press:i.bind(null,!1)}),l=new sap.m.Button({type:sap.m.ButtonType.Emphasized,text:"{i18n>btn_ok}",press:i.bind(null,!0),enabled:{parts:[{path:u.getModelPath("endPointState")},{path:u.getModelPath("organization")},{path:u.getModelPath("space")}],formatter:function(n,r,i){return t(n)&&!e.isEmpty(r)&&!e.isEmpty(i)}}});a=new sap.m.Dialog({title:"{i18n>dlg_title}",resizable:!1,modal:!0,horizontalScrolling:!1,verticalScrolling:!1,busy:"{"+u.getModelPath("fetchOrgsAndSpacesInProgress")+"}",draggable:!0,autoClose:!0,contentWidth:"480px",content:r,buttons:[l,c],defaultButton:l,afterClose:o}),a.addStyleClass("sapUiSizeCompact"),a.setModel(s),n.i18n.applyTo.apply(n.i18n,[a]),a.open()})}};return n}),define("sap.watt.saptoolsets.mta.common.deployToCF/command/DeployToCF",["../util/DeployDialogHelper","sap/watt/lib/lodash/lodash"],function(e,t){return{execute:function(){var n=this,r=this.context.service.selection;return r.getSelection().then(function(r){var i=t.get(r,"[0].document");return e.createAndOpenDialog(n.context,i)})},isAvailable:function(){return Q(!0)},isEnabled:function(){var e=this;return e.context.service.selection.getSelection().then(function(e){var n=t.get(e,"[0].document");return n&&"file"===n.getEntity().getType()&&".mtar"===n.getEntity().getName().match(/\.([0-9a-z]+)(?=[?#])|(\.)(?:[\w]+)$/gi)[0]})}}}),define("sap.watt.saptoolsets.mta.common.deployToCF/service/DeploymentToCF",["../util/DeployDialogHelper","sap/watt/lib/lodash/lodash"],function(e,t){"use strict";return{init:function(){},doDeploy:function(e){var n,r=this,i=t.get(e,"artifact"),o=i&&i.getEntity().getName()||"",a=r.context.i18n.getText("msg_deployment_started",[o]),s=a;return r.context.service.log.info("DeploymentToCF",s,["user"]).done(),r.context.service.usernotification.liteNotificationInfo(a).done(),r.context.service.progress.startTask().then(function(u){return r.context.service.chebackend.DeployService.deployToCF({endpoint:t.get(e,"location"),org:t.get(e,"organization"),space:t.get(e,"space")},i).then(function(){a=r.context.i18n.getText("msg_deployment_succeeded",[o]),s=a,n=r.context.service.usernotification.liteNotificationSuccess}).fail(function(e){a=r.context.i18n.getText("msg_deployment_failed",[o]),s=a+"("+t.get(e,"message")+")",n=r.context.service.usernotification.liteNotificationFailure}).fin(function(){r.context.service.log.info("DeploymentToCF",s,["user"]).done(),n.call(r,a,void 0,void 0,!1).done(),r.context.service.progress.stopTask(u).done()})})}}}),define("sap.watt.saptoolsets.mta.common.cfconnectivity/service/cfconnectivity",[],function(){"use strict";return{getEndpointSettingsView:function(){var e=this,t=sap.ui.view({viewName:"sap.watt.saptoolsets.mta.common.cfconnectivity.view.EndpointOrgAndSpace",type:sap.ui.core.mvc.ViewType.XML,viewData:{oContext:e.context}});return this.context.i18n.applyTo(t),t}}}),define("sap.watt.saptoolsets.mta.serverplatform.neo.hcpprojectspace/service/ProjectSpaceConfigurationService",["sap/watt/common/plugin/platform/service/ui/AbstractConfig","sap/watt/lib/lodash/lodash"],function(e,t){"use strict";return e.extend("sap.watt.hana.common.projectspace.service.ProjectSpaceConfigurationService",{_projectSpaceConfigView:null,_projectSpaceConfigViewController:null,_oModel:null,init:function(){var e=this;this._oModel=new sap.ui.model.json.JSONModel;var t={organizationItems:[],spacesItems:[],sOrganizationSelected:"",sSpaceSelected:"",mOrganizationsAndSpaces:{},endpoints:[]};return this._oModel.setData({modelData:t}),this.context.service.chebackend.cfadmin.getCFAvaialbleEndPoints().then(function(t){return t.unshift({name:"",key:""}),e._oModel.setProperty("/modelData/endpoints",t)})},saveProjectSetting:function(e,t,n){return this._projectSpaceConfigViewController.saveProjectSettingsSpaceData()},getProjectSettingContent:function(e,t,n){var r=this;return this._projectSpaceConfigView||this._createUI(),r._clearSettings(),r._getProjectName(n).then(function(e){return r._projectSpaceConfigViewController._sProjectName=e,r.context.service.mtaProjectSpaceProvider.getProjectSpace(e).then(function(e){return e.endpoint&&e.space&&e.spaceId&&e.org?r.context.service.cfhandlerservice.getLandscapeOrganizationsAndSpaces(e.endpoint).then(function(t){for(var n in t)for(var i in t[n])e.space===t[n][i]&&(e.spaceId=i);return r._projectSpaceConfigViewController._updateModelAndUIWithSpecificOrgAndSpace(t,e),r._projectSpaceConfigViewController._checkIfBuilderExistsInSpaceAndUpdateUI(e.spaceId).then(function(){return r._projectSpaceConfigView})}).fail(function(e){return r.context.service.log.error("Project Space Builder",e.message,["user"]).done(),r._projectSpaceConfigView}):r._updateModelAndUIInCaseTheCFInformationIsEmpty()})})},_updateModelAndUIInCaseTheCFInformationIsEmpty:function(){var e=this._oModel.getProperty("/modelData/endpoints");return this._oModel.setProperty("/modelData/sEndpoint",e[0].name),this._projectSpaceConfigViewController._onEndpointChange().done(),this._projectSpaceConfigView.getModel().refresh(!0),this._projectSpaceConfigView},_clearSettings:function(){this._oModel.setProperty("/modelData/spacesItems",[{}]),this._oModel.setProperty("/modelData/sOrganizationSelected","")},_createUI:function(){this._projectSpaceConfigView=sap.ui.view({viewName:"sap.watt.saptoolsets.mta.serverplatform.neo.hcpprojectspace.view.ProjectSpaceConfigurationForCP",type:sap.ui.core.mvc.ViewType.JS,viewData:{context:this.context}}),this._projectSpaceConfigViewController=this._projectSpaceConfigView.getController(),this._projectSpaceConfigViewController.setModel(this._oModel)},_getProjectName:function(e){if(e)return Q(e.substring(e.indexOf("/")+1));var t=this.context.service.selection;return t.getSelection().then(function(e){if(1!==e.length)throw new Error("No project Selected");return e[0].document.getProject().then(function(e){if(!e)throw new Error("No project Selected");return e.getEntity().getName()})})}})}),define("sap.watt.saptoolsets.mta.serverplatform.neo.hcpprojectspace/service/ProjectSpaceSettingsService",{DEFAULT_SPACE_NAME:"SAP",DEFAULT_SPACE_GUID:"SAP",PROJECTS_SPACE_WORKSPACE_SETTING_KEY:"projectsSpace",WORKSPACE_ATTRIBUTE_KEY:"attributes",getListOfUserSpaces:function(){return Q([{name:this.DEFAULT_SPACE_NAME,guid:this.DEFAULT_SPACE_NAME}])},getProjectSpace:function(e){var t=this;return this._getProjectsSpacesSettings().then(function(t){return t[e]||""}).fail(function(){return t.context.service.log.error("Project Space","Failed to get workspace settings",["user"]).done(),Q("")})},setProjectSpace:function(e,t){var n=this;return this._getProjectsSpacesSettings().then(function(r){return r[t]=e,n.context.service.chebackend.WorkspaceSettings.updateWorkspaceAttribute(n.PROJECTS_SPACE_WORKSPACE_SETTING_KEY,JSON.stringify(r)).then(function(){n.context.service.log.info("Project Space","Workspace settings set successfully",["user"]).done()}).fail(function(){n.context.service.log.error("Project Space","Failed to set workspace settings",["user"]).done()})})},_getProjectsSpacesSettings:function(){return this.context.service.chebackend.WorkspaceSettings.getWorkspaceAttribute(this.PROJECTS_SPACE_WORKSPACE_SETTING_KEY).then(function(e){return JSON.parse(e)})},removeProjectSpace:function(e){var t=this,n=e.params.document;return n&&n.getEntity().isProject()?n.getProject().then(function(e){if(e.getProjectMetadata&&"mta"===e.getProjectMetadata().type)return t._getProjectsSpacesSettings().then(function(n){ var r=e.getProjectMetadata().name;return delete n[r],t.context.service.chebackend.WorkspaceSettings.updateWorkspaceAttribute(t.PROJECTS_SPACE_WORKSPACE_SETTING_KEY,JSON.stringify(n)).then(function(){t.context.service.log.info("Project Space","Project Space settings deleted successfully",["user"]).done()}).fail(function(e){t.context.service.log.error("Project Space","Failed to delete Project Space settings",["user"]).done()})})}):Q()}}),define("sap.watt.saptoolsets.mta.serverplatform.neo.hcpprojectspace/service/CFHandlerService",[],function(){"use strict";return{_interval:15e3,_maxCount:24,_counter:0,_BUILDER_INSTALLATION_FAILED_STATUS:"FAILED",_BUILDER_INSTALLATION_SUCCESS_STATUS:"SUCCESSFUL",installBuilder:function(e,t,n){return this.context.service.chebackend.BuilderService.install(e,t,n)},getLandscapeOrganizationsAndSpaces:function(e){return this.context.service.chebackend.cfadmin.getLandscapeOrganizationsAndSpaces(e)},isBuilderExistInSpace:function(e){return this.context.service.chebackend.BuilderService.isBuilderExistInSpace(e)},checkCreationBuilderStatus:function(e,t){var n=this;setTimeout(function(){n.isBuilderExistInSpace(e).then(function(r){n._counter=n._counter+1,r.status===n._BUILDER_INSTALLATION_SUCCESS_STATUS||r.status===n._BUILDER_INSTALLATION_FAILED_STATUS?(n._counter=0,t.resolve(r)):n._counter0&&(e.urlParameters=t.aUrlParameters),t.sHashFragment&&(e.hashParameter=t.sHashFragment),t.sUI5Version&&(e.ui5ActiveVersion=t.sUI5Version,e.isDefaultVersion=1),void 0!==t.bUseWorkspace&&null!==t.bUseWorkspace&&(e.workspace=t.bUseWorkspace?"withWorkspace":"withoutWorkspace")),e},_getRunnableFilesObject:function(e){var t={include:[".*[.]html$"],exclude:["mock_preview_sapui5.html","visual_ext_index.html","/dist/","extended_runnable_file.html","fioriHtmlRunner.html"]};return e.getProject().then(function(e){var n=e.getProjectMetadata();return n&&"sap.html5"===n.type&&(t.include=[".*resources.*[.]html$"]),t})},_isHtmlFile:function(e){var t=e.split(".");return"html"===t[t.length-1]},getAppRunnableFileRelativePath:function(e){if(e&&e.filePath){var t=e.filePath.split("resources");return t[t.length-1]}}};return n}),define("sap.watt.saptoolsets.fiori.run.webapprunner/service/WebAppRunnerRuntime",["sap/watt/lib/lodash/lodash","sap.watt.ideplatform.run/error/ConfigurationError"],function(e,t){"use strict";return{configure:function(e){e.webapprunneradapterrt&&(this._webappRunnerAdapterRT=e.webapprunneradapterrt.service),this.context.service.htmlextendersextension.extendHtmlFile().fail(function(){}).done(),this.context.service.runwithframenewProcess.getRunWithFrameUrl().fail(function(){}).done()},run:function(e,t,n,r){var i=this;return this.getApplicationUrl(n,r,e,t).then(function(t){if(i._addUsageAnalytics(n),t)return i._runInNewProcess()?i.context.service.runinnewprocess.openWindow(t).then(function(){return t}):void(e.location.href=t.toString())})},getApplicationUrl:function(e,t,n,r){var i,o,a=this;return this._validateConfiguration(e,t),this.context.service.htmlextendersextension.extendHtmlFile(n,t,e).then(function(s){if(!s.isRejectedExtendersExist)return o=s.oRunnableDocument,o.getProject().then(function(n){return i=n,a._webappRunnerAdapterRT.getEnvSpecificUrl(e,o,i,t)}).then(function(e){return a._webappRunnerAdapterRT.getRelativeURL(e,o,i)}).then(function(t){var n=a._addConfigurationUrlParametersWithHash(t,e);return a.context.service.performanceextension.getPerformanceUrl(n,e.sPerformanceWrapper)}).then(function(t){return a.context.service.usagemonitoring.report("runner","preview","webapprunner").done(),a._runInNewProcess()?a.context.service.runwithframenewProcess.getRunWithFrameUrl(n,t,r,e.previewMode):a.context.service.runwithframe.getRunWithFrameUrl(n,t,r,e.previewMode)})}).fail(function(e){console.log(e)})},_runInNewProcess:function(){var e=sap.watt.getURLParameter("sap-ide-runnew");return"false"!==e},_addConfigurationUrlParametersWithHash:function(e,t){return e=this._addConfigurationUrlParameters(e,t.urlParameters),t.hashParameter&&(e=e.hash(t.hashParameter)),e},_addConfigurationUrlParameters:function(e,t){for(var n=0;t&&n',_sMockScript:"\n{{customScript}}\n",configure:function(){this._preloadServices()},_preloadServices:function(){this.context.service.appdescriptorutil.getAnnotations().fail(function(){}).done(),this.context.service.ui5projecthandler.getDataSourcesByType().fail(function(){}).done(),this.context.service.metadataHandler.getMetadataDocuments().fail(function(){}).done()},buildRunnableDocument:function(e,t,n){var r=this,i=this.context.service.filesystem.documentProvider,o=t.getEntity().getParentPath();return i.getDocument(o).then(function(e){return r.getNewRunnableDocumentContent(e,t,n).then(function(n){return t.getContent().then(function(t){var i=t.search(']+id(| )*=(| )*"(| )*sap-ui-bootstrap(| )*"');if(i===-1){var o=t.search("");n=t.substr(0,o+"".length)+r._sUI5BootScript+n+t.substr(o+"".length+1)}else{var a=new RegExp("(| )*"),s=a.exec(t.substr(i))[0],u=t.indexOf(s,i)+s.length;n=t.substr(0,u)+n+t.substr(u+1)}return e.importFile(new Blob([n]),!1,!0,r._sNewFileName).then(function(e){if(!e)throw new Error(r.context.i18n.getText("i18n","msg_mock_fail"));return e})})})}).fail(function(e){r.context.service.usernotification.alert(e.message||r.context.i18n.getText("i18n","msg_mock_fail")).done()})},getNewRunnableDocumentContent:function(e,t,n){var r=this,i=this.context.service.mockpreview;return this.context.service.setting.project.get(i).then(function(i){return r.getRunnableMockSettings(t,i).then(function(t){return r.context.service.appdescriptorutil.getAppNamespace(e).then(function(i){var o=r._sMockScript.replace("{{rootUri}}",t.mockUri.split("?")[0].replace(/\/?$/,"/")),a=i.replace(/\/?$/,"/"),s=t.metadataFilePath;if(!s)throw n&&n.close(),new Error(r.context.i18n.getText("i18n","msg_mock_model_missing"));r.updateSettings(e,{metadataFilePath:s,mockUri:t.mockUri}).done();var u=t.mockRequestsFilePath?t.mockRequestsFilePath:s.replace(/[^\/]+$/,"");if(i)var c='var _sAppModulePath = "'+a+'";\nvar sMetadataPath = "'+s+'";\nvar sMetadataUrl = jQuery.sap.getModulePath(_sAppModulePath + sMetadataPath.replace(".xml", ""), ".xml");\n';else c="var sMetadataUrl = '"+s+"';\n";t.loadJSONFiles?(c+=s.indexOf("localService")>-1?"var sMockdataBaseUrlPath = sMetadataUrl.replace(/[^/]+$/, 'mockdata');\n":"var sMockdataBaseUrlPath = sMetadataUrl.replace(/[^/]+$/, '');\n",c+="oMock.simulate(sMetadataUrl, { sMockdataBaseUrl : sMockdataBaseUrlPath, bGenerateMissingMockData : true });"):c+="oMock.simulate(sMetadataUrl);",o=o.replace("{{simulate}}",c);var l="",p="oMock.start();\n\tjQuery(document).ready(function($) { sap.m.MessageToast.show('Running in demo mode with mock data.', { duration : 4000 });\n});\n";t.loadCustomRequests&&(l='\n',p="try {\n var aMockRequest = webide.mock.ext.mockRequests.getRequests();\nif (aMockRequest && aMockRequest.length > 0) {\n oMock.setRequests(oMock.getRequests().concat(aMockRequest));\n}\n} catch(oErr) {\njQuery.sap.log.debug(oErr.message);\n}finally {\n oMock.start();\n\tjQuery(document).ready(function($) { sap.m.MessageToast.show('Running in demo mode with mock data.', { duration : 4000 }); });\n }"),o=o.replace("{{customScript}}",l),o=o.replace("{{customRequestsPart}}",p);var f="";if(t.aAnnotations&&t.aAnnotations.length>0){for(var d=t.aAnnotations,h=0;h \n',f="try {\n var aMockRequest = webide.mock.ext.mockRequests.getRequests();\nif (aMockRequest && aMockRequest.length > 0) {\n oMock.setRequests(oMock.getRequests().concat(aMockRequest));\n}\n} catch(oErr) {\njQuery.sap.log.debug(oErr.message);\n}finally {\n oMock.start();\n\tjQuery(document).ready(function($) { sap.m.MessageToast.show('Running in demo mode with mock data.', { duration : 4000 }); });\n }"),s=s.replace("{{customScript}}",p),s=s.replace("{{customRequestsPart}}",f),n.getContent().then(function(e){var t,n=e.search(']+id(| )*=(| )*"(| )*sap-ui-bootstrap(| )*"');if(n===-1){var u=e.search("");t=e.substr(0,u+"".length)+i._sUI5BootScript+s+e.substr(u+"".length+1)}else{var c=new RegExp("(| )*"),l=c.exec(e.substr(n))[0],p=e.indexOf(l,n)+l.length;t=e.substr(0,p)+s+e.substr(p+1)}return o.importFile(new Blob([t]),!1,!0,i._sNewFileName).then(function(e){if(!e)throw new Error(i.context.i18n.getText("i18n","msg_mock_fail"));return a.getPreviewUrl(e).then(function(e){return a.showPreview(e,r)})})}).fail(function(e){i.context.service.usernotification.alert(i.context.i18n.getText("i18n","msg_mock_fail")).done()})})},updateSettings:function(e,t){var n=this;return t=t?t:{},this.context.service.setting.project.get(this.context.self,e).then(function(r){return r?(r.mockUri=t.mockUri?t.mockUri:r.mockUri||"",r.metadataFilePath=t.metadataFilePath?t.metadataFilePath:r.metadataFilePath||"",r.loadJSONFiles=t.loadJSONFiles?t.loadJSONFiles:r.loadJSONFiles||!1,r.loadCustomRequests=t.loadCustomRequests?t.loadCustomRequests:r.loadCustomRequests||!1,r.mockRequestsFilePath=t.mockRequestsFilePath?t.mockRequestsFilePath:r.mockRequestsFilePath||""):r={mockUri:t.mockUri||"",metadataFilePath:t.metadataFilePath||"",loadJSONFiles:t.loadJSONFiles||!1,loadCustomRequests:t.loadCustomRequests||!1,mockRequestsFilePath:t.mockRequestsFilePath||""},n.context.service.setting.project.set(n.context.self,r,e)})},getRunnableMockSettings:function(e,t){var n=this,r={};return n._getServiceURI(e,t).then(function(i){return r.mockUri=i,n._getMetadataFilePath(e,t).then(function(i){return r.metadataFilePath=i,n.context.service.appdescriptorutil.getAnnotations(e).then(function(e){return r.aAnnotations=e,r.loadJSONFiles=t?t.loadJSONFiles:void 0,r.loadCustomRequests=t?t.loadCustomRequests:void 0,r.mockRequestsFilePath=t?t.mockRequestsFilePath:void 0,r})})}).fail(function(){n.context.service.usernotification.alert(n.context.i18n.getText("i18n","msg_mock_fail")).done()})},_getServiceURI:function(e,t){var n=this;return e.getProject().then(function(e){return n.context.service.appdescriptorutil.getServiceUri(e).then(function(e){return"undefined"!=typeof e?e:(t=t?t:{mockUri:""},t.mockUri?t.mockUri:"")})})},_getMetadataFilePath:function(e,t){var n=this;return n.context.service.appdescriptorutil.getMetadataPath(e).then(function(r){return r?r:t&&t.metadataFilePath?t.metadataFilePath:e.getProject().then(function(t){return n.context.service.metadataHandler.getMetadataDocuments(t).then(function(t){return 0===t.length?"":n._getMetadataRelativeURL(t[0],e)})})})},_getMetadataRelativeURL:function(e,t){for(var n=e.getEntity().getFullPath().split("/"),r=t.getEntity().getFullPath().split("/"),i="",o=0;n[o]===r[o];)o++;for(var a=r.length-1-o,s=0;srunWithMock_config_mockdata_source_gendata}"}),new sap.ui.core.Item({text:"{i18n>runWithMock_config_mockdata_source_jsondata}"})]}),this.oExtendMockCB=new sap.ui.commons.CheckBox({text:"{i18n>runWithMock_config_loadCustomRequests_checkbox}",checked:"{loadCustomRequests}",layoutData:new sap.ui.layout.GridData({span:"L12 M12 S12",linebreak:!0})});var r=new sap.ui.commons.TextField({value:"{mockRequestsFilePath}",placeholder:"{i18n>runWithMock_config_extensionfile_placeholder}",enabled:"{loadCustomRequests}",width:"100%",layoutData:new sap.ui.layout.GridData({span:"L10 M10 S10"})}),i=new sap.ui.layout.form.SimpleForm({layout:sap.ui.layout.form.SimpleFormLayout.ResponsiveGridLayout,content:[new sap.ui.commons.Label({text:"{i18n>runWithMock_config_service_root_uri}",tooltip:"{i18n>runWithMock_config_serviceURL_tooltip}"}),t,new sap.ui.commons.Label({text:"{i18n>runWithMock_config_service_metadata_path}",tooltip:"{i18n>runWithMock_config_metadata_path_tooltip}"}),n,new sap.ui.commons.Label({text:"{i18n>runWithMock_config_mockdata_source}"}),this.oMockDataSourceRBGroup,this.oExtendMockCB,new sap.ui.commons.Label({text:"{i18n>runWithMock_config_extensionfile}",tooltip:"{i18n>runWithMock_config_extensionfile_tooltip}"}),r]}).addStyleClass("mockDataSettingsSpacing");return i.bindElement("/ProjectSettings"),i}})}),define("sap.watt.saptoolsets.fiori.run.mockpreview/service/AppDescriptorUtil",["sap/watt/lib/lodash/lodash"],function(e){"use strict";var t={getServiceUri:function(e){var t=this;return t.context.service.ui5projecthandler.getDefaultDataSource(e).then(function(n){return n&&n.uri?n.uri:t.context.service.ui5projecthandler.getDataSourcesByType(e,"OData").then(function(e){if(e){var t=Object.keys(e);if(t.length>0)return e[t[0]].uri}})}).fail(function(){})},getMetadataPath:function(t){var n=this;return n.context.service.ui5projecthandler.isManifestProjectGuidelinesType(t).then(function(r){if(r)return n.context.service.ui5projecthandler.getDefaultDataSource(t).then(function(r){return r&&r.settings?r.settings.localUri:n.context.service.ui5projecthandler.getDataSourcesByType(t,"OData").then(function(t){if(t){var n=e.values(t);if(n[0]&&n[0].settings)return n[0].settings.localUri}})})}).fail(function(){})},getAnnotations:function(t){var n=this;return n.context.service.ui5projecthandler.getDataSourcesByType(t,"ODataAnnotation").then(function(t){if(t){for(var n=e.values(t),r=[],i=0;i-1||new RegExp(".*fiorisandboxconfig.*[.]json","i").test(l))return u.filePath="/"+t.getEntity().getFullPath().split("/").slice(2).join("/"),u;var p={include:["Component.js","Component-preload.js"],exclude:["/dist/"]};return o.filesearchutil.getRunnableFiles(t,p).then(function(e){var t=null;if(null!==e&&void 0!==e){switch(e.length){case 0:t=null;break;case 1:t="/"+e[0].fullPath.split("/").slice(2).join("/");break;default:if(!n){var i=function(t){return o.choosefilepopup.getContent(e,r,t).then(function(e){return e?o.choosefilepopup.getResult().then(function(e){return u.filePath=e,u}):null})};return i("false"!==sap.watt.getURLParameter("sap-ide-runnew")?!0:!1)}}return u.filePath=t,u}})})},getConfigurationUi:function(e){var t=this;return{model:new sap.ui.model.json.JSONModel({}),getContent:function(){return t.context.service.fiorirunnerconfigui.getConfigUiContent(e)}}},isConfigurationValid:function(e,t){return this.context.service.baseinputvalidatorutil.isConfigurationValid(e)},updateConfiguration:function(e,t){return t&&e&&(t.sDisplayName&&(e._metadata.displayName=t.sDisplayName),t.sFilePath&&(e.filePath=t.sFilePath),void 0!==t.bUseMock&&null!==t.bUseMock&&(e.dataMode=t.bUseMock?0:1),t.aUrlParameters&&t.aUrlParameters.length>0&&(e.urlParameters=t.aUrlParameters),t.sHashFragment&&(e.hashParameter=t.sHashFragment),t.sUI5Version&&(e.ui5ActiveVersion=t.sUI5Version,e.isDefaultVersion=1),void 0!==t.bUseWorkspace&&null!==t.bUseWorkspace&&(e.workspace=t.bUseWorkspace?"withWorkspace":"withoutWorkspace")),e}};return t}),define("sap.watt.saptoolsets.fiori.run.fiorirunner/service/FioriRunnerRuntime",["sap/watt/lib/lodash/lodash","sap.watt.ideplatform.run/error/ConfigurationError"],function(e,t){"use strict";return{configure:function(e){e.fiorirunneradapterrt&&(this._fioriRunnerAdapterRT=e.fiorirunneradapterrt.service),this.context.service.htmlextendersextension.extendHtmlFile().fail(function(){}).done(),this.context.service.runwithframenewProcess.getRunWithFrameUrl().fail(function(){}).done()},_getRunnableDocAndSandboxPathByFileContent:function(e,t,n,r,i){if(i)return this.context.service.SandboxHtmlBuilder.runLocalExtenders(t,n,r);var o="test-resources/sap/ushell/shells/sandbox/fioriSandbox.html";return{oNewHtmlExtendersEnhancementsDocument:t,fioriHtmlExtendersEnhancementsRunnerPath:o,sFragment:"Test-url"}},_getRunnableDocAndSandboxPath:function(e,t,n){var r,i,o=this;return e.getParent().then(function(e){return o.context.service.SandboxHtmlBuilder.createLocalRunnableTemplate(e)}).then(function(i){return r=i,o.context.service.htmlextendersextension.getAllExtendersHtmlEnhancements(t,e,n)}).then(function(a){if(!a.isRejectedExtendersExist)return i=a.sNewRunnableFileContent,o._fioriRunnerAdapterRT.isRunLocalFile(i).then(function(a){return!a&&r&&r.delete().done(),o._getRunnableDocAndSandboxPathByFileContent(i,e,t,n,a)})}).fail(function(){var e=o.context.i18n.getText("i18n","previewHtml_extendersError");o._logAndThrowError(e)})},_validateConfiguration:function(e,t){var n=this,r=t.getEntity().getName();"Component.js"===r||"Component-preload.js"===r||new RegExp(".*fiorisandboxconfig.*[.]json","i").test(r)||this._logAndThrowError(this.context.i18n.getText("i18n","previewImpl_unsupportedFile",[r]));var i=[{isRegex:!1,rule:"Component.js"},{isRegex:!1,rule:"Component-preload.js"},{isRegex:!0,rule:".*fiorisandboxconfig.*[.]json"}],o=e._metadata?e._metadata.displayName:"";return this.context.service.baseinputvalidatorutil.isConfigurationValid(e,t,i).then(function(t){t.bValid||n._handleInvalidConfiguration(t,e,o)})},_handleInvalidConfiguration:function(e,t,n){var r;r=e.aErrors&&e.aErrors.indexOf("URL Components")?this.context.i18n.getText("i18n","url_components_error_msg",[n]):this.context.i18n.getText("i18n","file_not_found_error_msg",[t.filePath,n]),this._logAndThrowError(r)},_logAndThrowError:function(e){throw this.context.service.log.error("FioriRunner",e,["user"]).done(),new t(e)},_addUsageAnalytics:function(e){var t=e.urlParameters;this.context.service.usagemonitoring.report("runner","fiori_sandbox",e.filePath.split("/")[1]).done();var n="",r="";r=1===e.previewMode?"NoFrame":"Frame",0===e.dataMode&&(n+="_Mock"),e.hashParameter&&(n+="_HashParameter"),this.context.service.usagemonitoring.report("runner","fiori_sandbox_config",n,r).done(),this.context.service.usagemonitoring.report("runner","preview","sandboxrunner").done(),e.ui5ActiveVersion?this.context.service.usagemonitoring.report("runner","Ui5Version",e.ui5ActiveVersion).done():this.context.service.usagemonitoring.report("runner","Ui5Version","default").done();for(var i=0;t&&i1)for(var i=n.length-2,o=i;o--;)r+="../";return t&&(r=t+r),[{name:"sap-ui-appCacheBuster",value:r}]}}}),define("sap.watt.saptoolsets.fiori.run.runtimeextensionsfiori/service/PerformanceExtension",[],function(){"use strict";return{getPerformanceUrl:function(e,t){var n;if(e&&t){var r=e.toString();return n=URI(require.toUrl(t)),n.addSearch("url",r),n}return e}}}),define("sap.watt.saptoolsets.fiori.run.runtimeextensionsfiori/service/HtmlExtendersExtension",[],function(){"use strict";return{_sNewFileName:"extended_runnable_file.html",extendHtmlFile:function(e,t,n){var r=this;return r.getAllExtendersHtmlEnhancements(e,t,n).then(function(e){return e.sNewRunnableFileContent?r.context.service.htmlproducerhandler.createHtmlFile(t,r._sNewFileName,e.sNewRunnableFileContent).then(function(t){return e.oRunnableDocument=t,e}):(e.oRunnableDocument=t,e)})},getAllExtendersHtmlEnhancements:function(e,t,n){var r=this,i={};return i.projectDocument=t,i.openedWindow=e,i.runnerConfiguration=this._getRunParameters(n),r.context.service.htmlproducerhandler.getExtendedHtmlElements(i).then(function(e){return!e.isRejectedExtendersExist&&e.isExtendersExist?i.projectDocument.getContent().then(function(t){return r.context.service.htmlproducerhandler.getExtendedHtmlFileContent(t,e.aExtenders)}).then(function(t){return e.sNewRunnableFileContent=t,e}):e})},_getRunParameters:function(e){var t={bPreferWorkspace:"withWorkspace"===e.workspace},n={oAppsVersion:e.appsVersion,oUrlParameters:e.urlParameters,oHashParameter:e.hashParameter,oAppForwarding:t,bIsMock:0===e.dataMode,sUi5Version:e.ui5ActiveVersion,sUi5VerSource:e.ui5VerSource,oSwitchBackendParameter:e.backendSystem,sPerformanceWrapper:e.sPerformanceWrapper},r={bNoFrame:1===e.previewMode,sFilePath:e.filePath,oRunConfiguration:n};return r}}}),define("sap.watt.saptoolsets.fiori.run.runtimeextensionsfiori/service/ComponentPreloadExtension",["sap/watt/lib/lodash/lodash"],function(e){"use strict";return{getComponentPreloadParameter:function(t,n){var r=[],i=t.getEntity().getFullPath();return i=i.toLowerCase(),e.includes(i,"/dist/")&&!jQuery.sap.endsWith(i,"component.js")||n&&n.sPerformanceWrapper?r:(r.push({name:"sap-ui-xx-componentPreload",value:"off"}),r)}}}),define("sap.watt.saptoolsets.fiori.run.runtimeextensionsfiori/service/ModuleDependencyExtension",["sap/watt/lib/lodash/lodash"],function(e){"use strict";var t="PROVIDED",n="Java Module",r="destination-placeholder",i="Skip",o="Stop",a="Continue";return{addModuleDependencyDestinationMapping:function(t,n,r){if(!r||0===t.dataMode||t.filePath.indexOf("MockServer")!==-1)return t;var s,u,c=this;return this._destinationExistsInNeoApp(n).then(function(r){return r?n.getParent().then(function(e){return s=e.getEntity().getName(),c._getDependencyElement(n,s)}).then(function(e){if(e){c.context.service.usagemonitoring.report("moduledependency","html5_dependent","dependency_exists").done();var n=e.element.name;return c._generateDestinationName(s,n).then(function(e){return u=e,c.context.service.destination.getDestination(u)}).then(function(e){return 0===e.length?(t=c._updateMappingDestinationToConfiguration(t,""),c._createDestinationFlow(s,u).then(function(e){return!e||e.action!==i&&e.action!==a?c._updateMappingDestinationToConfiguration(t,u):t})):(c.context.service.usagemonitoring.report("moduledependency","html5_dependent","destination_exists").done(),c._updateMappingDestinationToConfiguration(t,u))})}return t}).fail(function(r){return r.action===o?c._stopAndDeleteIfDefaultConfiguration(t,n):500===r.status&&r.responseJSON&&r.responseJSON.message&&e.startsWith(r.responseJSON.message,"Invalid mta.yaml")?(console.error(r.responseJSON.message),c.context.service.log.error("run",c.context.i18n.getText("i18n","invalid_mta_yaml")),c.context.service.usagemonitoring.report("moduledependency","error","invalid_mta_yaml").done(),t):c._failAlert().fail(function(e){return c._stopAndDeleteIfDefaultConfiguration(t,n)})}):t})},_generateDestinationName:function(e,t){return this._getUserName().then(function(n){return n+"-"+e+"-"+t})},_getUserName:function(){return this.context.service.system.getSystemInfo().then(function(e){return e.sUsername})},_getDependencyElement:function(e,n){var r=e.getEntity().getName();return this.context.service.chebackend.Mta.isModuleDependentWith(n,r,t)},_createDestinationFlow:function(e,t){var n=this,r=!1,o={};return this._getJavaModuleDocument(e).then(function(e){return n._getJavaUrl(e).then(function(e){return e?(o.url="https://"+e,n.context.service.usagemonitoring.report("moduledependency","html5_dependent","java_is_running").done()):r=!0,n.context.service.destinationcreation.openDestinationCreationDialog({bNeedRunJava:r})}).then(function(a){return a?(o.userName=a.userName,o.password=a.password,o.destinationName=t,o.destinationType="NoAuth",o.WebIDEUsage="proj_serv",r?n._runJavaModule(e).then(function(e){return e?(o.url="https://"+e,n.context.service.usagemonitoring.report("moduledependency","html5_dependent","create_destination").done(),n.context.service.destinationcreation.createDestination(o).fail(function(){return n._destinationCreationFailedAlert()})):Q.reject()}).fail(function(){return n._runningJavaFailedAlert()}):(n.context.service.usagemonitoring.report("moduledependency","html5_dependent","create_destination").done(),n.context.service.destinationcreation.createDestination(o).fail(function(){return n._destinationCreationFailedAlert()}))):{action:i}})})},_getJavaModuleDocument:function(e){var t=this;return this.context.service.chebackend.Mta.getProjectModules(e).then(function(e){for(var r=0;r0?Q(e[0]):this.context.service.configurationhelper.createConfiguration(t,n,r,!1)},_getApplicationUrl:function(e){var t;return this.context.service.runRegistry.getProcessInfo(e).then(function(e){return e&&e.process&&(t=e.process.url),t})}}}),define("sap.watt.saptoolsets.fiori.run.destinationsutil/service/DestinationsUtil",[],function(){"use strict";return{getHcpDestinations:function(){var e=this;return this.context.service.destination.getDestinations().then(function(t){var n=[];if(null!==t&&0!==t.length)for(var r=0;r0)for(var r=0;r0){e=e.sort();for(var t=[e[0]],n=1;n-1},_getWebIDEUsageToBeSupportedArray:function(){return["odata_abap","odata_gen","ui5_execute_abap","dev_abap","bsp_execute_abap","odata_xs","api_mgmt_catalog","api_mgmt_proxy","smart_business_odata","smart_business_gen","apihub_catalog","apihub_sandbox","apihub_devservice","proj_serv"]}}}),define("sap.watt.saptoolsets.fiori.run.runneradapter/service/FioriRunnerAdapterCpDT",[],function(){"use strict";return{getFioriRunConfigUiContent:function(e,t){return"local_hcproxy"===sap.watt.getEnv("server_type")?t:this.context.service.advancedsettings.getAdvancedTabContent(e,t)}}}),define("sap.watt.saptoolsets.fiori.run.runneradapter/service/FioriRunnerAdapterCpRT",[],function(){"use strict";var e="sap_belize",t="sap_bluecrystal";return{configure:function(){this.context.service.heliumPreviewAdapter.getBaseUrl().fail(function(){}).done(),this.context.service.ui5versionextension.getUi5VersionParameters().fail(function(){}).done(),this.context.service.appcachebusterextension.getAppCacheBusterParameters().fail(function(){}).done(),this.context.service.reuselibsextension.getReuselibsURLParams().fail(function(){}).done(),this.context.service.destinationmappingextension.getDestinationMappingParameters().fail(function(){}).done()},_getUrlToken:function(e,t){var n=e.getEntity().getName(),r=n,i=t.backendSystem;if(i)for(var o=0;o=1.4?e:t},getUi5Theme:function(e,t){var n=this,r=e.sUi5Version;return r?n._getUiThemeString(r):n.context.service.ui5librarymetadata.getProjectVersion(t).then(function(e){return n._getUiThemeString(e.display)}).fail(function(){throw new Error(n.context.i18n.getText("i18n","previewHtml_Ui5_version_notFound"))})},getPathPrefix:function(){return"../"},getRelativePath:function(e){return e},getRelativeUrl:function(e){return e},isRunLocalFile:function(e){return!!e}}}),define("sap.watt.saptoolsets.fiori.run.runneradapter/service/WebappRunnerAdapterCpRT",[],function(){"use strict";return{configure:function(){this.context.service.heliumPreviewAdapter.getBaseUrl().fail(function(){}).done(),this.context.service.ui5versionextension.getUi5VersionParameters().fail(function(){}).done(),this.context.service.appcachebusterextension.getAppCacheBusterParameters().fail(function(){}).done(),this.context.service.reuselibsextension.getReuselibsURLParams().fail(function(){}).done(),this.context.service.destinationmappingextension.getDestinationMappingParameters().fail(function(){}).done()},getEnvSpecificUrl:function(e,t,n,r){var i=this;return Q.spread([i._getUrlToken(n,e),i.context.service.moduledependencyextension.addModuleDependencyDestinationMapping(e,n,i._isHtml5Module(n))],function(e,o){return o.isDefaultConfiguration=!1,Q.spread([i.context.service.heliumPreviewAdapter.getBaseUrl(n,e),i.context.service.appcachebusterextension.getAppCacheBusterParameters(o.filePath),i.context.service.destinationmappingextension.getDestinationMappingParameters(o.backendSystem),i.context.service.ui5versionextension.getUi5VersionParameters(o.ui5ActiveVersion),i.context.service.reuselibsextension.getReuselibsURLParams(t,"withWorkspace"===o.workspace),i.context.service.ideurlparameters.getIdeUrlParameters(["saml2idp"]),i.context.service.componentpreloadextension.getComponentPreloadParameter(t,o)],function(e,t,n,o,a,s,u){return e=i._addUrlParameters(e,t,n,o,a,s,u,r)})})},getRelativeURL:function(e,t,n){var r=t.getEntity().getProjectRelativePath();if(r=jQuery.sap.startsWith(r,"/")?r.substr(1):r,this._isHtml5Module(n)){var i=n.getEntity().getProjectRelativePath();i=jQuery.sap.startsWith(i,"/")?i.substr(1):i,r=r.replace(i,"")}return e=URI(r).absoluteTo(e)},_isHtml5Module:function(e){var t=e.getProjectMetadata();return t&&"com.sap.hcp.html5"===t.type},_getUrlToken:function(e,t){var n=e.getEntity().getName(),r=n,i=t.backendSystem;if(i)for(var o=0;o